Diffstat (limited to 'frontend/gamma/js/Bookmarklet_2.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Bookmarklet_2.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Bookmarklet_2.js b/frontend/gamma/js/Bookmarklet_2.js index f9c40a9..02f7de8 100644 --- a/frontend/gamma/js/Bookmarklet_2.js +++ b/frontend/gamma/js/Bookmarklet_2.js | |||
@@ -1,72 +1,69 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | clipperz_copiedContentToClipboard = false; | 26 | clipperz_copiedContentToClipboard = false; |
30 | 27 | ||
31 | //############################################################################# | 28 | //############################################################################# |
32 | 29 | ||
33 | // Simple Set Clipboard System | 30 | // Simple Set Clipboard System |
34 | // Author: Joseph Huckaby | 31 | // Author: Joseph Huckaby |
35 | 32 | ||
36 | var ZeroClipboard = { | 33 | var ZeroClipboard = { |
37 | 34 | ||
38 | version: "1.0.4", | 35 | version: "1.0.4", |
39 | clients: {}, // registered upload clients on page, indexed by id | 36 | clients: {}, // registered upload clients on page, indexed by id |
40 | //moviePath: 'ZeroClipboard.swf', // URL to movie | 37 | //moviePath: 'ZeroClipboard.swf', // URL to movie |
41 | //moviePath: 'data:application/octet-stream;charset=utf-8;base64,Q1dTCYgGAAB4nH1V61LbRhTeXV2OJNsYczFgIEC4JCGABSRpSy+B2JDQQtWJocl0BqK1tUZqhOSRZAj/8ih9hz5AXsGZTl+ndHUhxU2nO56z3/l05uye7+wc6xr6DeUxqpcUhFCNXF9ffxjNcYhRo8U8NruO0IeRLTkm+BpEa4i8/+t3GRGUrRf5tktDe41dMC8Kpd14Q/DM911GPfHCd6zCLyzwa67Tafo0sAppuOWEHZdeyY1O4ERMbnajyPcKIYteUM+qdYPQD/It12m9jX2XBcSx5EYUON6ZwunOEXsXAY+O94HsAu8iFnjULe1mYN/je5u2WLnvAsnRNGrZ6rnfDZlxwQKxRV1XSd1ulPJ1/9KDBB13pDCiZ2ygEdsGj2WHvsXU3dc7taM3e/tHanjDZVqEV2HEzpUGa3V5dVd4Ocfz+5d1/5w6nnbgU4sF+17bFwPfjzT3k691aEDPGb92KBvNX1krmrOjqLNVrV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9Udwefz9xjk9Vhl3crtjqqXwifS8hWzblJToZmylTbk+vYuMOjsECWjZnkuDZvTmcwbscGvOiKVcxXThZNGVjkQebS+17pmLcJwl8sI1v4PI2uYEPt4UbuLItxrCwoplgrMagaOZTENf2NK0NryE8gWRCVE3p6ae5j3aOFwyZb8of6RT3FYn7Y9yvmjlDx1mKGncSfVTC9Z/v6QyZE7q5rpsburmpm490U+K/12g6WXYc+nR4CKX/H31zGG1z5m9Pt5okCg==', |
42 | //moviePath: 'http://localhost:8000/tests/js/tests/Bookmarklet/ZeroClipboard.swf', | 39 | //moviePath: 'http://localhost:8000/tests/js/tests/Bookmarklet/ZeroClipboard.swf', |
43 | moviePath: 'http://www.clipperz.com/files/clipperz.com/bookmarklet/0.3.0/ZeroClipboard_1.0.4.swf', | 40 | moviePath: 'http://www.clipperz.com/files/clipperz.com/bookmarklet/0.3.0/ZeroClipboard_1.0.4.swf', |
44 | nextId: 1, // ID of next movie | 41 | nextId: 1, // ID of next movie |
45 | 42 | ||
46 | $: function(thingy) { | 43 | $: function(thingy) { |
47 | // simple DOM lookup utility function | 44 | // simple DOM lookup utility function |
48 | if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); | 45 | if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); |
49 | if (!thingy.addClass) { | 46 | if (!thingy.addClass) { |
50 | // extend element with a few useful methods | 47 | // extend element with a few useful methods |
51 | thingy.hide = function() { this.style.display = 'none'; }; | 48 | thingy.hide = function() { this.style.display = 'none'; }; |
52 | thingy.show = function() { this.style.display = ''; }; | 49 | thingy.show = function() { this.style.display = ''; }; |
53 | thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; | 50 | thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; |
54 | thingy.removeClass = function(name) { | 51 | thingy.removeClass = function(name) { |
55 | this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); | 52 | this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); |
56 | }; | 53 | }; |
57 | thingy.hasClass = function(name) { | 54 | thingy.hasClass = function(name) { |
58 | return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); | 55 | return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); |
59 | } | 56 | } |
60 | } | 57 | } |
61 | return thingy; | 58 | return thingy; |
62 | }, | 59 | }, |
63 | 60 | ||
64 | setMoviePath: function(path) { | 61 | setMoviePath: function(path) { |
65 | // set path to ZeroClipboard.swf | 62 | // set path to ZeroClipboard.swf |
66 | this.moviePath = path; | 63 | this.moviePath = path; |
67 | }, | 64 | }, |
68 | 65 | ||
69 | dispatch: function(id, eventName, args) { | 66 | dispatch: function(id, eventName, args) { |
70 | // receive event from flash movie, send to client | 67 | // receive event from flash movie, send to client |
71 | var client = this.clients[id]; | 68 | var client = this.clients[id]; |
72 | if (client) { | 69 | if (client) { |