Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3257,10 +3257,8 @@ function startup(data, reason) AddonManager.getAddonByID(data.id, function(addon
}

// Load various javascript includes for helper functions
["helper", "pref"].forEach(function(fileName) {
let fileURI = addon.getResourceURI("scripts/" + fileName + ".js");
Services.scriptloader.loadSubScript(fileURI.spec, global);
});
Services.scriptloader.loadSubScript("chrome://uienhancer/content/scripts/helper.js", global);
Services.scriptloader.loadSubScript("chrome://uienhancer/content/scripts/pref.js", global);
if (Services.vc.compare(Services.appinfo.platformVersion, "10.0") < 0)
Components.manager.addBootstrappedManifestLocation(data.installPath);

Expand Down
14 changes: 2 additions & 12 deletions content/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/FileUtils.jsm");

function getURIForFile2(filepath, rootDir) {
let file = FileUtils.getFile("ProfD", rootDir?[rootDir]:["extensions"]);
if (rootDir == null)
file.append("UIEnhancer@girishsharma.xpi");
return Services.io.newURI("jar:file:///" + file.path.replace(/[\\]/g, "/") + "!/" + filepath, null, null);
}

["pref"].forEach(function(fileName) {
let fileURI = getURIForFile2("scripts/" + fileName + ".js");
Services.scriptloader.loadSubScript(fileURI.spec, global);
});
Services.scriptloader.loadSubScript("chrome://uienhancer/content/scripts/pref.js", global);

let optionsWindow = {
shortcutTextBox: null,
Expand Down Expand Up @@ -289,4 +279,4 @@ let optionsWindow = {

XPCOMUtils.defineLazyGetter(optionsWindow, "strings", function () {
return Services.strings.createBundle("chrome://uienhancer/locale/optionwindow.properties");
});
});
File renamed without changes.
File renamed without changes.