Last active
December 21, 2015 12:29
-
-
Save 4rn0/6306332 to your computer and use it in GitHub Desktop.
JS version of https://gist.github.com/vasilisvg/6300485
This file contains hidden or 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
<a href="http://causeyoucantyouwontandyoudontstop.com/" class="kick-it">Kick it!</a> |
This file contains hidden or 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) { | |
var v = ['qORYO0atB6g', 'z5rRZdiu1UE', 'uvRBUw_Ls2o', 'BptQHAW2T5M', 'eBShN8qT4lk', '07Y0cy-nvAg', 'Xf1YF_MH1xc', 'evA-R9OS-Vo', 'ru3gH27Fn6E', 'Z6xsKsJqVyg', 'D4-F6QFcNxQ', 'XflfiylNNXY'], | |
e = d.querySelectorAll('a.kick-it'), | |
l = e.length; | |
for (var i = 0; i < l; i++) { | |
e[i].href = 'https://www.youtube.com/watch?v=' + v[Math.floor(Math.random() * v.length)]; | |
} | |
}(document)); | |
// or minified | |
// (function(e){var t=["qORYO0atB6g","z5rRZdiu1UE","uvRBUw_Ls2o","BptQHAW2T5M","eBShN8qT4lk","07Y0cy-nvAg","Xf1YF_MH1xc","evA-R9OS-Vo","ru3gH27Fn6E","Z6xsKsJqVyg","D4-F6QFcNxQ","XflfiylNNXY"],n=e.querySelectorAll("a.kick-it"),r=n.length;for(var i=0;i<r;i++){n[i].href="https://www.youtube.com/watch?v="+t[Math.floor(Math.random()*t.length)]}})(document) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I put up a smaller version over in a fork, and brought back comments to see what video ID is what song: Zegnat/6333616.