Created
December 27, 2013 05:37
-
-
Save IskenHuang/8142982 to your computer and use it in GitHub Desktop.
inject script to html
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
javascript:!function(d,script){script=d.createElement("script"),script.type="text/javascript",script.async=!0,script.onload=function(){return TogetherJS(this),!1},script.src="https://togetherjs.com/togetherjs-min.js",d.getElementsByTagName("head")[0].appendChild(script)}(document); |
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
(function(d, script) { | |
script = d.createElement('script'); | |
script.type = 'text/javascript'; | |
script.async = true; | |
script.onload = function(){ | |
// remote script has loaded | |
TogetherJS(this); return false; | |
}; | |
script.src = 'https://togetherjs.com/togetherjs-min.js'; | |
d.getElementsByTagName('head')[0].appendChild(script); | |
}(document)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment