NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name YouTube for Horses // @namespace youtube-horses // @description Replaces all Youtube comments with neighs and whinnys. // @include https://www.youtube.com/* // @include https://apis.google.com/* // @include https://plus.googleapis.com/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js // @version 1.1 // @grant none // ==/UserScript== // An edit of the Herp Derp Youtube extension (http://www.tannr.com/herp-derp-youtube-comments/) this.$ = this.jQuery = jQuery.noConflict(true); function randomHorse() { this.horseOriginal = $(this).html(); $(this).click(function(e) { $(this).html(this.horseOriginal); }); var randomLength = (Math.floor(Math.random()*20)+1); var wordArray = new Array(); for(var x = 0; x < randomLength; x++) { randomBit = (Math.floor(Math.random() * 5) + 1); switch(randomBit) { case 1: case 2: wordArray[x] = 'neigh'; break; case 3: case 4: wordArray[x] = 'whinny'; break; default: wordArray[x] = 'snort'; break; } } // add horsed class $(this).addClass("horsed"); return wordArray.join(' '); } // only select un-horsed elements $('.Ct').not('.horsed').html(randomHorse); setInterval(function() { // only select un-horsed elements $('.Ct').not('.horsed').html(randomHorse); }, 100);