This is just some static backup of the original site, don't expect every link to work!

Changeset 0dcd77


Ignore:
Timestamp:
Aug 17, 2012, 7:25:34 PM (10 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
7b2fc8
Parents:
573656
Message:

(de)activate debug-log instantly on option-change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/vI_log.js

    r573656 r0dcd77  
    7272  __proto__: Log4Moz.Appender.prototype,
    7373
     74  currentWindow : null,
     75 
    7476  doAppend: function DOApp_doAppend(message) {
    75     window = Cc["@mozilla.org/appshell/window-mediator;1"]
     77    if (!vIprefs.get("debug_notification")) return;
     78    this.currentWindow = Cc["@mozilla.org/appshell/window-mediator;1"]
    7679      .getService(Ci.nsIWindowMediator)
    7780      .getMostRecentWindow(null);
    78     obj_debugBox = window.document.getElementById("virtualIdentityExtension_debugBox");
     81    var obj_debugBox = this.currentWindow.document.getElementById("virtualIdentityExtension_debugBox");
    7982    if (obj_debugBox)
    8083      obj_debugBox.dump(message);
     
    173176    dapp.level = Log4Moz.Level["All"];
    174177    root.addAppender(dapp);
    175 
    176     // A dump appender outputs to Debug Output Box
    177     let doapp = new DebugOutputAppender(myNewFormatter);
    178     doapp.level = Log4Moz.Level["All"];
    179     root.addAppender(doapp);
    180   }
     178  }
     179 
     180  // A dump appender outputs to Debug Output Box
     181  let doapp = new DebugOutputAppender(myNewFormatter);
     182  doapp.level = Log4Moz.Level["All"];
     183  root.addAppender(doapp);
     184 
    181185  return Log;
    182186}
Note: See TracChangeset for help on using the changeset viewer.