问题
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