Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Mount fade out for HabitRPG
// ==UserScript==
// Sources:
// @name Mount Fader
// @namespace habitRPGMountFader
// @include*
// @author Tom Apicella (jquery by Erik Vergobbi Vold & Tyler G. Hicks-Wright)
// @description This userscript fades out your mount when you mouse over your hero
// ==/UserScript==
// a function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "//");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
}, false);
// the guts of this userscript
function main() {
// Note, jQ replaces $ to avoid conflicts.
jQ(this).find("[class*=Mount_Head],[class*=Mount_Body]").delay(400).fadeTo("slow", 0.3);
}, function(){
jQ(this).find("[class*=Mount_Head],[class*=Mount_Body]").fadeTo("fast", 1.0);
// load jQuery and execute the main function

This comment has been minimized.

Copy link

@cTheDragons cTheDragons commented Aug 15, 2016


Forgive the Newbie question, but can this be uploaded to Stylish?



This comment has been minimized.

Copy link

@tripplehelix tripplehelix commented Dec 25, 2016

@cTheDragons, it would need to be converted to css. As far as I know, Stylish doesn't support javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment