Jak*_*ake 3 javascript console google-chrome google-chrome-devtools tampermonkey
有没有办法在Chrome的JavaScript控制台中使用Tampermonkey的API?
我想弄乱像GM_xmlhttpRequest()
和的功能GM_listValues()
.
创建以下脚本:
// ==UserScript==
// @name Exports some GM functions
// @namespace Whatever
// @match *
// ==/UserScript==
// WARNING: Any page can now use these methods! Be careful,
// or change "@match *" to "@match https://example.com" and
// visit https://example.com to test the API.
unsafeWindow.GM_xmlhttpRequest = GM_xmlhttpRequest;
unsafeWindow.GM_listValues = GM_listValues;
Run Code Online (Sandbox Code Playgroud)打开可以激活Tampermonkey的任何页面(例如https://stackoverflow.com/).
归档时间: |
|
查看次数: |
3681 次 |
最近记录: |