Is there any way to cancel a running NSUserScriptTask? The only way that comes to mind is to launch a separate process (a command line tool) via NSTask, whose only purpose is to run the NSUserScriptTask, and then terminate the command line tool via NSTask when necessary. However, that seems a bit far-fetched and not very optimized... Any ideas?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):