How can I mimic Greasemonkey/Firefox's unsafeWindow functionality in Chrome?

后端 未结 5 534
孤城傲影
孤城傲影 2020-12-05 16:53

I\'m just fiddling around with user scripts in chrome right now, so please bear with my potential ignorance/idiocy.

In the page I\'m writing a script for, there is a

5条回答
  •  既然无缘
    2020-12-05 17:26

    ok heres an idea you can inject the script using the address bar...

    javascript:var ElEm = document.createElement("script");ElEm.src='[path_to_script]';document.body.appendChild(ElEm);
    

    then you can run whatever you want in the window with your javascript

提交回复
热议问题