jQuery をインクルードしてから、ready() イベントを呼び出すカスタム JS ファイルをインクルードしたいだけです。テストのために、.js ファイルにアラートを設定しましたが、問題なく動作しました。js ファイルの内容を変更すると、同じ古いアラートが表示され続けます。コンソールでは、次のように表示されます。
Chrome マニフェスト 'file:///C:/Program%20Files/Mozilla%20Firefox/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest' を読み取れませんでした。
JS ファイル、特に jquery 関数を呼び出すのが難しいのはなぜですか?
以下に示す私のファイルの内容:
chrome.manifest
content myext content/
overlay chrome://browser/content/browser.xul chrome://myext /content/myext.xul
myext.xul
<?xml version="1.0"?>
<overlay id="Scrapper-Overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://fbpicker/content/functions.js" />
</overlay>
functions.js
最初にalert('test');を入れます。それが現れました。後で私は入れました:
window.addEventListener('load', function () {
gBrowser.addEventListener('DOMContentLoaded', function ()
{
alert("addd");
}, false);
}, false);
しかし、ポップアップとしてテストを表示し続けます。
FF がコンテンツをキャッシュする理由と削除方法
コンソールでは、次の警告が表示されます。
Timestamp: 8/6/2013 2:15:32 PM
Warning: XUL box for _moz_generated_content_before element contained an inline #text child, forcing all its children to be wrapped in a block.
Source File: chrome://global/content/bindings/toolbar.xml
Line: 382
Timestamp: 8/6/2013 2:15:32 PM
Warning: XUL box for _moz_generated_content_before element contained an inline #text child, forcing all its children to be wrapped in a block.
Source File: chrome://global/content/bindings/browser.xml
Line: 0
Timestamp: 8/6/2013 2:15:34 PM
Warning: Key event not available on some keyboard layouts: key="b" modifiers="accel,alt"
Source File: chrome://browser/content/browser.xul
Line: 0
Timestamp: 8/6/2013 2:15:30 PM
Warning: Unknown property 'order'. Declaration dropped.
Source File: resource://gre-resources/ua.css
Line: 46