From bc2da0e87ab021787ab7d94e7383205fbff6ac2e Mon Sep 17 00:00:00 2001 From: Geoffrey Crofte <452767+geoffreycrofte@users.noreply.github.com> Date: Mon, 26 Dec 2022 12:10:46 +0100 Subject: [PATCH] Put back the focus after modal closes --- assets/js/juiz-social-post-sharer.js | 7 +++++-- assets/js/juiz-social-post-sharer.min.js | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/js/juiz-social-post-sharer.js b/assets/js/juiz-social-post-sharer.js index 2f746e8..b84c5de 100755 --- a/assets/js/juiz-social-post-sharer.js +++ b/assets/js/juiz-social-post-sharer.js @@ -1,8 +1,8 @@ -/** +/**! * Plugin Name: Nobs • Share Buttons * Plugin URI: https://sharebuttons.social * Author: Geoffrey Crofte - * Updated: 2.0.0 - No jQuery needed anymore. + * Updated: 2.3.2 - No jQuery needed anymore. */ ; document.addEventListener("DOMContentLoaded", function(event) { @@ -305,6 +305,7 @@ document.addEventListener("DOMContentLoaded", function(event) { return; } let animation = 400; + let focusedEl = document.activeElement; let post_id = event.target.closest('.juiz_sps_links').getAttribute('data-post-id'); let modalContent = '
' + '
' + @@ -493,6 +494,7 @@ document.addEventListener("DOMContentLoaded", function(event) { document.querySelector('.juiz-sps-close').addEventListener('click', function() { modal.setAttribute('aria-hidden', 'true'); modal.classList.remove('jsps-modal-show'); + focusedEl.focus(); temp = setInterval(function() { modal.remove(); }, 400); @@ -511,6 +513,7 @@ document.addEventListener("DOMContentLoaded", function(event) { }); // Accessibility. + // TODO: not enough document.querySelector('.juiz-sps-close').addEventListener('blur', function() { this.closest('.juiz-sps-modal').querySelector('form > p:first-child input').focus(); return false; diff --git a/assets/js/juiz-social-post-sharer.min.js b/assets/js/juiz-social-post-sharer.min.js index a156df4..5435b09 100755 --- a/assets/js/juiz-social-post-sharer.min.js +++ b/assets/js/juiz-social-post-sharer.min.js @@ -1,6 +1,6 @@ -/* +/**! Plugin Name: Nobs • Share Buttons -Plugin URI: http://www.creativejuiz.fr/blog/wordpress/plugin-juiz-social-post-sharer-partage-contenu-reseaux-sociaux +Plugin URI: https://sharebuttons.social Author: Geoffrey Crofte */ -document.addEventListener("DOMContentLoaded",function(e){let t=function(e){return"?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")},s=function(e){var t=[];return Array.prototype.slice.call(e.elements).forEach(function(e){if(!(!e.name||e.disabled||["file","reset","submit","button"].indexOf(e.type)>-1)){if("select-multiple"===e.type){Array.prototype.slice.call(e.options).forEach(function(s){s.selected&&t.push({name:e.name,value:s.value})});return}(!(["checkbox","radio"].indexOf(e.type)>-1)||e.checked)&&t.push({name:e.name,value:e.value})}}),t},i=function(e){return"NaN"==typeof parseInt(e)?0:e>=1e9?parseInt(e/1e9)+"b":e>=1e6?parseInt(e/1e6)+"m":e>=1e3?parseInt(e/1e3)+"k":e},r=function(){return document.querySelector(".juiz_sps_counters.counters_both")?"both":document.querySelector(".juiz_sps_counters.counters_subtotal")?"subtotal":document.querySelector(".juiz_sps_counters.counters_total")?"total":"nope"},a,l;if(document.querySelector(".juiz_sps_counters")){let o=document.querySelectorAll(".juiz_sps_counters");document.querySelector(".juiz_sps_info_plugin_url").value,document.querySelector(".juiz_sps_info_permalink").value,document.querySelector(".juiz_sps_info_post_id").value,o.forEach(function(e){let s=e.querySelectorAll(".juiz_sps_item"),r=document.querySelector(".juiz_sps_links").getAttribute("data-post-id"),a="",l=0;if(e.classList.contains("counters_total")&&(a="juiz_hidden_counter"),null===s)return;let o={action:"jsps-get-counters","jsps-get-counters-nonce":jsps.getCountersNonce,id:r},n=new XMLHttpRequest;n.onload=function(){if(n.status>=200&&n.status<300){let t=JSON.parse(n.response);if(t="object"==typeof t.data?t.data[1]:{},s.forEach(function(e){if(e.classList.contains("juiz_sps_totalcount_item"))return;let s=e.querySelector("button, a").getAttribute("data-nobs-key");if(!t[s])return;let r=document.createElement("span");r.classList.add("juiz_sps_counter"),""!==a&&r.classList.add(a),r.setAttribute("data-nobs-raw-count",t[s]),r.textContent=i(parseInt(t[s])),e.prepend(r),l+=parseInt(t[s])}),!e.classList.contains("counters_subtotal")){let r=document.createElement("span"),o=document.createElement("span"),u=e.querySelector(".juiz_sps_totalcount"),_=u.getAttribute("title");r.classList.add("juiz_sps_total_text"),r.classList.add("juiz_sps_maybe_hidden_text"),r.textContent=_,o.classList.add("juiz_sps_total_number"),o.setAttribute("data-nobs-raw-count",l),o.textContent=i(l),u.append(r,o),u.setAttribute("title",_+" "+l)}0===parseInt(l)&&document.querySelectorAll(".juiz_sps_totalcount_item")&&document.querySelectorAll(".juiz_sps_totalcount_item").forEach(function(e){e.classList.add("juiz_sps_maybe_hidden_text")})}else console.warn("The request failed!")},n.open("GET",jsps.ajax_url+t(o)),n.send()})}document.querySelector(".juiz_sps_item")&&document.querySelectorAll(".juiz_sps_item button, .juiz_sps_item a").forEach(function(e){e.addEventListener("click",function(e){let s=e;if(0===e.clientX)return;e.preventDefault();let o=this,n=o.getAttribute("data-nobs-key"),u=document.querySelector(".juiz_sps_links").getAttribute("data-post-id"),_={action:"jsps-click-count","jsps-click-count-nonce":jsps.clickCountNonce,id:u,network:n},$=new XMLHttpRequest;return $.onload=function(){if($.status>=200&&$.status<300){let e=JSON.parse($.response),t=document.querySelectorAll(".juiz_sps_link_"+n);if(!0===e.success&&document.querySelector(".juiz_sps_counters")){let u=document.querySelector(".juiz_sps_link_"+n+" .juiz_sps_counter"),_=document.querySelector(".juiz_sps_totalcount"),c=parseInt(e.data[2]);if(u)t.forEach(function(e){null!==e.querySelector(".juiz_sps_counter")&&(e.querySelector(".juiz_sps_counter").innerHTML=i(c))});else if("both"===r()||"subtotal"===r()){let d=document.createElement("span");d.classList.add("juiz_sps_counter"),d.textContent=i(c),t.forEach(function(e){e.prepend(d)})}_?document.querySelectorAll(".juiz_sps_totalcount").forEach(function(e){let t=e.querySelector(".juiz_sps_total_number"),s=t.getAttribute("data-nobs-raw-count");t.textContent=i(parseInt(s)+1),t.setAttribute("data-nobs-raw-count",parseInt(s)+1)}):"both"===r()||r()}}else console.warn($,$.status);if(o.href&&""!==o.href&&"#"!==o.href&&"mail"!==n&&"bookmark"!==n){if("_blank"===o.target){let p=document.createElement("a");p.href=o.href,p.target="_blank",p.id="nobs-temp",document.querySelector("body").prepend(p),document.getElementById("nobs-temp").click(),document.getElementById("nobs-temp").remove()}else document.location.href=o.href}else switch(n){case"bookmark":l(s);break;case"mail":a(s);break;case"print":window.print&&window.print();break;case"shareapi":break;default:console.log("Ooops")}},$.open("GET",jsps.ajax_url+t(_)),$.send(),!1})}),document.querySelector(".juiz_sps_link_mail")&&(document.querySelectorAll(".juiz_sps_link_mail"),a=function(e){if(e.preventDefault(),document.querySelector(".juiz-sps-modal"))return;let i=e.target.closest(".juiz_sps_links").getAttribute("data-post-id"),r='

'+jsps.modalEmailTitle+'

'+jsps.modalEmailInfo+'

",a=document.createElement("div");a.classList.add("juiz-social-post-sharer-modal"),a.classList.add("juiz-sps-modal"),a.setAttribute("aria-hidden","true"),a.setAttribute("role","dialog"),a.setAttribute("aria-labelledby","juiz-sps-email-title"),a.setAttribute("data-post-id",i),document.querySelector("body").append(a);let l=document.querySelector(".juiz-sps-modal");return l.innerHTML=r,setTimeout(function(){l.classList.add("jsps-modal-show"),l.setAttribute("aria-hidden","false"),l.querySelector("form > p:first-child input").focus()},10),document.getElementById("jsps-friend-email").addEventListener("input",function(){let e=this.value,t=0,s="";if((e=e.split(/\s*(?:[;,]|$)\s*/)).forEach(function(e){var s;s=e,t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(s)?t+1:t}),document.querySelector('[for="jsps-friend-email"] span')&&document.querySelector('[for="jsps-friend-email"] span').remove(),0===t)return;s=t>1?(s=jsps.modalRecipientNbs).replace("{number}",t):jsps.modalRecipientNb;let i=document.createElement("span");i.setAttribute("aria-live","polite"),i.innerHTML=s,document.querySelector('[for="jsps-friend-email"]').append(i)}),document.getElementById("jsps-email-form").addEventListener("submit",function(e){e.preventDefault();let i=s(this),r=this.closest(".juiz-sps-modal"),a=r.getAttribute("data-post-id"),l=this.querySelector(".juiz-sps-loader");l.classList.add("is-active"),l.innerHTML=jsps.modalLoader;var o={action:"jsps-email-friend","jsps-email-friend-nonce":jsps.modalEmailNonce,id:a,name:i[0].value,email:i[1].value,friend:i[2].value.split(/\s*(?:[;,]|$)\s*/),message:i[3].value};let n=new XMLHttpRequest;return n.onload=function(){if(n.status>=200&&n.status<300){let e=JSON.parse(n.response);if(!0===e.success){let t=document.createElement("div");t.classList.add("juiz-sps-success"),t.classList.add("juiz-sps-message"),r.querySelector(".juiz-sps-modal-content").replaceChild(t,r.querySelector("form")),r.querySelector(".juiz-sps-success").innerHTML='

'+e.data+"

"}else if(!1===e.success){if(r.querySelector(".juiz-sps-error"))r.querySelector(".juiz-sps-error").innerHTML=e.data[1];else{let s=document.createElement("div");s.classList.add("juiz-sps-error"),s.classList.add("juiz-sps-message"),r.querySelector("form").prepend(s),r.querySelector(".juiz-sps-error").innerHTML=e.data[1]}l.classList.remove("is-active");var i=setInterval(function(){l.querySelector("img").remove(),clearInterval(i)},300)}}else{r.querySelector(".juiz-sps-error")&&r.querySelector(".juiz-sps-error").remove();let a=jsps.modalErrorGeneric+'
'+n.statusText+"("+n.status+")",o=document.createElement("div");o.classList.add("juiz-sps-error"),o.classList.add("juiz-sps-message"),o.innerHTML=a,r.querySelector("form").append(o),l.classList.remove("is-active")}},n.open("GET",jsps.ajax_url+t(o)),n.send(),!1}),document.querySelector(".juiz-sps-close").addEventListener("click",function(){return l.setAttribute("aria-hidden","true"),l.classList.remove("jsps-modal-show"),temp=setInterval(function(){l.remove()},400),!1}),window.addEventListener("keyup",function(e){"Escape"===e.code&&document.querySelector('.juiz-sps-modal[aria-hidden="false"]')&&document.querySelector(".juiz-sps-close").click()}),document.querySelector(".juiz-sps-close").addEventListener("blur",function(){return this.closest(".juiz-sps-modal").querySelector("form > p:first-child input").focus(),!1}),!1}),!window.print&&document.querySelector(".juiz_sps_link_print")&&document.querySelectorAll(".juiz_sps_link_print").forEach(function(e){e.remove()}),"addToHomescreen"in window&&window.addToHomescreen.isCompatible||window.sidebar&&window.sidebar.addPanel||window.external&&"AddFavorite"in window.external||"undefined"==typeof chrome||"undefined"!=typeof chrome?l=function(e){e.preventDefault();let t=window.location.href,s=document.title;return"addToHomescreen"in window&&window.addToHomescreen.isCompatible?addToHomescreen({autostart:!1,startDelay:0}).show(!0):window.sidebar&&window.sidebar.addPanel?window.sidebar.addPanel(s,t,""):window.external&&"AddFavorite"in window.external?window.external.AddFavorite(t,s):(command=(/Mac/i.test(navigator.userAgent)?"Cmd":"Ctrl")+"+D",alert(message=(message=e.target.getAttribute("data-alert")||e.target.closest("a, button").getAttribute("data-alert")).replace(/%s/,command))),!1}:document.querySelector(".juiz_sps_link_bookmark")&&document.querySelectorAll(".juiz_sps_link_bookmark").forEach(function(e){e.remove()})}); \ No newline at end of file +document.addEventListener("DOMContentLoaded",function(e){let t=function(e){return"?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")},s=function(e){var t=[];return Array.prototype.slice.call(e.elements).forEach(function(e){if(!(!e.name||e.disabled||["file","reset","submit","button"].indexOf(e.type)>-1)){if("select-multiple"===e.type){Array.prototype.slice.call(e.options).forEach(function(s){s.selected&&t.push({name:e.name,value:s.value})});return}(!(["checkbox","radio"].indexOf(e.type)>-1)||e.checked)&&t.push({name:e.name,value:e.value})}}),t},i=function(e){return"NaN"==typeof parseInt(e)?0:e>=1e9?parseInt(e/1e9)+"b":e>=1e6?parseInt(e/1e6)+"m":e>=1e3?parseInt(e/1e3)+"k":e},r=function(){return document.querySelector(".juiz_sps_counters.counters_both")?"both":document.querySelector(".juiz_sps_counters.counters_subtotal")?"subtotal":document.querySelector(".juiz_sps_counters.counters_total")?"total":"nope"},a,l;if(document.querySelector(".juiz_sps_counters")){let o=document.querySelectorAll(".juiz_sps_counters");document.querySelector(".juiz_sps_info_plugin_url").value,document.querySelector(".juiz_sps_info_permalink").value,document.querySelector(".juiz_sps_info_post_id").value,o.forEach(function(e){let s=e.querySelectorAll(".juiz_sps_item"),r=document.querySelector(".juiz_sps_links").getAttribute("data-post-id"),a="",l=0;if(e.classList.contains("counters_total")&&(a="juiz_hidden_counter"),null===s)return;let o={action:"jsps-get-counters","jsps-get-counters-nonce":jsps.getCountersNonce,id:r},n=new XMLHttpRequest;n.onload=function(){if(n.status>=200&&n.status<300){let t=JSON.parse(n.response);if(t="object"==typeof t.data?t.data[1]:{},s.forEach(function(e){if(e.classList.contains("juiz_sps_totalcount_item"))return;let s=e.querySelector("button, a").getAttribute("data-nobs-key");if(!t[s])return;let r=document.createElement("span");r.classList.add("juiz_sps_counter"),""!==a&&r.classList.add(a),r.setAttribute("data-nobs-raw-count",t[s]),r.textContent=i(parseInt(t[s])),e.prepend(r),l+=parseInt(t[s])}),!e.classList.contains("counters_subtotal")){let r=document.createElement("span"),o=document.createElement("span"),u=e.querySelector(".juiz_sps_totalcount"),_=u.getAttribute("title");r.classList.add("juiz_sps_total_text"),r.classList.add("juiz_sps_maybe_hidden_text"),r.textContent=_,o.classList.add("juiz_sps_total_number"),o.setAttribute("data-nobs-raw-count",l),o.textContent=i(l),u.append(r,o),u.setAttribute("title",_+" "+l)}0===parseInt(l)&&document.querySelectorAll(".juiz_sps_totalcount_item")&&document.querySelectorAll(".juiz_sps_totalcount_item").forEach(function(e){e.classList.add("juiz_sps_maybe_hidden_text")})}else console.warn("The request failed!")},n.open("GET",jsps.ajax_url+t(o)),n.send()})}document.querySelector(".juiz_sps_item")&&document.querySelectorAll(".juiz_sps_item button, .juiz_sps_item a").forEach(function(e){e.addEventListener("click",function(e){let s=e;if(0===e.clientX)return;e.preventDefault();let o=this,n=o.getAttribute("data-nobs-key"),u=document.querySelector(".juiz_sps_links").getAttribute("data-post-id"),_={action:"jsps-click-count","jsps-click-count-nonce":jsps.clickCountNonce,id:u,network:n},$=new XMLHttpRequest;return $.onload=function(){if($.status>=200&&$.status<300){let e=JSON.parse($.response),t=document.querySelectorAll(".juiz_sps_link_"+n);if(!0===e.success&&document.querySelector(".juiz_sps_counters")){let u=document.querySelector(".juiz_sps_link_"+n+" .juiz_sps_counter"),_=document.querySelector(".juiz_sps_totalcount"),c=parseInt(e.data[2]);if(u)t.forEach(function(e){null!==e.querySelector(".juiz_sps_counter")&&(e.querySelector(".juiz_sps_counter").innerHTML=i(c))});else if("both"===r()||"subtotal"===r()){let d=document.createElement("span");d.classList.add("juiz_sps_counter"),d.textContent=i(c),t.forEach(function(e){e.prepend(d)})}_?document.querySelectorAll(".juiz_sps_totalcount").forEach(function(e){let t=e.querySelector(".juiz_sps_total_number"),s=t.getAttribute("data-nobs-raw-count");t.textContent=i(parseInt(s)+1),t.setAttribute("data-nobs-raw-count",parseInt(s)+1)}):"both"===r()||r()}}else console.warn($,$.status);if(o.href&&""!==o.href&&"#"!==o.href&&"mail"!==n&&"bookmark"!==n){if("_blank"===o.target){let p=document.createElement("a");p.href=o.href,p.target="_blank",p.id="nobs-temp",document.querySelector("body").prepend(p),document.getElementById("nobs-temp").click(),document.getElementById("nobs-temp").remove()}else document.location.href=o.href}else switch(n){case"bookmark":l(s);break;case"mail":a(s);break;case"print":window.print&&window.print();break;case"shareapi":break;default:console.log("Ooops")}},$.open("GET",jsps.ajax_url+t(_)),$.send(),!1})}),document.querySelector(".juiz_sps_link_mail")&&(document.querySelectorAll(".juiz_sps_link_mail"),a=function(e){if(e.preventDefault(),document.querySelector(".juiz-sps-modal"))return;let i=document.activeElement,r=e.target.closest(".juiz_sps_links").getAttribute("data-post-id"),a='

'+jsps.modalEmailTitle+'

'+jsps.modalEmailInfo+'

",l=document.createElement("div");l.classList.add("juiz-social-post-sharer-modal"),l.classList.add("juiz-sps-modal"),l.setAttribute("aria-hidden","true"),l.setAttribute("role","dialog"),l.setAttribute("aria-labelledby","juiz-sps-email-title"),l.setAttribute("data-post-id",r),document.querySelector("body").append(l);let o=document.querySelector(".juiz-sps-modal");return o.innerHTML=a,setTimeout(function(){o.classList.add("jsps-modal-show"),o.setAttribute("aria-hidden","false"),o.querySelector("form > p:first-child input").focus()},10),document.getElementById("jsps-friend-email").addEventListener("input",function(){let e=this.value,t=0,s="";if((e=e.split(/\s*(?:[;,]|$)\s*/)).forEach(function(e){var s;s=e,t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(s)?t+1:t}),document.querySelector('[for="jsps-friend-email"] span')&&document.querySelector('[for="jsps-friend-email"] span').remove(),0===t)return;s=t>1?(s=jsps.modalRecipientNbs).replace("{number}",t):jsps.modalRecipientNb;let i=document.createElement("span");i.setAttribute("aria-live","polite"),i.innerHTML=s,document.querySelector('[for="jsps-friend-email"]').append(i)}),document.getElementById("jsps-email-form").addEventListener("submit",function(e){e.preventDefault();let i=s(this),r=this.closest(".juiz-sps-modal"),a=r.getAttribute("data-post-id"),l=this.querySelector(".juiz-sps-loader");l.classList.add("is-active"),l.innerHTML=jsps.modalLoader;var o={action:"jsps-email-friend","jsps-email-friend-nonce":jsps.modalEmailNonce,id:a,name:i[0].value,email:i[1].value,friend:i[2].value.split(/\s*(?:[;,]|$)\s*/),message:i[3].value};let n=new XMLHttpRequest;return n.onload=function(){if(n.status>=200&&n.status<300){let e=JSON.parse(n.response);if(!0===e.success){let t=document.createElement("div");t.classList.add("juiz-sps-success"),t.classList.add("juiz-sps-message"),r.querySelector(".juiz-sps-modal-content").replaceChild(t,r.querySelector("form")),r.querySelector(".juiz-sps-success").innerHTML='

'+e.data+"

"}else if(!1===e.success){if(r.querySelector(".juiz-sps-error"))r.querySelector(".juiz-sps-error").innerHTML=e.data[1];else{let s=document.createElement("div");s.classList.add("juiz-sps-error"),s.classList.add("juiz-sps-message"),r.querySelector("form").prepend(s),r.querySelector(".juiz-sps-error").innerHTML=e.data[1]}l.classList.remove("is-active");var i=setInterval(function(){l.querySelector("img").remove(),clearInterval(i)},300)}}else{r.querySelector(".juiz-sps-error")&&r.querySelector(".juiz-sps-error").remove();let a=jsps.modalErrorGeneric+'
'+n.statusText+"("+n.status+")",o=document.createElement("div");o.classList.add("juiz-sps-error"),o.classList.add("juiz-sps-message"),o.innerHTML=a,r.querySelector("form").append(o),l.classList.remove("is-active")}},n.open("GET",jsps.ajax_url+t(o)),n.send(),!1}),document.querySelector(".juiz-sps-close").addEventListener("click",function(){return o.setAttribute("aria-hidden","true"),o.classList.remove("jsps-modal-show"),i.focus(),temp=setInterval(function(){o.remove()},400),!1}),window.addEventListener("keyup",function(e){"Escape"===e.code&&document.querySelector('.juiz-sps-modal[aria-hidden="false"]')&&document.querySelector(".juiz-sps-close").click()}),document.querySelector(".juiz-sps-close").addEventListener("blur",function(){return this.closest(".juiz-sps-modal").querySelector("form > p:first-child input").focus(),!1}),!1}),!window.print&&document.querySelector(".juiz_sps_link_print")&&document.querySelectorAll(".juiz_sps_link_print").forEach(function(e){e.remove()}),"addToHomescreen"in window&&window.addToHomescreen.isCompatible||window.sidebar&&window.sidebar.addPanel||window.external&&"AddFavorite"in window.external||"undefined"==typeof chrome||"undefined"!=typeof chrome?l=function(e){e.preventDefault();let t=window.location.href,s=document.title;return"addToHomescreen"in window&&window.addToHomescreen.isCompatible?addToHomescreen({autostart:!1,startDelay:0}).show(!0):window.sidebar&&window.sidebar.addPanel?window.sidebar.addPanel(s,t,""):window.external&&"AddFavorite"in window.external?window.external.AddFavorite(t,s):(command=(/Mac/i.test(navigator.userAgent)?"Cmd":"Ctrl")+"+D",alert(message=(message=e.target.getAttribute("data-alert")||e.target.closest("a, button").getAttribute("data-alert")).replace(/%s/,command))),!1}:document.querySelector(".juiz_sps_link_bookmark")&&document.querySelectorAll(".juiz_sps_link_bookmark").forEach(function(e){e.remove()})}); \ No newline at end of file