Diffstat (limited to 'content/generated-content.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | content/generated-content.js | 4 |
1 files changed, 4 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 | |||
@@ -1,17 +1,21 @@ | |||
1 | var generated = { | 1 | var generated = { |
2 | fireflix: null, | 2 | fireflix: null, |
3 | data: null, | 3 | data: null, |
4 | 4 | ||
5 | init: function() { | 5 | init: function() { |
6 | this.fireflix = window.arguments[0]; | 6 | this.fireflix = window.arguments[0]; |
7 | this.data = window.arguments[1]; | 7 | this.data = window.arguments[1]; |
8 | this.databox = document.getElementById('data'); | 8 | this.databox = document.getElementById('data'); |
9 | this.databox.value = this.data; | 9 | this.databox.value = this.data; |
10 | this.databox.select(); | 10 | this.databox.select(); |
11 | }, | 11 | }, |
12 | copy: function() { | 12 | copy: function() { |
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 | }; |