Skip to content

Instantly share code, notes, and snippets.

@kezzyhko
Created November 20, 2020 16:36
Show Gist options
  • Select an option

  • Save kezzyhko/581ad7cfc43a4392c49232f8a3d5fbb8 to your computer and use it in GitHub Desktop.

Select an option

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
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