Can Scriptish inject scripts into other chrome: windows?

試著忘記壹切 提交于 2019-12-08 13:34:31

问题


As we know Scriptish has the support for the chrome: scheme (although disabled by default), but it failed to inject a user script into other chrome: window (for example, download window, or about window).

Writing a script using @include chrome://foo/bar only works when the browser window opens this page as a tab, but not for a new window with this URL, except the browser window itself, use @include chrome://browser/content/browser.xul does work.

Is there any way to let Scriptish do this just like what uc does? Or is Scriptish just designed like this?


回答1:


I have resolved it.

Scriptish will insert a toolbar button to browser windows. And every time it wants to inject a script, it checks if the target is alive and if it has Scriptish's UI, if not, it just return.

As a result, although it supports chrome scheme, it only inject scripts into browser windows and chrome page in tabs.

I edited modules\utils\Scriptish_injectScripts.js, removed this check at line 29, now it can inject scripts as their @include meta data.



来源:https://stackoverflow.com/questions/16244648/can-scriptish-inject-scripts-into-other-chrome-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!