From 146e473d7c94fe4adbdfadc8e4d4c31b2087b3ee Mon Sep 17 00:00:00 2001 From: Marvin Lehmann Date: Thu, 2 Feb 2017 23:25:10 +0100 Subject: [PATCH] Added buttons when signed out and replaced hyperlinks with events The hyperlinks of the buttons were replaced by "onclick" events so that the whole button functions as a link. --- ani-search-enhancer.user.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ani-search-enhancer.user.js b/ani-search-enhancer.user.js index 1575be5..9ea74c7 100644 --- a/ani-search-enhancer.user.js +++ b/ani-search-enhancer.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name aniSearch Enhancer // @namespace http://github.com/marvinl97/ani-search-enhancer -// @version 1.01 +// @version 1.1 // @description Adds buttons to the info site of an anime on aniSearch which links you directly to various streaming portals. // @author Marvin Lehmann (marvinl97) // @grant none @@ -21,10 +21,11 @@ $(document).ready(function() var animeTitle = animeTitleElem.innerText; if (animeTitle) { - $('#page-action').append(''); - $('#page-action').append(''); - $('#page-action').append(''); - $('li#page-action-search a').css("color", $('li#page-action-search').css("color")); + var encodedTitle = encodeURI(animeTitle).replace(/'/g, "%27"); + if (document.getElementById('page-action') === null) $('#infodetails').before('
'); + $('#page-action').append(''); + $('#page-action').append(''); + $('#page-action').append(''); } } });