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

在Mac下的Chrome无法正常使用 #132

Closed
jikefan opened this issue Jan 8, 2023 · 4 comments
Closed

在Mac下的Chrome无法正常使用 #132

jikefan opened this issue Jan 8, 2023 · 4 comments
Labels
兼容问题 其它管理器可以运行,脚本猫不能运行

Comments

@jikefan
Copy link

jikefan commented Jan 8, 2023

使用环境

  • Mac Big Sur11.4
  • Chrome Version 108.0.5359.124 (Official Build) (x86_64)
  • Scriptcat版本0.11.0

问题

  • 我自己新建的脚本,编写测试代码并启动。scriptcat无法识别

image

- 插件home目录能够识别

image

我的脚本代码如下

// ==UserScript==
// @name         Beautify Man Pages
// @namespace    https://bbs.tampermonkey.net.cn/
// @version      0.1.0
// @description  美化man.he.net 页面的内容
// @author       Jikefan
// @match        http*://man.he.net/*
// @run-at       document-body	
// ==/UserScript==

const myBodyStyle = () => {
    return 'font-size:12px';
}

(function() {
    'use strict';

    let body = document.getElementsByTagName('body')[0];
    
    body.style = myBodyStyle();
    alert('识别出来了');
})();

最后吐槽

不光是自己写的脚本没法检测出来,有时候下载的脚本虽然检测出来了,但是scriptcat就是不执行脚本,就是不工作。太烦了,于是只能用scriptcat来写代码,然后放油猴运行了。但是scriptcat的界面实在太友好了,所以希望尽快解决这个问题。

@jikefan
Copy link
Author

jikefan commented Jan 8, 2023

问题解决了

// @match http*://man.he.net/*
这个http后面的*去掉就行了

@jikefan jikefan closed this as completed Jan 8, 2023
@CodFrm
Copy link
Member

CodFrm commented Jan 8, 2023

match实现与其它管理器的可能有些不同,这种格式的不兼容 下个版本处理一下

@CodFrm CodFrm added the 兼容问题 其它管理器可以运行,脚本猫不能运行 label Jan 8, 2023
@CodFrm
Copy link
Member

CodFrm commented Jan 11, 2023

你执行的网站是http://man.he.net/么?

@jikefan
Copy link
Author

jikefan commented Jan 11, 2023

是的

CodFrm added a commit that referenced this issue Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
兼容问题 其它管理器可以运行,脚本猫不能运行
Projects
None yet
Development

No branches or pull requests

2 participants