]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Replacement for #20602 (#21236)
authorMark Otto <markd.otto@gmail.com>
Mon, 28 Nov 2016 21:10:19 +0000 (13:10 -0800)
committerGitHub <noreply@github.com>
Mon, 28 Nov 2016 21:10:19 +0000 (13:10 -0800)
* Fixed incorrect instruction: "Press ⌘ to copy"

It needed to be "Press ⌘C to copy"

* Updated to concatenate copy string

Updated copy command to concatenated string to prevent potential issues

* Updated the way the copy string concatenates

As per excellent suggestion by @tomlutzenberger

* Removed semicolon line endings

;P

* var not const or let

docs/assets/js/src/application.js

index 4f72ef13babc8bbfd6b9152f8f57fae99a227971..9588d540937aa3ca853654ddd48bd05a183d600a 100644 (file)
@@ -73,7 +73,8 @@
     })
 
     clipboard.on('error', function (e) {
-      var fallbackMsg = /Mac/i.test(navigator.userAgent) ? 'Press \u2318 to copy' : 'Press Ctrl-C to copy'
+      var modifierKey = /Mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-'
+      var fallbackMsg = 'Press ' + modifierKey + 'C to copy'
 
       $(e.trigger)
         .attr('title', fallbackMsg)