> 功能算是能实现,但是每次重新打开浏览器都会重置,我希望能单独设置每个插件是否启用,主要是适配一些免登录的插件,让它在登录的情况下不发挥作用,还有适配一些不登陆就会有bug的插件 _Originally posted by @Lianoob in [#571](https://github.com/scriptscat/scriptcat/issues/571#issuecomment-3192860150)_
Activity
cyfung1031 commentedon Aug 17, 2025
ScriptCat 應該有實現
// @run-in incognito-tabshttps://www.tampermonkey.net/documentation.php?locale=en#meta:run_in
不過這種要手動加
cyfung1031 commentedon Aug 21, 2025
@CodFrm 现在有没有方法像 exclude 一样,用户能在介面自订meta?
这样的话,用户加
// @run-in incognito-tabs就能解决CodFrm commentedon Aug 22, 2025
@cyfung1031 直接往selfMetedata里面增加就可以了
cyfung1031 commentedon Aug 22, 2025
selfMetedata? 如何
CodFrm commentedon Aug 22, 2025
@cyfung1031 往selfMetadata添加对应的属性,在这里会自动将原本的metadata里的值替换为selfMetadata的
scriptcat/src/app/service/service_worker/script.ts
Line 336 in cbe880e
设置
script.selfMetedata['run-in']= 自定义的值,然后触发脚本更新 (不过脚本猫还没实现run-in)cyfung1031 commentedon Aug 22, 2025
我是指用戶介面如何操作加這些?
cyfung1031 commentedon Aug 22, 2025
那這個範例是什麼??
example/run-in/run-in_incognito-tabs.js
代碼也寫了
CodFrm commentedon Aug 22, 2025
@cyfung1031 好吧,我记错了,有人PR过了
不太明白你的意思,是如何设计,还是如何实现?
设计的话,可能在设置的地方增加一个下拉框,显示
@run-in的选项实现的话,增加一个API,类似之前的 excludeUrl ,更新
selfMetada的内容scriptcat/src/app/service/service_worker/script.ts
Lines 355 to 379 in 0e2f817
cyfung1031 commentedon Aug 22, 2025
怪不得你答的跟我问的是完全两回事
你看错我问题了
@CodFrm 》》》》》》现在有没有方法《《《《《《像 exclude 一样,用户能在介面自订meta?
这样的话,用户加
// @run-in incognito-tabs就能解决我觉得我的写法没有问题呀
所以答案是没有吧
CodFrm commentedon Aug 23, 2025
是的,没有,需要编写
✨ 添加脚本运行环境设置 #628
CodFrm commentedon Sep 2, 2025
已增加:https://github.com/scriptscat/scriptcat/actions/runs/17404400479