app/assets/javascripts/zeroclipboard/ZeroClipboard.js in zeroclipboard-rails-0.0.8 vs app/assets/javascripts/zeroclipboard/ZeroClipboard.js in zeroclipboard-rails-0.0.9
- old
+ new
@@ -2,11 +2,11 @@
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
* Copyright (c) 2013 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
-* v1.2.2
+* v1.2.3
*/
(function() {
"use strict";
var _camelizeCssPropName = function() {
var matcherRegex = /\-([a-z])/g, replacerFn = function(match, group) {
@@ -261,11 +261,11 @@
return this;
};
var _setHandCursor = function(enabled) {
if (this.ready()) this.flashBridge.setHandCursor(enabled);
};
- ZeroClipboard.version = "1.2.2";
+ ZeroClipboard.version = "1.2.3";
var _defaults = {
moviePath: "ZeroClipboard.swf",
trustedOrigins: null,
text: null,
hoverClass: "zeroclipboard-is-hover",
@@ -298,10 +298,11 @@
return hasFlash;
};
var _amdModuleId = null;
var _cjsModuleId = null;
var _bridge = function() {
+ var flashBridge, len;
var client = ZeroClipboard.prototype._singleton;
var container = document.getElementById("global-zeroclipboard-html-bridge");
if (!container) {
var opts = {};
for (var ko in client.options) opts[ko] = client.options[ko];
@@ -321,11 +322,15 @@
container.style.zIndex = "9999";
container.innerHTML = html;
document.body.appendChild(container);
}
client.htmlBridge = container;
- client.flashBridge = document["global-zeroclipboard-flash-bridge"] || container.children[0].lastElementChild;
+ flashBridge = document["global-zeroclipboard-flash-bridge"];
+ if (flashBridge && (len = flashBridge.length)) {
+ flashBridge = flashBridge[len - 1];
+ }
+ client.flashBridge = flashBridge || container.children[0].lastElementChild;
};
ZeroClipboard.prototype.resetBridge = function() {
this.htmlBridge.style.left = "-9999px";
this.htmlBridge.style.top = "-9999px";
this.htmlBridge.removeAttribute("title");
@@ -464,6 +469,6 @@
_cjsModuleId = module.id || null;
module.exports = ZeroClipboard;
} else {
window.ZeroClipboard = ZeroClipboard;
}
-})();
+})();
\ No newline at end of file