Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对@match规则的处理问题 #30

Closed
slightin opened this issue Jan 14, 2022 · 3 comments
Closed

对@match规则的处理问题 #30

slightin opened this issue Jan 14, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@slightin
Copy link

slightin commented Jan 14, 2022

在tampermonkey中,@matchhttps://hostname” 规则仅会使脚本在该域名的主页运行,即pathname=="/"时运行
而在scriptcat中,@matchhttps://hostname” 规则会使脚本在该域名下的所有页面运行,和@matchhttps://hostname/*” 的效果相同

@CodFrm CodFrm added the bug Something isn't working label Jan 17, 2022
@CodFrm
Copy link
Member

CodFrm commented Jan 20, 2022

测试了一下,并没有出现,能给出一个具体的网址和截图吗?

// ==UserScript==
// @name         Match test
// @namespace    https://bbs.tampermonkey.net.cn/
// @version      0.1.0
// @description  try to take over the world!
// @author       You
// @match        https://bbs.tampermonkey.net.cn
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
})();

image

image

@slightin
Copy link
Author

slightin commented Jan 20, 2022

出现问题的网址是“http://IP地址:端口号/“ 格式的,当把端口号设置为通配时就会出现上述情况
网址为 http://27.188.65.169:9111/ 端口号为9111~9116 ,@match声明如下”http://27.188.65.169:*/“

@slightin
Copy link
Author

// ==UserScript==
// @name         New Userscript
// @namespace    https://bbs.tampermonkey.net.cn/
// @version      0.1.0
// @description  try to take over the world!
// @author       You
// @match        http://27.188.65.169:*/
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    alert("脚本被执行")
})();

image
image

CodFrm added a commit that referenced this issue Jan 20, 2022
@CodFrm CodFrm closed this as completed Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants