Skip to content

Instantly share code, notes, and snippets.

This is a response to your request to provide source code for review for the
add on Browser-Bible: xulsword 3.9
(https://addons.mozilla.org/en-US/firefox/addon/browser-bible-xulsword/).
The binary module is xulsword.dll, which contains 3 sets of source code:
a) The Clucene open source search engine. The source code can be found here:
http://sourceforge.net/projects/clucene/files/clucene-core-stable/0.9.21b/cluc
ene-core-0.9.21b.zip
function compare(a,b) {
if (parseInt(a.price) < parseInt(b.price))
return -1;
if (parseInt(a.price) > parseInt(b.price))
return 1;
return 0;
}
function escapeHTML(text) {
var map = {
Dear add-on author,
{% if PASSING_ADDONS and not FAILING_ADDONS %}
Good news! Our automated tests did not detect any compatibility issues with your add-on{{PASSING_ADDONS|length|pluralize}} and {{APPLICATION}} {{VERSION}}. We've updated your add-on{{PASSING_ADDONS|length|pluralize:"'s.s'"}} compatibility to work with {{APPLICATION}} {{VERSION}} so that our Aurora users can begin using your add-on{{PASSING_ADDONS|length|pluralize}}.
We encourage you to view the results of the compatibility test, as some compatibility issues may have been detected but without enough certainty to declare the add-on incompatible:
{% elif FAILING_ADDONS and not PASSING_ADDONS %}
While testing add-ons for compatibility with the upcoming release of {{APPLICATION}} {{VERSION}}, we detected some potential compatibility issues with your add-on{{FAILING_ADDONS|length|pluralize}}.
{% else %}
While testing add-ons for compatibility with the upcoming release of {{APPLICATION}} {{VERSION}}, we detected some potential compatibility issues
diff --git a/bootstrap.js b/bootstrap.js
index 64f01c7..0547f8a 100644
--- a/bootstrap.js
+++ b/bootstrap.js
@@ -2,28 +2,53 @@ const { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Cu.import("resource://gre/modules/Services.jsm");
-function registerWindow(window) {
- let doc = window.document;
ConvertTermsToURI: function(terms) {
// Create an array to hold each search term
var termArray = new Array();
// Split up the search term string based on the space character
termArray = terms.split(" ");
// Call the DoEncode function on each item in our array
termArray.forEach(this.DoEncode);
This file has been truncated, but you can view the full file.
function popup(){
var $intern_0 = '', $intern_24 = '" for "gwt:onLoadErrorFn"', $intern_22 = '" for "gwt:onPropertyErrorFn"', $intern_7 = '"><\/script>', $intern_9 = '#', $intern_11 = '/', $intern_6 = '<script id="', $intern_19 = '=', $intern_10 = '?', $intern_21 = 'Bad handler "', $intern_27 = 'DOMContentLoaded', $intern_8 = 'SCRIPT', $intern_25 = 'Single-script hosted mode not yet implemented. See issue ', $intern_5 = '__gwt_marker_popup', $intern_12 = 'base', $intern_14 = 'clear.cache.gif', $intern_18 = 'content', $intern_1 = 'gwt.codesvr=', $intern_2 = 'gwt.hosted=', $intern_3 = 'gwt.hybrid', $intern_23 = 'gwt:onLoadErrorFn', $intern_20 = 'gwt:onPropertyErrorFn', $intern_17 = 'gwt:property', $intern_26 = 'http://code.google.com/p/google-web-toolkit/issues/detail?id=2079', $intern_13 = 'img', $intern_15 = 'meta', $intern_16 = 'name', $intern_4 = 'popup';
var $wnd = window, $doc = document, gwtOnLoad, bodyDone, base = $intern_0, metaProps = {}, values = [], providers = [], answers = [], onLoadErrorFunc,
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
saveSettings : function(settings) {
var q1 = "INSERT INTO gmailchecker (minute, ssl, inbox, sound, wav, leftClick, autologin, tab, notifyOnce, mailFetcher, hideIcon, uncategorised, notifyPopup) VALUES (?1,?2,?3,?4,?5,?6,?7,?8,?9,?10,?11,?12,?13)";
var q2 = "UPDATE gmailchecker SET minute=?1, ssl=?2, inbox=?3, sound=?4, wav=?5, leftClick=?6, autologin=?7, tab=?8, notifyOnce=?9, mailFetcher=?10, hideIcon=?11, uncategorised=?12, notifyPopup=?13";
var s = this.getSettings();
var updateFlag = s._db;
if (this.conn) {
var stmt = null;
try {
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)});