2. Remove Simple Paywall
Co robi: Pozwala na ominięcie bardzo prostych niektórych paywalli, gdzie treść jest zasłaniana.
Kod:
javascript:(function(){var debug=false,utils={hideElement:function(e){this.styleImportant(e,"display","none")},styleImportant:function(e,t,n){e.style[t]="";var o=e.style.cssText||"";o.length>0&&";"!=o.slice(-1)&&(o+=";"),e.style.cssText=o+t+": "+n+" !important"},isVisible:function(e){return e.offsetWidth>0&&e.offsetHeight>0},getZIndex:function(e){return parseInt(window.getComputedStyle(e).zIndex)},forEachElement:function(e,t){Array.prototype.slice.call(e).filter(function(e){return 1==e.nodeType}).forEach(function(e){t.call(this,e)})},collectParrents:function(e,t){var n=e&&t(e)?[e]:[],o=e.parentNode;return o&&o!=document&&o!=document.body?n.concat(utils.collectParrents(o,t)):n},elementWeight:function(e,t){for(var n=0,o=e,l=[];o;){var i=function(e){for(var t=0,n=[],o=e.childNodes,r=o.length,s=Array.prototype.slice.call(o),l=0;l<r;l++)s[l].childNodes.length>0&&(n=n.concat(Array.prototype.slice.call(s[l].childNodes).filter(function(e){return 1==e.nodeType}))),t+=o.length;return[t,n]}(o);if(n+=i[0],l=l.concat(i[1]),n>=t)break;o=l.pop()}return n}},overlayRemover=function(e,t){function n(){var n=t.collectParrents(document.elementFromPoint(window.innerWidth/2,window.innerHeight/2),function(e){return t.getZIndex(e)>0});if(e&&console.debug("Overlay found: ",n),0==n.length)return!1;var o=n.pop();return e&&console.debug("Hide parent: ",o),o}function o(){var n=t.collectParrents(document.elementFromPoint(window.innerWidth/2,window.innerHeight/2),function(e){return window.getComputedStyle(e).filter.includes("blur")});if(0==n.length)return!1;var o=n.pop();return o.offsetWidth>=document.body.offsetWidth-100?(t.styleImportant(o,"filter","blur(0)"),e&&console.log("Blur removed!",o),!0):!1}function l(){[document.documentElement,document.body].forEach(function(e){"hidden"==window.getComputedStyle(e).overflowY&&t.styleImportant(e,"overflow","auto"),"fixed"==window.getComputedStyle(e).position&&t.styleImportant(e,"position","static")})}return{run:function(){for(var r=0;r<10;r++){var c=n(),s=0==r;if(c===!1){if(s)alert("No overlay has been found on this website.");break}if(!s){var u=t.elementWeight(c,100);u<100?(e&&console.log("Element is too lightweight, hide it",c),t.hideElement(c)):e&&console.log("Element is too heavy, don't hide it",c)}else t.hideElement(c),l(),o()}}}}(debug,utils);overlayRemover.run();})();
Przykład: https://bensbites.com/tutorial/create-custom-video-captions-effortlessly
Inna wersja skryptozakładki:
Przykład: https://www.theepochtimes.com/health/6-exercises-to-help-control-high-blood-pressure-5632782
Kod:
javascript:(function(){const modal=document.getElementById('modal-OVERLAPABLE');if(modal){modal.remove();}const postContent=document.getElementById('post_content');if(postContent){postContent.style.filter='none';}const blurredElements=document.querySelectorAll('[style*="blur"]');blurredElements.forEach(element=>{element.style.filter='none';});document.body.style.overflow='initial';document.body.classList.remove('modal-open');})();