Merge pull request #3294 from NicolasDorier/fewouq

Bump Clipboard.js
This commit is contained in:
Nicolas Dorier 2022-01-12 16:59:36 +09:00 committed by GitHub
commit ffc0e996db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 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));
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)
{

View file

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

View file

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