XMOJ-Script-dev / XMOJ-Script

XMOJ增强脚本
https://www.xmoj-bbs.me
GNU General Public License v3.0
4 stars 5 forks source link

[Bug] 脚本存在代码语法问题(1330:20)await不位于async外 #364

Closed boomzero closed 6 months ago

boomzero commented 6 months ago

描述

tampermonkey allows this, but other userscript managers don't

Code contains errors: Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules at undefined:508:12

Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules at undefined:1330:20

PythonSmall-Q commented 6 months ago

对的,我昨天在发送greasefork的时候也发现了

PythonSmall-Q commented 6 months ago

script-cat跑不了这个

PythonSmall-Q commented 6 months ago

@boomzero https://github.com/XMOJ-Script-dev/XMOJ-Script/raw/master/XMOJ.user.js - Codecontains errors: Uncaught SyntaxError: await is only valid in async functions and the top level bodies of modules at undefined:1330:20

boomzero commented 6 months ago

@PythonSmall-Q https://greasyfork.org/en/scripts/486112

PythonSmall-Q commented 6 months ago

boomzero好棒