Created
November 20, 2020 16:36
-
-
Save kezzyhko/581ad7cfc43a4392c49232f8a3d5fbb8 to your computer and use it in GitHub Desktop.
Script, which splits "GitHub Gist" logo in two parts: link to Github and link to Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a = document.querySelector('a[aria-label="Gist Homepage "]'); | |
| githubSvg = document.querySelector('.octicon-logo-github'); | |
| gistSvg = document.querySelector('.octicon-logo-gist'); | |
| var githubLink = a.cloneNode(false); | |
| githubLink.href = "https://github.com"; | |
| githubLink.appendChild(githubSvg); | |
| var gistLink = a.cloneNode(false); | |
| gistLink.appendChild(gistSvg); | |
| linksParent = document.querySelector('.Header-item'); | |
| linksParent.appendChild(githubLink); | |
| linksParent.appendChild(document.createTextNode(' ')); | |
| linksParent.appendChild(gistLink); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment