Created
July 30, 2014 02:38
-
-
Save cletusc/3934632a2cf0a36fd0fb to your computer and use it in GitHub Desktop.
Tests externally embedding a userscript in the page to trigger an install. See https://github.com/cletusc/Userscript--Twitch-Chat-Emotes/issues/52
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
// ==UserScript== | |
// @name Embedding Twitch Chat Emotes as userscript | |
// @namespace #Cletus | |
// @description Tests externally embedding a userscript in the page to trigger an install. See https://github.com/cletusc/Userscript--Twitch-Chat-Emotes/issues/52 | |
// @include http://*.twitch.tv/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = 'https://rawgit.com/cletusc/Userscript--Twitch-Chat-Emotes/master/script.user.js'; | |
var head = document.querySelector('head'); | |
if (head) { | |
head.appendChild(script); | |
console.log('Appended script--did it trigger an install?') | |
} | |
else { | |
console.error('Could not find `head`.'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment