为什么这个 TamperMonkey 脚本不发出警报、记录或中断?

Why doesn't this TamperMonkey script alert, log or break?

提问人:mnemotronic 提问时间:5/20/2019 最后编辑:mnemotronic 更新时间:5/20/2019 访问量:912

问:

为什么这个最小的脚本不显示警报、命中断点或日志 Vitacost.com?我在 Win 7 上使用 Chrome。

// ==UserScript==
//
// @name         VitaCost_Test
// @namespace    http://your.homepage/
// @version      0.5
// @description  Why don't TamperMonkey scripts run on VitaCost.com???
// @match        *://*.vitacost.com/*
// @match        *://vitacost.com/*
// @match        *://vitacost.com
// @match        https://www.vitacost.com/
// @match        https://www.vitacost.com
// @grant         none
//
// @filename     C:\Users\Public\Documents\Source\js\Grease-Tamper Monkey\VitaCost_Test.js
// ==/UserScript==

debugger;
alert("VitaCost_test");
console.log("VitaCost_test");

(function() {
    'use strict';
debugger;
alert("VitaCost_test function");
console.log("VitaCost_test function");
});
javascript 篡改猴子

评论

0赞 wOxxOm 5/20/2019
在这里工作。该脚本可能已禁用 TM 的仪表板。
0赞 DBS 5/20/2019
您是否正在访问网站的根目录,只是没有斜杠?您的 URL 匹配项看起来需要 在末尾。.com/
0赞 mnemotronic 5/20/2019
@DBS - 添加了更多“@match”标签。还是没有运气。
0赞 ShadowRanger 5/20/2019
@DBS:您甚至可以访问域上没有尾部斜杠的网站吗?Firefox不允许它AFAICT,我认为没有任何浏览器这样做。
0赞 mnemotronic 5/20/2019
@wOxxOm - 除非我没有正确阅读,否则看起来已启用:imgur.com/dTjQhV8

答: 暂无答案