From a6ad02719937752409211db0d410eb125672837d Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Sat, 7 Jan 2012 21:27:53 +0100 Subject: XPCOM fixes + CRUD --- chrome/js/redirector-ui.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chrome/js/redirector-ui.js') diff --git a/chrome/js/redirector-ui.js b/chrome/js/redirector-ui.js index 3152718..30af176 100644 --- a/chrome/js/redirector-ui.js +++ b/chrome/js/redirector-ui.js @@ -28,7 +28,6 @@ function validateRedirect(redirect) { if (!result.isMatch) { title = tr('warningExampleUrlDoesntMatchPatternTitle'); msg = tr('warningExampleUrlDoesntMatchPattern'); - var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService); 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 { @@ -38,10 +37,10 @@ function validateRedirect(redirect) { resultUrl = uri.resolve(resultUrl); } - var secondResult = args.redirect.getMatch(resultUrl); + var secondResult = redirect.getMatch(resultUrl); if (secondResult.isMatch) { - title = this.strings.getString('errorExampleUrlMatchesRecursiveTitle'); - msg = this.strings.getFormattedString('errorExampleUrlMatchesRecursive', [args.redirect.exampleUrl, resultUrl]); + title = tr('errorExampleUrlMatchesRecursiveTitle'); + msg = tr('errorExampleUrlMatchesRecursive', [redirect.exampleUrl, resultUrl]); alert(title, msg); return false; } @@ -179,7 +178,7 @@ function saveRedirect() { } function configure() { - $('#config').show(); + $('#config').center().css('top', '-=40px').show(); } function bindConfig() { $('#config input[type="checkbox"]').each(function() { -- cgit v1.2.3-70-g09d2