Skip to content

Instantly share code, notes, and snippets.

@kmaglione
Created April 24, 2014 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmaglione/11272893 to your computer and use it in GitHub Desktop.
Save kmaglione/11272893 to your computer and use it in GitHub Desktop.
case "profile-before-change":
if (BrandThunderUtils.beingUninstalled) {
BTPIServices.btprefs.clearUserPref("btpersonas.installedVersion");
if (LightweightThemeManager.currentTheme.id.match("@brandthunder.com")) {
LightweightThemeManager.currentTheme = null;
}
/* Go through lightweight themes pref and remove anything that has any of our stuff in it */
// var usedThemes = JSON.parse(BTPIServices.prefs.getComplexValue("usedThemes", Ci.nsISupportsString).data);
// usedThemes = usedThemes.filter(function (t) {return !("backgroundImage" in t || "backgroundColor" in t)});
// BTPIServices.btprefs.deleteBranch("");
/* Remove database */
/* Remove personas directory */
if (BTPIServices.search.currentEngine.description == "Brand Thunder - PI") {
var name = BTPIServices.search.currentEngine.name;
BTPIServices.search.addEngineWithDetails(name + " ", BTPIServices.search.currentEngine.iconURI.spec,
"", "Bing - BT", "GET",
"http://search.brandthunder.com/search?q={searchTerms}&tid=bt");
var newEngine = BTPIServices.search.getEngineByName(name + " ");
BTPIServices.search.currentEngine = newEngine;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment