GM_setClipboard(data, info) 将数据复制到剪贴板中,第一个参数是要复制的数据,第二个参数是MIME类型,用于指定复制的数据类型。 GM_log(message) 将日志打印到控制台中,可以使用F12开发者工具查看。 GM_addStyle(css) 像网页中添加自己的样式表。 GM_notification(details, ondone), GM_notification(text, titl...
GM_addElement(tag_name, attributes), GM_addElement(parent_node, tag_name, attributes) GM_addStyle(css) GM_download(details), GM_download(url, name) GM_getResourceText(name) GM_getResourceURL(name) GM_info GM_log(message) GM_notification(details, ondone), GM_notification(text, title, im...
// @grant GM_getValue // @grant GM_setClipboard // @grant GM_log // @grant GM_xmlhttpRequest // @grant unsafeWindow // @grant window.close // @grant window.focus // ==/UserScript== (function() { 'use strict'; constCHECKED_DATE='checkedDate'; functioncheckDateEquals(a, b) { re...
键名(在GM_setValue时使用的键名) 默认值 字符串/数字/布尔 使用方法:default=5; 如果键不存在,会返回此参数。如果此参数被省略,会返回无(underfined) 示例 console.log(GM_getValue(‘firefox’)); console.log(GM_getValue(‘firefox’,‘this value is underfined’)); GM_getResourceText 描述 此函数会...
GM_log("Hello World"); 2-2 缓存管理 包含对缓存的新增、获取、删除,在使用之前我们都需要使用关键字 @grant 进行授权 //授权 // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue //设置缓存 GM_setValue("hello", true); ...
semonkey/GM_log?- 记录日志到错误控制台http://www.ttlsa.com/docs/greasemonke y/GM_getValue?- 读取脚本专用的配置值http://www.ttlsa.com/docs/greasemonkey/ GM_setValue?- 设置脚本专用的配置值http://www.ttlsa.com/docs/greasemonkey/GM
GM_setClipboard(data, info)将数据复制到剪贴板中,第一个参数是要复制的数据,第二个参数是MIME类型,用于指定复制的数据类型。 GM_log(message)将日志打印到控制台中,可以使用F12开发者工具查看。 GM_addStyle(css)像网页中添加自己的样式表。 GM_notification(details, ondone), GM_notification(text, title, ...
GM_xmlhttpRequest(details)异步访问网页数据的API,这个方法比较复杂,有大量参数和回调,详情请参考官方文档。 GM_setClipboard(data, info)将数据复制到剪贴板中,第一个参数是要复制的数据,第二个参数是MIME类型,用于指定复制的数据类型。 GM_log(message)将日志打印到控制台中,可以使用F12开发者工具查看。
GM_log("Hello World"); 1. 2. 3. 4. 5. 2-2 缓存管理 包含对缓存的新增、获取、删除,在使用之前我们都需要使用关键字 @grant 进行授权 //授权 // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue //设置缓存
GM_log("百度热点过滤神器"); GM_log("创作时间:2018年12月22日15:37:47"); })();/*作者:yaowenxu 时间:2018年12月22日15:37:52 主页:https://github.com/yaowenxu 功能:清除百度搜索热点模块*/document.addEventListener('DOMContentLoaded',function() ...