Remove web limits(modified)

Pass to kill most of the site, you can lift the restrictions prohibited to copy, cut, select the text, right-click menu.revised version

< Feedback on Remove web limits(modified)

Review: Bad - script does not work

§
Posted: 2018-08-22
Edited: 2018-08-22

适配Greasemonkey 4.0+

https://wiki.greasespot.net/Greasemonkey_Manual:API

http://tieba.baidu.com/p/5435023436 1.API命名更改 原本以GM开头的函数均改为GM对象里的方法,比如GMgetValue改成GM.getValue了 还有一些API更改了大小写,比如xmlhttpRequest改成了xmlHttpRequest,getResourceURL改成了getResourceUrl 在grant部分也要做相应的修改 2.大部分API改为异步 之前可以直接let x = GM_getValue(key),现在不行了,GM.getValue会返回一个Promise,要么使用GM.getValue(xxx).then(……),要么用let x = await GM.getValue(xxx) 具体有哪些改成了异步,官方似乎也没有列个表出来,只能自己试试看了 3.unsafeWindow使用方式有所改变 因为WE对页面JS是有限制的,所以关于unsafeWindow使用与旧版本也不完全相同。 如果想要修改网页原有JS的函数啥的,或者把自己的函数“导出”到网页中去,对于Firefox来说可以通过wrappedJSObject实现,但Chrome不支持此特性,因此只能通过向页面暴力插入JS来实现类似的功能。(印象中TM好像就是这样做的)

Post reply

Sign in to post a reply.