Appearance
浏览器支持
Via 浏览器直接支持用户脚本。如果没有显式写 @run-at ,则默认为 document-idle 。
// ==UserScript==
// @name New Userscript
// @namespace https://viayoo.com/
// @version 0.1
// @description try to take over the world!
// @author You
// @run-at document-end
// @match https://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
})();移动端,微软 Edge 浏览器内置 Adblock Plus ,但功能有限。所幸 Edge 浏览器支持安装少数插件,如篡改猴 Tampermonkey 。 2010 年 05 月, Jan Biniok 开始开发篡改猴 ,最初它是谷歌浏览器的扩展,后来支持多种浏览器。
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 2049-10-01
// @description try to take over the world!
// @author You
// @match https://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
})()PC 端,微软 Edge 浏览器安装篡改猴扩展,并设置。
- 管理扩展 -> 开启开发人员模式
- 管理扩展 -> 篡改猴详细信息 -> 勾选允许用户脚本
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 2049-10-01
// @description try to take over the world!
// @author You
// @match https://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
})()