-
-
Save constancechen/6271189 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name horsemask | |
// @namespace https://brewspace.jiveland.com/* | |
// @include https://brewspace.jiveland.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
$j(document).ready(function(){ | |
$j("body").append('<div id="unicorn" style="z-index: 9999; position: fixed; top: 50px; right: -300px; width: 300px; height: 200px;"><img src="http://i.imgur.com/NSFD2fF.gif"></div>'); | |
$j("a.j-avatar").append('<span class="horseface" style="display: inline-block; width: 45px; height: 45px; background: url(http://i.imgur.com/djV3OMT.png) center no-repeat; position: absolute; right: -15px; top: -15px;"></span>'); | |
$j("#j-globalNav").append('<li id="jive-nav-link-horsemask" class=" jive-nav-link-divider j-globalNav-li j-ui-elem"><a href="#" class="j-globalNavLink j-ui-elem " role="menuitem"><span class="nav-link ">Giddyup</span></a></li>'); | |
$j("#j-globalNav").append('<li id="jive-nav-link-unicorns" class=" jive-nav-link-divider j-globalNav-li j-ui-elem"><a href="#" class="j-globalNavLink j-ui-elem " role="menuitem"><span class="nav-link ">Unicorns</span></a></li>'); | |
$j("#jive-nav-link-horsemask").on('click', | |
function(){ | |
$j(".horseface").toggle(); | |
}); | |
$j("#jive-nav-link-unicorns").click(function(){ | |
scroll(); | |
$j(".jive-avatar").attr("src", "http://media.firebox.com/pic/p5294_column_grid_12.jpg"); | |
}); | |
}); | |
function scroll() { | |
$j("#unicorn").css("right", "-300px"); | |
$j("#unicorn").animate({right:$j(window).width()}, 5000, scroll); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment