// ==UserScript== // @name Minecraft Gift Code Hider // @namespace https://greasyfork.org/users/5927-encarton // @description Automatically hides gift codes and adds button to toggle visibility. // @include http://minecraft.net/profile // @include https://minecraft.net/profile // @include http://account.mojang.com/me // @include https://account.mojang.com/me // @icon http://www.minecraft.net/favicon.png // @version 2.2 // @downloadURL https://update.greasyfork.icu/scripts/5602/Minecraft%20Gift%20Code%20Hider.user.js // @updateURL https://update.greasyfork.icu/scripts/5602/Minecraft%20Gift%20Code%20Hider.meta.js // ==/UserScript== //This time with jQuery! //Since they have it and it makes things easier. //Check for Location, if it isn't Minecraft.net assume Mojang if ( document.location.href.search('profile') > 0){ //Hide Gift Code List on Minecraft.net $('ul:eq(2)').wrap('
'); $('#giftCodes').hide(); //Create Button on Minecraft.net $('').insertBefore("#giftCodes"); } else { //Hide Gift Code List on Mojang.com $('#giftCodes').hide(); //Create Button on Mojang.com $('').insertBefore("#giftCodes"); } //Add Function to Web Page so the Button Works $('').appendTo('body');