text: function OptionsPage(){this._optionsUrl=io.getExtensionFileUrl(extensionInfo.options_page).toLowerCase(),array.forEach(chromeWindows.getLoadedChromeWindows(),function(e){this._listenEvents(e)},this),chromeWindows.addEventListener(chromeWindows.event.WINDOW_LOAD,func.bind(function(e){this._listenEvents(e.window)},this))}var extensionInfo=require("kango/extension_info"),utils=require("kango/utils"),browser=require("kango/browser"),io=require("kango/io"),chromeWindows=require("kango/chrome_windows"),array=utils.array,func=utils.func;OptionsPage.prototype={_contentLoadedListener:function(e){var o=e.target;if(0==o.URL.toLowerCase().indexOf(this._optionsUrl)){var n=e.target.defaultView;n.__kango_require=require,n.__kango_optionsPageMode=!0}},_listenEvents:function(e){var o=func.bind(this._contentLoadedListener,this);e.gBrowser.addEventListener("DOMContentLoaded",o,!0),chromeWindows.registerContainerUnloader(function(){e.gBrowser.removeEventListener("DOMContentLoaded",o,!0)},e)},dispose:function(){this.close()},open:function(e){if(""!=this._optionsUrl){var o=this._optionsUrl;return"undefined"!=typeof e&&(o+="#"+e),browser.tabs.create({url:o,focused:!0,reuse:!0}),!0}return!1},close:function(){var e=this._optionsUrl;if(""!=e)for(var o=chromeWindows.getMostRecentChromeWindow().gBrowser,n=0;n<o.browsers.length;n++){var t=o.getBrowserAtIndex(n);if(0==t.currentURI.spec.indexOf(e)){o.removeTab(o.tabContainer.childNodes[n]);break}}}},extensionInfo.options_page&&(module.exports=new OptionsPage,module.exports.getPublicApi=getPublicApi);