From 54067d105b71f436eb29c83d11a32fe4af92a1cb Mon Sep 17 00:00:00 2001
From: Unknwon
Date: Fri, 31 Jan 2020 21:21:30 +0800
Subject: [PATCH] public/js: upgrade clipboard 1.5.9 to 2.0.4
---
public/assets/librejs/librejs.html | 2 +-
public/js/gogs.js | 2 +-
public/js/libs/clipboard-1.5.9.min.js | 7 -------
public/js/libs/clipboard-2.0.4.min.js | 7 +++++++
templates/base/footer.tmpl | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
delete mode 100755 public/js/libs/clipboard-1.5.9.min.js
create mode 100644 public/js/libs/clipboard-2.0.4.min.js
diff --git a/public/assets/librejs/librejs.html b/public/assets/librejs/librejs.html
index c43e2bd64..dc1ad8877 100755
--- a/public/assets/librejs/librejs.html
+++ b/public/assets/librejs/librejs.html
@@ -31,7 +31,7 @@
gogs.js |
- clipboard-1.5.9.min.js |
+ clipboard-2.0.4.min.js |
Expat |
clipboard-1.5.9.tar.gz |
diff --git a/public/js/gogs.js b/public/js/gogs.js
index e40c6206c..fb6630a33 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -1258,7 +1258,7 @@ $(document).ready(function () {
}
// Clipboard JS
- var clipboard = new Clipboard('.clipboard');
+ var clipboard = new ClipboardJS('.clipboard');
clipboard.on('success', function (e) {
e.clearSelection();
diff --git a/public/js/libs/clipboard-1.5.9.min.js b/public/js/libs/clipboard-1.5.9.min.js
deleted file mode 100755
index 35c4e1b9d..000000000
--- a/public/js/libs/clipboard-1.5.9.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * clipboard.js v1.5.9
- * https://zenorocha.github.io/clipboard.js
- *
- * Licensed MIT © Zeno Rocha
- */
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function r(c,s){if(!n[c]){if(!e[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var l=new Error("Cannot find module '"+c+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[c]={exports:{}};e[c][0].call(u.exports,function(t){var n=e[c][1][t];return r(n?n:t)},u,u.exports,t,e,n,o)}return n[c].exports}for(var i="function"==typeof require&&require,c=0;co;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,c=o.length;c>i;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(r,i){if("function"==typeof t&&t.amd)t(["module","select"],i);else if("undefined"!=typeof o)i(n,e("select"));else{var c={exports:{}};i(c,r.select),r.clipboardAction=c.exports}}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=n(e),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},c=function(){function t(t,e){for(var n=0;n
{{end}}
-
+
{{template "inject/footer" .}}