summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Bookmarklet.js
Unidiff
Diffstat (limited to 'frontend/gamma/js/Bookmarklet.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Bookmarklet.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Bookmarklet.js b/frontend/gamma/js/Bookmarklet.js
index a8e3e69..bcdcc46 100644
--- a/frontend/gamma/js/Bookmarklet.js
+++ b/frontend/gamma/js/Bookmarklet.js
@@ -1,72 +1,69 @@
1/* 1/*
2 2
3Copyright 2008-2011 Clipperz Srl 3Copyright 2008-2011 Clipperz Srl
4 4
5This file is part of Clipperz's Javascript Crypto Library. 5This file is part of Clipperz Community Edition.
6Javascript Crypto Library provides web developers with an extensive 6Clipperz Community Edition is an online password manager.
7and efficient set of cryptographic functions. The library aims to
8obtain maximum execution speed while preserving modularity and
9reusability.
10For further information about its features and functionalities please 7For further information about its features and functionalities please
11refer to http://www.clipperz.com 8refer 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
29clipperz_copiedContentToClipboard = false; 26clipperz_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
36var ZeroClipboard = { 33var 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+17bFwPfjzT3k691aEDPGb92KBvNX1krmrOjqLNVrVLLb7K1ln9e3WlsVjd0/Um12XXcyPFy6ZHdyHHDkT5tt1JtF/rJerqn6Wu+F/ErsWCmPyiRjrYi54KlgZP/k2Tq9gPYSh5APZOYBVra2VicAtfyn+4qZwHt2E4rVJvszPH2HNcVD2lkS5eOxW3b9f1AtplzZkeKFdDLl/wkibodmyrUsmq241raYdye5ECpdrBf+2GQf0nc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ZE7q5rpsburmpm490U+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 //moviePath: './ZeroClipboard.swf', 41 //moviePath: './ZeroClipboard.swf',
45 nextId: 1, // ID of next movie 42 nextId: 1, // ID of next movie
46 43
47 $: function(thingy) { 44 $: function(thingy) {
48 // simple DOM lookup utility function 45 // simple DOM lookup utility function
49 if (typeof(thingy) == 'string') thingy = document.getElementById(thingy); 46 if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
50 if (!thingy.addClass) { 47 if (!thingy.addClass) {
51 // extend element with a few useful methods 48 // extend element with a few useful methods
52 thingy.hide = function() { this.style.display = 'none'; }; 49 thingy.hide = function() { this.style.display = 'none'; };
53 thingy.show = function() { this.style.display = ''; }; 50 thingy.show = function() { this.style.display = ''; };
54 thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; }; 51 thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
55 thingy.removeClass = function(name) { 52 thingy.removeClass = function(name) {
56 this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, ''); 53 this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, '');
57 }; 54 };
58 thingy.hasClass = function(name) { 55 thingy.hasClass = function(name) {
59 return !!this.className.match( new RegExp("\\s*" + name + "\\s*") ); 56 return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
60 } 57 }
61 } 58 }
62 return thingy; 59 return thingy;
63 }, 60 },
64 61
65 setMoviePath: function(path) { 62 setMoviePath: function(path) {
66 // set path to ZeroClipboard.swf 63 // set path to ZeroClipboard.swf
67 this.moviePath = path; 64 this.moviePath = path;
68 }, 65 },
69 66
70 dispatch: function(id, eventName, args) { 67 dispatch: function(id, eventName, args) {
71 // receive event from flash movie, send to client 68 // receive event from flash movie, send to client
72 var client = this.clients[id]; 69 var client = this.clients[id];