diff --git a/.gitignore b/.gitignore index 394ad62..211dc08 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,8 @@ /_site /node_modules /.bundle -assets/vendor/zeroclipboard/docs -assets/vendor/zeroclipboard/src -assets/vendor/zeroclipboard/test +assets/vendor/clipboard/src +assets/vendor/clipboard/test assets/vendor/selectivizr/tests assets/vendor/qtip2/basic /vendor diff --git a/_config.yml b/_config.yml index 4ecdc5f..31005b8 100644 --- a/_config.yml +++ b/_config.yml @@ -35,7 +35,7 @@ exclude: - test - tests - assets/vendor/selectivizr/tests - - assets/vendor/zeroclipboard/test + - assets/vendor/clipboard/test gems: - jekyll-sitemap diff --git a/_includes/footer.html b/_includes/footer.html index d36ac59..ffb31ef 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -18,7 +18,7 @@ {% if page.collection == "licenses" or page.class == "license-types" %} - + diff --git a/_includes/sidebar.html b/_includes/sidebar.html index 72dfeff..9dc3a60 100644 --- a/_includes/sidebar.html +++ b/_includes/sidebar.html @@ -1,6 +1,6 @@
diff --git a/assets/js/app.coffee b/assets/js/app.coffee
index 2955269..b486c36 100644
--- a/assets/js/app.coffee
+++ b/assets/js/app.coffee
@@ -54,22 +54,16 @@ class Choosealicense
false
- # Initializes ZeroClipboard
+ # Initializes Clipboard.js
initClipboard: ->
# Backup the clipboard button's original text.
$(".js-clipboard-button").data "clipboard-prompt", $(".js-clipboard-button").text()
# Hook up copy to clipboard buttons
- clip = new ZeroClipboard $(".js-clipboard-button"),
- moviePath: "/assets/vendor/zeroclipboard/ZeroClipboard.swf"
+ clip = new Clipboard ".js-clipboard-button"
clip.on "mouseout", @clipboardMouseout
clip.on "complete", @clipboardComplete
- # Fallback if flash is not available
- $(".js-clipboard-button").click (e) =>
- target = "#" + $(e.target).data("clipboard-target")
- @selectText $(target)[0]
-
# Callback to restore the clipboard button's original text
clipboardMouseout: (client, args) ->
@textContent = $(this).data("clipboard-prompt")
diff --git a/assets/vendor/clipboard/.bower.json b/assets/vendor/clipboard/.bower.json
new file mode 100644
index 0000000..c9e2647
--- /dev/null
+++ b/assets/vendor/clipboard/.bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "clipboard",
+ "version": "1.4.3",
+ "description": "Modern copy to clipboard. No Flash. Just 2kb",
+ "license": "MIT",
+ "main": "dist/clipboard.js",
+ "ignore": [
+ "/.*/",
+ "/example/",
+ "/test/",
+ "/.*",
+ "/bower.json",
+ "/karma.conf.js"
+ ],
+ "keywords": [
+ "clipboard",
+ "copy",
+ "cut"
+ ],
+ "homepage": "https://github.com/zenorocha/clipboard.js",
+ "_release": "1.4.3",
+ "_resolution": {
+ "type": "version",
+ "tag": "v1.4.3",
+ "commit": "705e2dbefdf40911ee2fe266a514b982d3edd0b6"
+ },
+ "_source": "git://github.com/zenorocha/clipboard.js.git",
+ "_target": "~1.4.3",
+ "_originalSource": "clipboard",
+ "_direct": true
+}
\ No newline at end of file
diff --git a/assets/vendor/clipboard/bower.json b/assets/vendor/clipboard/bower.json
new file mode 100644
index 0000000..af62958
--- /dev/null
+++ b/assets/vendor/clipboard/bower.json
@@ -0,0 +1,20 @@
+{
+ "name": "clipboard",
+ "version": "1.4.3",
+ "description": "Modern copy to clipboard. No Flash. Just 2kb",
+ "license": "MIT",
+ "main": "dist/clipboard.js",
+ "ignore": [
+ "/.*/",
+ "/example/",
+ "/test/",
+ "/.*",
+ "/bower.json",
+ "/karma.conf.js"
+ ],
+ "keywords": [
+ "clipboard",
+ "copy",
+ "cut"
+ ]
+}
diff --git a/assets/vendor/clipboard/contributing.md b/assets/vendor/clipboard/contributing.md
new file mode 100644
index 0000000..9ab2c8f
--- /dev/null
+++ b/assets/vendor/clipboard/contributing.md
@@ -0,0 +1,28 @@
+# Contributing guide
+
+Want to contribute to Clipboard.js? Awesome!
+There are many ways you can contribute, see below.
+
+## Opening issues
+
+Open an issue to report bugs or to propose new features.
+
+- Reporting bugs: describe the bug as clearly as you can, including steps to reproduce, what happened and what you were expecting to happen. Also include browser version, OS and other related software's (npm, Node.js, etc) versions when applicable.
+
+- Proposing features: explain the proposed feature, what it should do, why it is useful, how users should use it. Give us as much info as possible so it will be easier to discuss, access and implement the proposed feature. When you're unsure about a certain aspect of the feature, feel free to leave it open for others to discuss and find an appropriate solution.
+
+## Proposing pull requests
+
+Pull requests are very welcome. Note that if you are going to propose drastic changes, be sure to open an issue for discussion first, to make sure that your PR will be accepted before you spend effort coding it.
+
+Fork the Clipboard.js repository, clone it locally and create a branch for your proposed bug fix or new feature. Avoid working directly on the master branch.
+
+Implement your bug fix or feature, write tests to cover it and make sure all tests are passing (run a final `npm test` to make sure everything is correct). Then commit your changes, push your bug fix/feature branch to the origin (your forked repo) and open a pull request to the upstream (the repository you originally forked)'s master branch.
+
+## Documentation
+
+Documentation is extremely important and takes a fair deal of time and effort to write and keep updated. Please submit any and all improvements you can make to the repository's docs.
+
+## Known issues
+If you're using npm@3 you'll probably face some issues related to peerDependencies.
+https://github.com/npm/npm/issues/9204
diff --git a/assets/vendor/clipboard/dist/clipboard.js b/assets/vendor/clipboard/dist/clipboard.js
new file mode 100644
index 0000000..99e4704
--- /dev/null
+++ b/assets/vendor/clipboard/dist/clipboard.js
@@ -0,0 +1,587 @@
+/*!
+ * clipboard.js v1.4.3
+ * https://zenorocha.github.io/clipboard.js
+ *
+ * Licensed MIT © Zeno Rocha
+ */
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Clipboard = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o