diff options
author | Kohei Yoshino <kohei.yoshino@gmail.com> | 2018-01-03 16:29:38 +0100 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-01-03 16:29:38 +0100 |
commit | 1ece54f087f04778b21e94cc52084bec629fc012 (patch) | |
tree | 88ed1bd524f4ec4bad0ac30af4312808749ea9dc /extensions/BugModal/web/common_bug_modal.js | |
parent | 7b8975d8f53e882ad74f0c11b20beae4efebaafc (diff) | |
download | bugzilla-1ece54f087f04778b21e94cc52084bec629fc012.tar.gz bugzilla-1ece54f087f04778b21e94cc52084bec629fc012.tar.xz |
Bug 1427656 - Remove ZeroClipboard helper
Diffstat (limited to 'extensions/BugModal/web/common_bug_modal.js')
-rw-r--r-- | extensions/BugModal/web/common_bug_modal.js | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/extensions/BugModal/web/common_bug_modal.js b/extensions/BugModal/web/common_bug_modal.js index a06b391d9..cc7f31dfd 100644 --- a/extensions/BugModal/web/common_bug_modal.js +++ b/extensions/BugModal/web/common_bug_modal.js @@ -314,41 +314,7 @@ $(function() { }); } else { - // we don't know if flash is enabled without waiting for load to timeout - // remember the flash enabled state between pages - var hasFlash = true; - if (localStorage.getItem('hasFlash') === null) { - $('#copy-summary').hide(); - } - else { - hasFlash = localStorage.getItem('hasFlash'); - } - if (hasFlash) { - var s = document.createElement("script"); - s.onload = function () { - ZeroClipboard.config({ flashLoadTimeout: 5000 }); - var zero = new ZeroClipboard($('#copy-summary')); - zero.on({ - 'ready': function(event) { - $('#copy-summary').show(); - localStorage.setItem('hasFlash', true); - }, - 'error': function(event) { - console.log(event.message); - zero.destroy(); - $('#global-zeroclipboard-html-bridge').remove(); - $('#copy-summary').hide(); - localStorage.removeItem('hasFlash'); - }, - 'copy': function(event) { - var clipboard = event.clipboardData; - clipboard.setData('text/plain', clipboardSummary()); - } - }); - }; - s.src = "extensions/BugModal/web/ZeroClipboard/ZeroClipboard.min.js"; - document.getElementsByTagName('head')[0].appendChild(s); - } + $('#copy-summary').hide(); } } |