aboutsummaryrefslogtreecommitdiff
path: root/chrome/js/redirector-ui.js
diff options
context:
space:
mode:
authorpapush2021-04-29 15:51:10 +0200
committerpapush2021-04-29 15:51:51 +0200
commit372b801329584f92e942139011cdbb2d0c92085c (patch)
treed14ed6c34c07ea240743d54e3f9d0d4ac7650309 /chrome/js/redirector-ui.js
parentff4d941f195f6359ee9715d16832c6af749a9045 (diff)
fix whitespace
Diffstat (limited to 'chrome/js/redirector-ui.js')
-rw-r--r--chrome/js/redirector-ui.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/chrome/js/redirector-ui.js b/chrome/js/redirector-ui.js
index 49526e3..78e83e2 100644
--- a/chrome/js/redirector-ui.js
+++ b/chrome/js/redirector-ui.js
@@ -4,10 +4,10 @@ Components.utils.import("chrome://redirector/content/js/redirectorprefs.js");
Components.utils.import("chrome://redirector/content/js/xpcom.js");
jQuery.fn.center = function () {
- this.css("position","absolute");
- this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
- this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
- return this;
+ this.css("position","absolute");
+ this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
+ this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
+ return this;
}
function alert(title, msg) {
@@ -41,15 +41,15 @@ function validateRedirect(redirect) {
if (!result.isMatch) {
title = tr('warningExampleUrlDoesntMatchPatternTitle');
msg = tr('warningExampleUrlDoesntMatchPattern');
- var rv = PromptService.confirmEx(window, title, msg, PromptService.STD_YES_NO_BUTTONS, PromptService.BUTTON_TITLE_YES, PromptService.BUTTON_TITLE_NO, null, null, {});
+ var rv = PromptService.confirmEx(window, title, msg, PromptService.STD_YES_NO_BUTTONS, PromptService.BUTTON_TITLE_YES, PromptService.BUTTON_TITLE_NO, null, null, {});
return rv == 0;
} else {
var resultUrl = result.redirectTo;
if (!resultUrl.match(/https?:/)) {
- var uri = IOService.newURI(redirect.exampleUrl, null, null);
+ var uri = IOService.newURI(redirect.exampleUrl, null, null);
resultUrl = uri.resolve(resultUrl);
- }
-
+ }
+
var secondResult = redirect.getMatch(resultUrl);
if (secondResult.isMatch) {
title = tr('errorExampleUrlMatchesRecursiveTitle');
@@ -76,7 +76,7 @@ function getFile(captionKey, mode) {
picker.displayDirectory = new LocalFile(dir);
}
picker.appendFilter(tr('redirectorFiles'), '*.rjson');
-
+
if (picker.show() == picker.returnCancel) {
return null;
}
@@ -103,13 +103,13 @@ function importRedirects() {
var msg, imported, existed;
imported = result & 0xFFFF;
existed = result >> 16;
-
+
if (imported > 0) {
msg = trPlural('importedMessage', imported);
if (existed > 0) {
- msg += ', ' + trPlural('existedMessage',existed);
+ msg += ', ' + trPlural('existedMessage',existed);
} else {
- msg += '.';
+ msg += '.';
}
} else if (imported == 0 && existed > 0) {
msg = trPlural('allExistedMessage', existed);
@@ -124,7 +124,7 @@ function importRedirects() {
var newlist = [];
for (var i = Redirector.redirectCount-imported; i < Redirector.redirectCount; i++) {
newlist.push(Redirector.getRedirectAt(i));
- }
+ }
databind();
}
}
@@ -167,7 +167,7 @@ function controlsToRedirect(redirect) {
} else {
redirect.patternType = Redirect.WILDCARD;
}
-
+
var inc = $('#include-pattern').val();
var exc = $('#exclude-pattern').val();
if (!validatePattern(inc, redirect.patternType)) {
@@ -178,7 +178,7 @@ function controlsToRedirect(redirect) {
}
redirect.includePattern = inc;
redirect.excludePattern = exc;
-
+
redirect.description = $('#description').val();
redirect.exampleUrl = $('#example-url').val();
redirect.redirectUrl = $('#redirect-to').val();
@@ -244,7 +244,7 @@ function testPattern() {
$(document).ready(function() {
window.template = $('#redirect-list').html().replace(/^\s*|\s$/g, '');
- window.strings = StringBundleService.createBundle('chrome://redirector/locale/redirector.properties', LocaleService.getApplicationLocale());
+ window.strings = StringBundleService.createBundle('chrome://redirector/locale/redirector.properties', LocaleService.getApplicationLocale());
window.prefs = new RedirectorPrefs();
$('link').attr('href',$('link').attr('href')+new Date());
@@ -257,7 +257,7 @@ $(document).ready(function() {
}
ev.preventDefault();
});
-
+
$('#redirect-list li div a.edit').live('click', function(ev) {
var redirect = $(this.parentNode.parentNode).data('redirect');
window.editRedirect = redirect;
@@ -278,9 +278,9 @@ $(document).ready(function() {
$('#config').hide();
});
$('#help').click(function() {
- window.location.href = "chrome://redirector/content/help.html";
+ window.location.href = "chrome://redirector/content/help.html";
});
-
+
bindConfig();
prefs.addListener({ changedPrefs:bindConfig});
@@ -304,7 +304,7 @@ $(document).ready(function() {
}
}
});
-
+
$(document).mouseup(function() {
if (movingElement) {
$(movingElement).css('background', '');