Fix selector for codblock copy button
The selector used `button.md-clipboard`, but the copy button does not have this class, causing the selector to fail to match. This switches that class for the current copy button's class.
This commit is contained in:
1 parent
d3b0fdad45
commit
f658879ea1
1 file changed
+1
-1
@@ -4,7 +4,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
||||
|
||||
function fixCopyOnlyUserSelectable() {
|
||||
buttonsToFix = document.querySelectorAll(
|
||||
'.language-console button.md-clipboard');
|
||||
'.language-console button.md-code__button');
|
||||
if (buttonsToFix.length)
|
||||
console.log('Fixing copy-to-clipboard text of console code-blocks.');
|
||||
buttonsToFix.forEach((btn) => {
|
||||
|
||||
Reference in new issue
Block a user