Simplify code to remove entirely references to watch_pref(),
since it does not appear to be necessary.
This commit is contained in:
parent
5ae2ddca27
commit
7b01a1bd5c
1 changed files with 2 additions and 11 deletions
13
conkerorrc
13
conkerorrc
|
|
@ -51,23 +51,14 @@ hints_ambiguous_auto_exit_delay = 2000;
|
|||
// The below first creates a mode_line_hook to always display in the modeline if
|
||||
// Javascript is enabled.
|
||||
|
||||
require("pref");
|
||||
var global_update_mode_line_for_javascript;
|
||||
var global_watch_mode_line_for_javascript;
|
||||
|
||||
require("pref");
|
||||
function javascript_status_widget (window) {
|
||||
this.class_name = "javascript-status-widget";
|
||||
text_widget.call(this, window);
|
||||
var obj = this;
|
||||
this.do_update = function () {
|
||||
obj.update();
|
||||
watch_pref("javascript.enabled", obj.do_update);
|
||||
}
|
||||
global_update_mode_line_for_javascript =
|
||||
function () { obj.do_update();};
|
||||
global_watch_mode_line_for_javascript =
|
||||
function () { watch_pref("javascript.enabled", obj.do_update);};
|
||||
global_watch_mode_line_for_javascript();
|
||||
global_update_mode_line_for_javascript = function () { obj.update();};
|
||||
}
|
||||
javascript_status_widget.prototype = {
|
||||
constructor: javascript_status_widget,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue