Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28b33a0
commit 211a24d
Showing
4 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
uses the javascript beautifier from jsbeautifier.org to beautify all http responses with the mime type text/javascript or application/javascript. | ||
|
||
WARNING: this plugin is applied globally and may screw up your web browsing session. | ||
|
||
KNOWN ISSUES | ||
------------ | ||
|
||
* doesn't handle character encoding properly | ||
* weird errors when calling 'this.originalListener.onStartRequest(request, context);' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<overlay id="jsbeautifier" | ||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> | ||
<script type="application/x-javascript" src="chrome://jsbeautifier/content/overlay.js"/> | ||
<statusbar id="status-bar"> | ||
<statusbarpanel id="jsbStatus" label="JSB"/> | ||
</statusbar> | ||
</overlay> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
|
||
Components.utils.import("resource://modules/module.js"); | ||
jsbeautifier.Worker = Worker; | ||
jsbeautifier.Worker = Worker; | ||
|
||
function update_text() { | ||
document.getElementById("jsbStatus").label = jsbeautifier.active ? "JSB ON" : "JSB OFF"; | ||
}; | ||
|
||
function toggle() { | ||
jsbeautifier.toggle(); | ||
}; | ||
|
||
function load() { | ||
update_text(); | ||
jsbeautifier.addListener(update_text); | ||
document.getElementById("jsbStatus").addEventListener("click", toggle, false); | ||
}; | ||
|
||
function unload() { | ||
jsbeautifier.removeListener(update_text); | ||
}; | ||
|
||
window.addEventListener("load", load, false); | ||
window.addEventListener("unload", unload, false); |