-rw-r--r-- | content/generated-content.js | 4 | ||||
-rw-r--r-- | content/generated-content.xul | 1 | ||||
-rw-r--r-- | locale/en-US/fireflix.dtd | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/content/generated-content.js b/content/generated-content.js index 0ad08bb..f9addd6 100644 --- a/content/generated-content.js +++ b/content/generated-content.js | |||
@@ -13,5 +13,9 @@ var generated = { | |||
13 | var ch = Components.classes["@mozilla.org/widget/clipboardhelper;1"] | 13 | var ch = Components.classes["@mozilla.org/widget/clipboardhelper;1"] |
14 | .getService(Components.interfaces.nsIClipboardHelper); | 14 | .getService(Components.interfaces.nsIClipboardHelper); |
15 | ch.copyString(this.data); | 15 | ch.copyString(this.data); |
16 | }, | ||
17 | nolf: function() { | ||
18 | this.databox.value = this.data.replace(/[\r\n]/,''); | ||
19 | document.getElementById('nolf').disabled = true; | ||
16 | } | 20 | } |
17 | }; | 21 | }; |
diff --git a/content/generated-content.xul b/content/generated-content.xul index 2a91efa..fd508c2 100644 --- a/content/generated-content.xul +++ b/content/generated-content.xul | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | <vbox class="generated wholething" flex="1"> | 16 | <vbox class="generated wholething" flex="1"> |
17 | <textbox flex="1" minheight="300" minwidth="300" id="data" multiline="true" readonly="true" /> | 17 | <textbox flex="1" minheight="300" minwidth="300" id="data" multiline="true" readonly="true" /> |
18 | <button id="nolf" label="&generated.nolf;" oncommand="generated.nolf()" /> | ||
18 | <button id="copy" label="&generated.copy;" oncommand="generated.copy()" /> | 19 | <button id="copy" label="&generated.copy;" oncommand="generated.copy()" /> |
19 | </vbox> | 20 | </vbox> |
20 | </dialog> | 21 | </dialog> |
diff --git a/locale/en-US/fireflix.dtd b/locale/en-US/fireflix.dtd index 0e158c3..46409ed 100644 --- a/locale/en-US/fireflix.dtd +++ b/locale/en-US/fireflix.dtd | |||
@@ -73,6 +73,7 @@ | |||
73 | 73 | ||
74 | <!ENTITY generated.title "Fireflix: Generated content"> | 74 | <!ENTITY generated.title "Fireflix: Generated content"> |
75 | <!ENTITY generated.copy "copy"> | 75 | <!ENTITY generated.copy "copy"> |
76 | <!ENTITY generated.nolf "remove linebreaks"> | ||
76 | 77 | ||
77 | <!ENTITY browser.sidebar.label "Fireflix"> | 78 | <!ENTITY browser.sidebar.label "Fireflix"> |
78 | <!ENTITY browser.sidebar.title "Fireflix"> | 79 | <!ENTITY browser.sidebar.title "Fireflix"> |