Skip to content

Instantly share code, notes, and snippets.

@1stvamp
Created September 4, 2019 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1stvamp/c92394fdd3c9f945a10a3edc7f3ac0bb to your computer and use it in GitHub Desktop.
Save 1stvamp/c92394fdd3c9f945a10a3edc7f3ac0bb to your computer and use it in GitHub Desktop.
Open GitHub issue description links in a new tab when rendering on app.zenhub.com
var mutationObserver = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
Array.prototype.forEach.call(document.querySelectorAll('.zhc-markdown a'), function(el, i) {
el.setAttribute('target', '_blank')
})
})
})
mutationObserver.observe(document.documentElement, {
childList: true,
subtree: true
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment