Skip to content

Commit

Permalink
Update q
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterKia authored Aug 7, 2023
1 parent cf2a862 commit b6ac32e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions filters/quick-fixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ searchenginereports.net##div[id][style=""]:has(> a[href][target][rel])
duplichecker.com##.container > .clearfix + *:not(div, span, [class], [id])

! https://github.com/uBlockOrigin/uAssets/issues/14480
soft98.ir,~forum.soft98.ir#@#a > img:upward(a):style(clip-path: circle(0) !important;)
soft98.ir,~forum.soft98.ir#@#+js(rpnt, script, /^/, if(typeof alreadyRun!=='undefined'&&alreadyRun===true){}else{alreadyRun=true;(function(){'use strict';const safe={'log':window.console.log.bind(console)\,'eval':window.eval\,'setInterval':window.setInterval\,'clearInterval':window.clearInterval\,'getComputedStyle':window.getComputedStyle\,'addEventListener':self.EventTarget.prototype.addEventListener\,'createElement':document.createElement\,'querySelector':document.querySelector\,'querySelectorAll':document.querySelectorAll\,'styleSheets':document.styleSheets\,'Element_attributes':Object.getOwnPropertyDescriptor(Element.prototype\,'attributes').get\,'getAttributeNames':Element.prototype.getAttributeNames\,'setAttribute':Element.prototype.setAttribute\,'removeAttribute':Element.prototype.removeAttribute\,'hasAttribute':Element.prototype.hasAttribute\,'appendChild':Element.prototype.appendChild\,'cloneNode':Element.prototype.cloneNode\,'Element_contains':Element.prototype.contains\,'attachShadow':Element.prototype.attachShadow\,'Array_includes':Array.prototype.includes\,'Array_push':Array.prototype.push\,'Array_splice':Array.prototype.splice\,'Array_indexOf':Array.prototype.indexOf\,'Set_has':Set.prototype.has};document.createElement=function(){};const isAds=function(node){if(node.nodeName==='A'||node.nodeName==='DIV'){for(const style of styleAttributes){if(safe.hasAttribute.call(node\,style)===true){return true}}};return false};const genericGet=function(target\,thisArg\,args){if(thisArg==='toString'){return target.toString.bind(target)};return Reflect.get(target\,thisArg\,args)};let styleAttributes=[];const findStyleAttributes=function(doc){const arrayDifference=function(array1\,array2){const longerArray=array1.length>=array2.length?array1:array2;const shorterArray=array1.length<array2.length?array1:array2;return longerArray.filter(item=>!shorterArray.includes(item))};const originalNode=safe.querySelector.call(doc\,['a > img']).parentNode;const modifiedNode=safe.querySelector.call(document\,['a > img']).parentNode;const originalAttributes=safe.getAttributeNames.call(originalNode);const modifiedAttributes=safe.getAttributeNames.call(modifiedNode);styleAttributes=new Set(arrayDifference(originalAttributes\,modifiedAttributes));if(styleAttributes.size===0){location.reload()};for(const style of styleAttributes){const nodes=[...safe.querySelectorAll.call(document\,'aside:not(main aside) > div')\,...safe.querySelectorAll.call(document\,'footer div:nth-child(2)')];for(let i=0\,len=nodes.length;i<len;++i){safe.setAttribute.call(nodes[i]\,style\,'')}}};const generateID=function(len){const dec2hex=function(dec){return dec.toString(16).padStart(2\,'0')};const arr=new Uint8Array((len||40)/2);window.crypto.getRandomValues(arr);const result=Array.from(arr\,dec2hex).join('').replace(/^\d+/g\,'');if(result.length<3){return generateID(len)};return result};const randomAttribute=generateID(15);const makeShadowRoot=function(){const hostElement=safe.createElement.call(document\,'span');hostElement.style.display='none';safe.setAttribute.call(hostElement\,randomAttribute\,'');safe.appendChild.call(document.body\,hostElement);const shadowRoot=safe.attachShadow.call(hostElement\,{mode:'closed'});const styleSheets=safe.styleSheets;for(let i=0\,len=styleSheets.length;i<len;++i){const styleSheet=styleSheets[i];if(styleSheet.href&&new URL(styleSheet.href).host==='soft98.ir'){safe.appendChild.call(shadowRoot\,safe.cloneNode.call(styleSheet.ownerNode\,false))}};return[hostElement\,shadowRoot]};window.getComputedStyle=new Proxy(window.getComputedStyle\,{apply(target\,thisArg\,args){const node=args[0];const style=Reflect.apply(target\,thisArg\,args);if(style.clipPath==='none'||isAds(node)===false){return style};const[hostElement\,shadowRoot]=makeShadowRoot();const shadowNode=safe.appendChild.call(shadowRoot\,safe.cloneNode.call(node\,false));for(const style of styleAttributes){safe.removeAttribute.call(shadowNode\,style)};const value=safe.getComputedStyle.call(window\,shadowNode).clipPath;hostElement.remove();Object.defineProperty(style\,'clipPath'\,{get:function(){return value}});style.getPropertyValue=new Proxy(style.getPropertyValue\,{apply(target\,thisArg\,args){if(args[0]!=='clip-path'){return Reflect.apply(target\,thisArg\,args)};return value}\,get:genericGet});return style}\,get:genericGet});window.MutationObserver=new Proxy(window.MutationObserver\,{construct:function(target\,args){const callback=args[0];const proxiedCallback=function(mutations\,observer){for(let len=mutations.length\,i=len-1;i>=0;--i){const mutation=mutations[i];if(mutation.type==='attributes'){if(mutation.attributeName==='style'||mutation.attributeName==='class'){continue};if(safe.Set_has.call(styleAttributes\,mutation.attributeName)===true||mutation.attributeName===randomAttribute){safe.Array_splice.call(mutations\,i\,1)}}else if(mutation.type==='childList'&&mutation.addedNodes.length>0){const nodes=mutation.addedNodes;for(let j=0\,len2=nodes.length;j<len2;++j){const node=nodes[j];if(safe.hasAttribute.call(node\,randomAttribute)===true){safe.Array_splice.call(mutations\,i\,1);break}}}};if(mutations.length!==0){callback(mutations\,observer)}};args[0]=proxiedCallback;const observer=Reflect.construct(target\,args);return observer}\,get:genericGet});self.EventTarget.prototype.addEventListener=new Proxy(self.EventTarget.prototype.addEventListener\,{apply(target\,thisArg\,args){if(args[0]==='contextmenu'){if(thisArg.nodeName==='DIV'&&safe.Element_contains.call(safe.querySelector.call(document\,'main article')\,thisArg)===true){for(const style of styleAttributes){safe.setAttribute.call(thisArg\,style\,'')};self.EventTarget.prototype.addEventListener=target}};return Reflect.apply(target\,thisArg\,args)}\,get:genericGet});let mainCode='';window.eval=new Proxy(window.eval\,{apply(target\,thisArg\,args){mainCode=args[0];args[0]=function(){};window.eval=target;return Reflect.apply(target\,thisArg\,args)}\,get:genericGet});Element.prototype.getAttributeNames=new Proxy(Element.prototype.getAttributeNames\,{apply(target\,thisArg\,args){const attributes=Reflect.apply(target\,thisArg\,args);if(isAds(thisArg)===false){return attributes};for(const style of styleAttributes){const index=safe.Array_indexOf.call(attributes\,style);if(index>-1){safe.Array_splice.call(attributes\,index)}};return attributes}\,get:genericGet});Object.defineProperty(Element.prototype\,'attributes'\,{get:function(){const node=this;if(isAds(node)===false){return safe.Element_attributes.call(node)};const newNode=safe.cloneNode.call(node\,false);for(const style of styleAttributes){safe.removeAttribute.call(newNode\,style)};return safe.Element_attributes.call(newNode)}});const replaceScripts=function(doc){const originalNodes=safe.querySelectorAll.call(doc\,'script');const modifiedNodes=safe.querySelectorAll.call(document\,'script');document.createElement=safe.createElement;for(let i=0\,len=originalNodes.length;i<len;++i){const originalNode=originalNodes[i];const modifiedNode=modifiedNodes[i];const newScript=safe.createElement.call(document\,'script');const attributes=safe.Element_attributes.call(originalNode);for(let j=0\,len2=attributes.length;j<len2;++j){const attribute=attributes[j];newScript.setAttribute(attribute.name\,attribute.value)};newScript.textContent=originalNode.textContent;modifiedNode.insertAdjacentElement('afterend'\,newScript);modifiedNode.remove()}};let doc='';const xhr=new XMLHttpRequest();xhr.open('GET'\,location.href\,false);xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){const parser=new DOMParser();doc=parser.parseFromString(xhr.responseText\,'text/html')}};xhr.send();const main=function(){findStyleAttributes(doc);replaceScripts(doc);const intervalID=safe.setInterval.call(window\,function(){if(mainCode!==''){safe.clearInterval.call(window\,intervalID);delete window.alreadyRun;safe.eval.call(window\,mainCode)}}\,1)};if(document.readyState!=='loading'){main()}else{safe.addEventListener.call(document\,'DOMContentLoaded'\,main)}})()};)
soft98.ir,~forum.soft98.ir##body > header > [class]:nth-child(2):style(clip-path: circle(0) !important;)
soft98.ir,~forum.soft98.ir##aside:not(main aside) > div:style(clip-path: circle(0) !important;)
soft98.ir,~forum.soft98.ir##+js(rmnt, script, /^/)
soft98.ir,~forum.soft98.ir##+js(rpnt, script, /^/, if(typeof alreadyRun!=='undefined'&&alreadyRun===true){}else{alreadyRun=true;(function(){'use strict';const safe={'log':window.console.log.bind(console)\,'getPropertyValue':CSSStyleDeclaration.prototype.getPropertyValue\,'createElement':document.createElement\,'setAttribute':Element.prototype.setAttribute\,'getAttribute':Element.prototype.getAttribute\,'getComputedStyle':window.getComputedStyle\,'appendChild':Element.prototype.appendChild\,'remove':Element.prototype.remove\,'Element_attributes':Object.getOwnPropertyDescriptor(Element.prototype\,'attributes').get\,'Array_splice':Array.prototype.splice\,'createElement':document.createElement\,'cloneNode':Element.prototype.cloneNode\,'querySelectorAll':document.querySelectorAll\,'setInterval':window.setInterval\,'clearInterval':window.clearInterval\,'eval':window.eval\,'addEventListener':self.EventTarget.prototype.addEventListener\,};const genericGet=function(target\,thisArg\,args){if(thisArg==='toString'){return target.toString.bind(target)};return Reflect.get(target\,thisArg\,args)};const generateID=function(len){const dec2hex=function(dec){return dec.toString(16).padStart(2\,'0')};const arr=new Uint8Array((len||40)/2);window.crypto.getRandomValues(arr);const result=Array.from(arr\,dec2hex).join('').replace(/^\d+/g\,'');if(result.length<3){return generateID(len)};return result};const randomName=generateID(15);window.MutationObserver=new Proxy(window.MutationObserver\,{construct:function(target\,args){const callback=args[0];const proxiedCallback=function(mutations\,observer){for(let len=mutations.length\,i=len-1;i>=0;--i){const mutation=mutations[i];if(mutation.type==='childList'&&mutation.addedNodes.length>0){const nodes=mutation.addedNodes;for(let j=0\,len2=nodes.length;j<len2;++j){const node=nodes[j];if(node.localName===randomName){safe.Array_splice.call(mutations\,i\,1);break}}}};if(mutations.length!==0){callback(mutations\,observer)}};args[0]=proxiedCallback;const observer=Reflect.construct(target\,args);return observer}\,get:genericGet});window.getComputedStyle=new Proxy(window.getComputedStyle\,{apply(target\,thisArg\,args){let style=Reflect.apply(target\,thisArg\,args);if(safe.getPropertyValue.call(style\,'clip-path')==='none'){return style};const node=args[0];const clonedNode=safe.createElement.call(document\,randomName);safe.setAttribute.call(clonedNode\,'class'\,safe.getAttribute.call(node\,'class'));safe.setAttribute.call(clonedNode\,'id'\,safe.getAttribute.call(node\,'id'));safe.setAttribute.call(clonedNode\,'style'\,safe.getAttribute.call(node\,'style'));safe.appendChild.call(document.body\,clonedNode);const value=safe.getPropertyValue.call(safe.getComputedStyle.call(window\,clonedNode)\,'clip-path');safe.remove.call(clonedNode);Object.defineProperty(style\,'clipPath'\,{get:function(){return value}});style.getPropertyValue=new Proxy(style.getPropertyValue\,{apply(target\,thisArg\,args){if(args[0]!=='clip-path'){return Reflect.apply(target\,thisArg\,args)};return value}\,get:genericGet});return style}\,get:genericGet});let mainCode='';window.eval=new Proxy(window.eval\,{apply(target\,thisArg\,args){mainCode=args[0];args[0]=function(){};window.eval=target;return Reflect.apply(target\,thisArg\,args)}\,get:genericGet});let doc='';const xhr=new XMLHttpRequest();xhr.open('GET'\,location.href\,false);xhr.onreadystatechange=function(){if(xhr.readyState===4&&xhr.status===200){const parser=new DOMParser();doc=parser.parseFromString(xhr.responseText\,'text/html')}};xhr.send();const replaceScripts=function(doc){const originalNodes=safe.querySelectorAll.call(doc\,'script');const modifiedNodes=safe.querySelectorAll.call(document\,'script');document.createElement=safe.createElement;for(let i=0\,len=originalNodes.length;i<len;++i){const originalNode=originalNodes[i];const modifiedNode=modifiedNodes[i];const newScript=safe.createElement.call(document\,'script');const attributes=safe.Element_attributes.call(originalNode);for(let j=0\,len2=attributes.length;j<len2;++j){const attribute=attributes[j];newScript.setAttribute(attribute.name\,attribute.value)};newScript.textContent=originalNode.textContent;modifiedNode.insertAdjacentElement('afterend'\,newScript);modifiedNode.remove()}};const main=function(){replaceScripts(doc);const intervalID=safe.setInterval.call(window\,function(){if(mainCode!==''){delete window.alreadyRun;safe.clearInterval.call(window\,intervalID);safe.eval.call(window\,mainCode)}}\,10)};if(document.readyState!=='loading'){main()}else{safe.addEventListener.call(document\,'DOMContentLoaded'\,main)}})()};)
! soft98.ir,~forum.soft98.ir##+js(rmnt, aside, /(.*)[9][^\w]*[0][^\w]*[9][^\w]*[9][^\w]*[0][^\w]*[7][^\w]*[1][^\w]*[4][^\w]*[6][^\w]*[1][^\w]*(.*)/)
! soft98.ir,~forum.soft98.ir##+js(aeld, /contextmenu|mouseup|mousedown/, [native code])

Expand Down

0 comments on commit b6ac32e

Please sign in to comment.