-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 @@ -10,8 +10,12 @@ var generated = { this.databox.select(); }, copy: function() { var ch = Components.classes["@mozilla.org/widget/clipboardhelper;1"] .getService(Components.interfaces.nsIClipboardHelper); ch.copyString(this.data); + }, + nolf: function() { + this.databox.value = this.data.replace(/[\r\n]/,''); + document.getElementById('nolf').disabled = true; } }; 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 @@ -12,9 +12,10 @@ > <script src="generated-content.js" type="application/x-javascript"/> <vbox class="generated wholething" flex="1"> <textbox flex="1" minheight="300" minwidth="300" id="data" multiline="true" readonly="true" /> + <button id="nolf" label="&generated.nolf;" oncommand="generated.nolf()" /> <button id="copy" label="&generated.copy;" oncommand="generated.copy()" /> </vbox> </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 @@ -70,12 +70,13 @@ <!ENTITY panel.uploads.remove.label "Remove"> <!ENTITY panel.uploads.add.label "Add"> <!ENTITY panel.uploads.generate_html "Generate HTML"> <!ENTITY generated.title "Fireflix: Generated content"> <!ENTITY generated.copy "copy"> +<!ENTITY generated.nolf "remove linebreaks"> <!ENTITY browser.sidebar.label "Fireflix"> <!ENTITY browser.sidebar.title "Fireflix"> <!ENTITY photosetprops.title "Photoset properties"> <!ENTITY photosetprops.set_title.label "Photoset title:"> |