Created
April 7, 2022 00:55
-
-
Save meyt/c912487058fd23fddb2c082fffe7ee2c to your computer and use it in GitHub Desktop.
goftino nuxt plugin
This file contains 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
export default (ctx) => { | |
if (process.env.NODE_ENV !== 'production') return | |
const i = '<CLIENT_KEY>' | |
const s = 'https://www.goftino.com/widget/' + i | |
const l = window.localStorage.getItem('goftino_' + i) | |
const g = document.createElement('script') | |
g.async = true | |
g.src = l ? s + '?o=' + l : s | |
document.getElementsByTagName('head')[0].appendChild(g) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment