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 不支持本地文件 #33

Open
ChitaGideon opened this issue Jan 29, 2022 · 1 comment
Open

@require 不支持本地文件 #33

ChitaGideon opened this issue Jan 29, 2022 · 1 comment

Comments

@ChitaGideon
Copy link

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.baidu.com/*
// @icon         https://www.google.com/s2/favicons?domain=baidu.com
// @require      file:///Users/xxx/xxx/xxx/bundle2.js
// @grant        GM_log
// ==/UserScript==

(function() {
    'use strict';
// Your code here...
    console.log('window.initDb')
    console.log(window.initDb())

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

我已经开启了 允许访问文件网址 选项

@CodFrm
Copy link
Member

CodFrm commented Jan 29, 2022

暂时没支持本地文件require,如果是想使用外部编辑器开发,可以试试vscode-scriptcat扩展,在b站有演示,还不是很完善

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants