diff --git a/www/static/plugins/plugin.jsx b/www/static/plugins/plugin.jsx
index 4c14ff7790..d6cf74291f 100755
--- a/www/static/plugins/plugin.jsx
+++ b/www/static/plugins/plugin.jsx
@@ -2,40 +2,27 @@ var Preact = require('preact'),
h = require('preact').h,
createClass = require('preact-compat').createClass,
SupportedPlatforms = require('./supportedplatforms.jsx'),
- classNames = require('classnames'),
- ZeroClipboard = require('../js/lib/ZeroClipboard.js');
+ classNames = require('classnames');
var Plugin = createClass({
shouldComponentUpdate: function(nextProps, nextState) {
return this.props.plugin !== nextProps.plugin;
},
- setClipboardText: function() {
- if(this.props.plugin && this.props.flashEnabled) {
- var client = new ZeroClipboard(document.getElementById("copy-" + this.props.plugin.name));
- var copyText = "cordova plugin add " + this.props.plugin.name;
- client.off();
- client.on("copy", function(event) {
- event.clipboardData.setData("text/plain", copyText);
- });
- }
- },
- copyTextWithoutFlash: function() {
- if(!this.props.flashEnabled) {
- var range = document.createRange();
- range.selectNode(this.getDOMNode().getElementsByClassName("cordova-add-command")[0]);
+ copyText: function() {
+ var range = document.createRange();
+ range.selectNode(this.getDOMNode().getElementsByClassName("cordova-add-command")[0]);
- var select = window.getSelection();
- select.removeAllRanges();
- select.addRange(range);
+ var select = window.getSelection();
+ select.removeAllRanges();
+ select.addRange(range);
- try {
- document.execCommand("copy");
- } catch(e) {
- // Silently fail for now
- }
-
- select.removeAllRanges();
+ try {
+ document.execCommand("copy");
+ } catch(e) {
+ // Silently fail for now
}
+
+ select.removeAllRanges();
},
render: function() {
if(!this.props.plugin) {
@@ -73,7 +60,7 @@ var Plugin = createClass({
title="Copy cordova plugin add command to clipboard"
data-toggle="tooltip"
data-placement="auto"
- onClick={this.copyTextWithoutFlash} />
+ onClick={this.copyText} />
);
}
diff --git a/www/static/plugins/pluginlist.jsx b/www/static/plugins/pluginlist.jsx
index b31f437a55..b21d10a873 100755
--- a/www/static/plugins/pluginlist.jsx
+++ b/www/static/plugins/pluginlist.jsx
@@ -55,7 +55,7 @@ var PluginList = createClass({
} else {
for (var i = 0; i < InitialPageLength + this.state.searchPage * PageExtensionLength; i++) {
if (plugins[i]) {
- visiblePlugins.push(
);
+ visiblePlugins.push();
} else {
break;
}