Bump Clipboard.js

This commit is contained in:
nicolas.dorier 2022-01-12 16:06:28 +09:00
parent 4c032e9e6a
commit a02ad104ee
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
5 changed files with 626 additions and 465 deletions

View File

@ -283,6 +283,10 @@ namespace BTCPayServer.Tests
var version = Regex.Match(actual, "Bootstrap v([0-9]+.[0-9]+.[0-9]+)").Groups[1].Value; var version = Regex.Match(actual, "Bootstrap v([0-9]+.[0-9]+.[0-9]+)").Groups[1].Value;
var expected = await (await client.GetAsync($"https://cdn.jsdelivr.net/npm/bootstrap@{version}/dist/js/bootstrap.bundle.min.js")).Content.ReadAsStringAsync(); var expected = await (await client.GetAsync($"https://cdn.jsdelivr.net/npm/bootstrap@{version}/dist/js/bootstrap.bundle.min.js")).Content.ReadAsStringAsync();
Assert.Equal(expected, actual.Replace("\r\n", "\n", StringComparison.OrdinalIgnoreCase)); Assert.Equal(expected, actual.Replace("\r\n", "\n", StringComparison.OrdinalIgnoreCase));
actual = GetFileContent("BTCPayServer", "wwwroot", "vendor", "clipboard.js", "clipboard.js");
expected = await (await client.GetAsync($"https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.8/clipboard.js")).Content.ReadAsStringAsync();
Assert.Equal(expected, actual.Replace("\r\n", "\n", StringComparison.OrdinalIgnoreCase));
} }
string GetFileContent(params string[] path) string GetFileContent(params string[] path)
{ {

View File

@ -122,12 +122,12 @@
}); });
$(document).ready(function() { $(document).ready(function() {
// Clipboard Copy // Clipboard Copy
var copySpan = new Clipboard('._copySpan', { var copySpan = new ClipboardJS('._copySpan', {
target: function(trigger) { target: function(trigger) {
return copyElement(trigger, 0, 65).firstChild; return copyElement(trigger, 0, 65).firstChild;
} }
}); });
var copyInput = new Clipboard('._copyInput', { var copyInput = new ClipboardJS('._copyInput', {
target: function(trigger) { target: function(trigger) {
return copyElement(trigger, 4, 65).firstChild; return copyElement(trigger, 4, 65).firstChild;
} }

View File

@ -128,12 +128,12 @@
$(document).ready(function() { $(document).ready(function() {
// Clipboard Copy // Clipboard Copy
var copySpan = new Clipboard('._copySpan', { var copySpan = new ClipboardJS('._copySpan', {
target: function(trigger) { target: function(trigger) {
return copyElement(trigger, 0, 65).firstChild; return copyElement(trigger, 0, 65).firstChild;
} }
}); });
var copyInput = new Clipboard('._copyInput', { var copyInput = new ClipboardJS('._copyInput', {
target: function(trigger) { target: function(trigger) {
return copyElement(trigger, 4, 65).firstChild; return copyElement(trigger, 4, 65).firstChild;
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long