diff options
Diffstat (limited to 'chrome/content')
-rw-r--r-- | chrome/content/help.html | 9 | ||||
-rw-r--r-- | chrome/content/overlay.js | 8 | ||||
-rw-r--r-- | chrome/content/overlay.xul | 1 | ||||
-rw-r--r-- | chrome/content/redirect.xul | 1 | ||||
-rw-r--r-- | chrome/content/redirectList.js | 18 | ||||
-rw-r--r-- | chrome/content/redirectList.xul | 5 |
6 files changed, 26 insertions, 16 deletions
diff --git a/chrome/content/help.html b/chrome/content/help.html index e74048e..0ce6769 100644 --- a/chrome/content/help.html +++ b/chrome/content/help.html @@ -1,3 +1,4 @@ +<!-- $Id$ -->
<html>
<head>
<title>Redirector Help</title>
@@ -18,7 +19,6 @@ <li><a href="#excludepattern">Exclude pattern</a></li>
<li><a href="#redirectto">Redirect to</a></li>
<li><a href="#patterntype">Pattern type</a></li>
- <li><a href="#onlyiflinkexists">Only if link exists</a></li>
</ul>
</li>
<li><a href="#wildcards">Wildcards</a></li>
@@ -49,7 +49,7 @@ <h4>Basic usage</h4>
<p>To add a new redirect you can go to the <em>Tools</em> menuitem and select <em>Redirector</em>. That will
open the <em>Redirector settings</em> window which shows all your redirects. The window can also be opened
- by right clicking on the <strong>R</strong> icon in your statusbar and selecting <em>Manage redirects</em>.
+ by right clicking on the <strong>R</strong> icon in your statusbar.
There you can press the <em>Add...</em> button and then you can enter the details for the new redirect. A redirect
consists of a few things:
<ul>
@@ -75,11 +75,6 @@ <li><a name="patterntype"></a><strong>Pattern type:</strong> This specifies how Redirector should interpret the patterns, either as
<a href="#wildcards">wildcards</a> or <a href="#regularexpressions#">regular expressions</a>.</li>
- <li><a name="onlyiflinkexists"></a><strong>Only if link exists:</strong> If this is checked then the redirect will only happen if there is a link
- to the target page on the page that matches the include pattern. For instance, if you have a redirect from http://foo.com to
- http://bar.com and check <em>Only if link exists</em> then http://foo.com has to have a hyperlink to http://bar.com, otherwise
- nothing will happen.
- </li>
</ul>
</p>
diff --git a/chrome/content/overlay.js b/chrome/content/overlay.js index 46f69cc..760f828 100644 --- a/chrome/content/overlay.js +++ b/chrome/content/overlay.js @@ -117,8 +117,6 @@ var RedirectorOverlay = { } }, - - prefObserver : { getService : function() { @@ -138,11 +136,7 @@ var RedirectorOverlay = { RedirectorOverlay.setStatusBarImg(); } } - } - - }; window.addEventListener("load", function(event) { RedirectorOverlay.onLoad(event); }, false); -window.addEventListener("DOMContentLoaded", function(event) { RedirectorOverlay.onDOMContentLoaded(event); }, true); -window.addEventListener("unload", function(event) { RedirectorOverlay.onUnload(event); }, false);
\ No newline at end of file +window.addEventListener("unload", function(event) { RedirectorOverlay.onUnload(event); }, false); diff --git a/chrome/content/overlay.xul b/chrome/content/overlay.xul index f46bfcf..9c4619e 100644 --- a/chrome/content/overlay.xul +++ b/chrome/content/overlay.xul @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- $Id$ --> -<?xml-stylesheet href="chrome://redirector/skin/overlay.css" type="text/css"?> <!DOCTYPE overlay SYSTEM "chrome://redirector/locale/redirector.dtd"> <overlay id="redirector-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> diff --git a/chrome/content/redirect.xul b/chrome/content/redirect.xul index e808fc4..aea930b 100644 --- a/chrome/content/redirect.xul +++ b/chrome/content/redirect.xul @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://redirector/locale/redirect.dtd">
<dialog title="&redirectWindow.title;"
diff --git a/chrome/content/redirectList.js b/chrome/content/redirectList.js index c50583b..cd8c550 100644 --- a/chrome/content/redirectList.js +++ b/chrome/content/redirectList.js @@ -1,5 +1,8 @@ +//// $Id$ var Redirector = Components.classes["@einaregilsson.com/redirector;1"].getService(Components.interfaces.nsISupports).wrappedJSObject; +const Cc = Components.classes; +const Ci = Components.interfaces; function $(id) { return document.getElementById(id); @@ -45,6 +48,21 @@ var RedirectList = { } }, + openHelp : function() {
+ var windowName = "redirectorHelp";
+ var windowsMediator = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
+ var win;
+ var iter = windowsMediator.getEnumerator(null);
+ while (iter.hasMoreElements()) {
+ win = iter.getNext();
+ if (win.name == windowName) {
+ win.focus();
+ return;
+ }
+ }
+ window.openDialog("chrome://redirector/content/help.html", windowName, "chrome,dialog,resizable=yes,location=0,toolbar=0,status=0,width=800px,height=600px,centerscreen", this);
+ },
+ close : function() { window.close(); }, diff --git a/chrome/content/redirectList.xul b/chrome/content/redirectList.xul index 630c364..f43a0b1 100644 --- a/chrome/content/redirectList.xul +++ b/chrome/content/redirectList.xul @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id -->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE dialog SYSTEM "chrome://redirector/locale/redirectList.dtd">
<window title="&window.title;"
@@ -41,9 +42,11 @@ <button id="btnEdit" onclick="RedirectList.editRedirect();" label="&btnEdit.label;" disabled="true" />
<button id="btnDelete" onclick="RedirectList.deleteRedirect();" label="&btnDelete.label;" disabled="true" />
<button id="btnClose" onclick="RedirectList.close();" label="&btnClose.label;"/>
- <button id="btnHelp" onclick="Redirector.openHelp();" label="&btnHelp.label;"/>
+ <button id="btnHelp" onclick="RedirectList.openHelp();" label="&btnHelp.label;"/>
+ <!-- TODO: include in v2.0
<button id="btnUp" onclick="RedirectList.moveUp();" label="UP" disabled="false" />
<button id="btnDown" onclick="RedirectList.moveDown();" label="Down" />
+ -->
</hbox>
</vbox>
</window>
|