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

@require 引入依赖后出错 #260

Closed
shiquda opened this issue Feb 14, 2024 · 1 comment
Closed

@require 引入依赖后出错 #260

shiquda opened this issue Feb 14, 2024 · 1 comment
Assignees
Labels
兼容问题 其它管理器可以运行,脚本猫不能运行

Comments

@shiquda
Copy link

shiquda commented Feb 14, 2024

在Tampermonkey里面脚本是可以正常运行的,但是使用scriptcat的时候报错。

经过测试,引入 https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js 的时候导致出错。

测试样例:

// ==UserScript==
// @name         jq test
// @namespace    http://tampermonkey.net/
// @version      0.3.5
// @description  just test
// @author       shiquda
// @match        *://*/*
// @require      https://code.jquery.com/jquery-3.6.0.min.js
// @require      https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js
// @require      https://unpkg.com/turndown/dist/turndown.js
// @require      https://unpkg.com/@guyplusplus/turndown-plugin-gfm/dist/turndown-plugin-gfm.js
// @require      https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.0/marked.min.js
// @license      AGPL-3.0
// ==/UserScript==

(function(){
    console.log(`body: \n${$('body')}`);
})();

报错信息:

jq test.user.js:12  Uncaught TypeError: n[o].hasOwnProperty is not a function
    at t.widget.extend (jq test.user.js:12:5035)
    at t.widget.extend (jq test.user.js:12:5149)
    at t.widget.extend (jq test.user.js:12:5149)
    at t.widget.extend (jq test.user.js:12:5122)
    at t.widget (jq test.user.js:12:4607)
    at jq test.user.js:16:29778
    at jq test.user.js:12:73
    at jq test.user.js:12:84
    at window.kHxzxycwBjdzPMwa (jq test.user.js:1197:3)
    at e.value (<anonymous>:3:392444)
@CodFrm CodFrm added the 兼容问题 其它管理器可以运行,脚本猫不能运行 label Feb 16, 2024
@CodFrm CodFrm self-assigned this Feb 23, 2024
@CodFrm
Copy link
Member

CodFrm commented Feb 26, 2024

哥哥可以试试这个版本:https://github.com/scriptscat/scriptcat/actions/runs/8043428496

@CodFrm CodFrm closed this as completed Feb 26, 2024
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