Post Reply 
GM_function (+example) - Run Greasemonkey script on ALL browser with Privoxy
Jul. 26, 2018, 10:04 PM
Post: #12
RE: GM_function (+example) - Run Greasemonkey script on ALL browser with Privoxy
How about running other scripts? I tried to run Adguard

Code:
FILTER: adguardblocker
s@(^[^;]*?(?:<head[^>]*?>|<body[^>]*?>|<script[^>]*?>[^>]*?</script>))@<script src="https://greasyfork.org/scripts/33396-adguard-popup-blocker/code/Adguard%20Popup%20Blocker.user.js" type="text/javascript"></script>\n$1@i

That try above resulted in "ReferenceError: unsafeWindow is not defined" leading me into https://developer.mozilla.org/en-US/docs...ot_defined so I tried below method. No error no appeared, but does that even work? No popops/pounders were blocked when I used it.

Code:
FILTER: adguardblocker2
s@(^[^;]*?(?:<head[^>]*?>|<body[^>]*?>|<script[^>]*?>[^>]*?</script>))@\n<script>\n\
window.addEventListener("unsafeWindow", Greasemonkey_main, false);\n\
function Greasemonkey_main ()\n\
{\n\
var imported = document.createElement('script');\n\
imported.src = 'https://192.168.101.101:8447/javascript/adguardblocker_2.1.9.js';\n\
document.body.appendChild(imported);\n\
}\n\
</script>\n$1@i

I got better results with https://greasyfork.org/scripts/24473-pop...er.user.js as it stops popups, but is not all that good solution to use as more clicks are required to get where one want

I also tried a bunch of youtube scripts, but none of them loads on youtube website without giving any error. GM Emulation itself would not load either. Any known reason for that? Firefox otherwise informs about its security related blocks in developer console log.

https://greasyfork.org/scripts/27199-rem...s).user.js
https://greasyfork.org/scripts/10032-byp...on.user.js
https://greasyfork.org/scripts/9062-yout...er.user.js
https://greasyfork.org/scripts/20015-sim...on.user.js
https://greasyfork.org/scripts/5368-yout...20.user.js
https://greasyfork.org/scripts/38675-you...60.user.js
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
RE: GM_function (+example) - Run Greasemonkey script on ALL browser with Privoxy - ryszardzonk - Jul. 26, 2018 10:04 PM

Forum Jump: