Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created October 27, 2019 21:05
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 tomhodgins/fc5a37658d27f66a2b8a7e3c8e5e6228 to your computer and use it in GitHub Desktop.
Save tomhodgins/fc5a37658d27f66a2b8a7e3c8e5e6228 to your computer and use it in GitHub Desktop.
// Toggle VisBug
(() => {
if (document.querySelector('vis-bug')) {
document.querySelector('vis-bug').remove()
} else {
const script = document.createElement('script')
const tag = document.createElement('vis-bug')
script.src = 'https://visbug.web.app/bundle.js'
document.head.appendChild(script)
document.body.appendChild(tag)
}
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment