mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
BZ-1879167 Fixes copy button code block misalignment
This commit is contained in:
committed by
openshift-cherrypick-robot
parent
c110faaee8
commit
1eb488bc44
@@ -1,5 +1,5 @@
|
||||
// This file runs the Clipboard.js functionality
|
||||
document.querySelectorAll('div.listingblock').forEach((codeblock, index) => {
|
||||
document.querySelectorAll('div.listingblock, div.literalblock').forEach((codeblock, index) => {
|
||||
codeblock.getElementsByTagName('pre')[0].insertAdjacentHTML("beforebegin", "<p class='clipboard-button-container'><span class='clipboard-button fa fa-clipboard'></span></p>");
|
||||
document.getElementsByTagName('pre')[index].setAttribute('id',`clipboard-${index}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user