学习 greasemonkey 教程


Author: yifei / Created: May 29, 2017, 11:23 p.m. / Modified: May 29, 2017, 11:29 p.m. / Edit

GreaseMonkey/TamperMonkey 学习

头部命令

函数

GM_addStyle(css)        
GM_get/set/deleteValue      
GM_listValues()     
GM_getResourceText(name)        
GM_getResourceURL(name) get base64 encoded urI  
GM_openInTab(url)       
GM_getTab(cb)   Get a object that is persistent as long as this tab is open.    
GM_getTabs(cb)  Get all tab objects as a hash to communicate with other script instances.   
GM_setClipboard(data, info) set the clipboard   


GM_xmlhttprequest can do cross domain request

using it in $.ajax https://gist.github.com/yifeikong/9e93cc38297cce989ffbef5587ad2f39


有任何问题可以发邮件到 kongyifei (at) gmail.com 讨论