修复grant问题 by CodFrm · Pull Request #1199 · scriptscat/scriptcat

概述 Descriptions

#1169 的 GM_notification 改动有问题,GM.notification与“GM_notification”是不同的

另外新增了异步API的测试,grant授权时 GM.与GM_都会注入

// ==UserScript==
// @name         GM API 完整测试
// @namespace    https://docs.scriptcat.org/
// @version      1.0.0
// @description  全面测试ScriptCat的所有GM API功能
// @author       ScriptCat
// @match        https://content-security-policy.com/
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_deleteValue
// @grant        GM_listValues
// @grant        GM_addValueChangeListener
// @grant        GM_removeValueChangeListener
// @grant        GM_getResourceText
// @grant        GM_getResourceURL
// @grant        GM_addStyle
// @grant        GM_addElement
// @grant        GM_xmlhttpRequest
// @grant        GM_download
// @grant        GM_notification
// @grant        GM_setClipboard
// @grant        GM_info
// @grant        GM_openInTab
// @grant        GM_registerMenuCommand
// @grant        GM_unregisterMenuCommand
// @grant        GM_cookie
// @grant        GM.setValue
// @grant        unsafeWindow
// @run-at       document-start
// ==/UserScript==

console.log(GM, GM.getValue, GM_getValue)

变更内容 Changes

截图 Screenshots