Improve 'trusted-suppress-native-method' — some methods cannot be suppressed
I tried to suppress Math.floor with
exploader.net#%#//scriptlet('trusted-suppress-native-method', 'Math.floor', '/([12]\d\.\d+|\d\.\d+)/', 'prevent')
but it fails. This is more of a question, but is it possible to suppress methods without argument such as Math.random and Element.prototype.getBoundingClientRect? "" as the argment doesn't work.
In these commits
https://github.com/AdguardTeam/AdguardFilters/commit/ef869c8a7213f041fd7d06587d25ce63a7924d50
https://github.com/uBlockOrigin/uAssets/commit/5ff8cb6a75c2c17b685297462ff35015d407c035
I found the same abort-on-stack-trace doesn't work with AG extension, the same result with trusted-suppress-native-method with abort. I had to use abort-on-property-read instead.
Regarding last comment. I checked it out with:
pvpoke-re.com#@%#//scriptlet('abort-on-property-read', 'Object.assign')
pvpoke-re.com#%#//scriptlet('abort-on-stack-trace', 'Object.assign', '.js?v=')
and it seems that it works fine on my end (it prevents displaying anti-adblock popup).
In which browser and with what AdGuard version did you test it?
Chrome and 5.1.70.
Do you still can reproduce it? I checked it with Chrome MV2/3 extension and it works fine.
I can't reproduce any longer, not sure what was happening. I'll update the rule.
Thank you for checking it out.