Fixed text color of buttons

.. and reformatted the code.
This commit is contained in:
2017-02-02 19:44:45 +01:00
committed by GitHub
parent dd99d3d6ee
commit 0d32d250d2

View File

@@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name aniSearch Enhancer // @name aniSearch Enhancer
// @namespace http://github.com/marvinl97/ani-search-enhancer // @namespace http://github.com/marvinl97/ani-search-enhancer
// @version 1.0 // @version 1.01
// @description Adds buttons to the info site of an anime on aniSearch which links you directly to various streaming portals. // @description Adds buttons to the info site of an anime on aniSearch which links you directly to various streaming portals.
// @author Marvin Lehmann (marvinl97) // @author Marvin Lehmann (marvinl97)
// @grant none // @grant none
@@ -14,15 +14,17 @@ this.$ = this.jQuery = jQuery.noConflict(true);
$(document).ready(function() $(document).ready(function()
{ {
$('head').append('<style>#page-action #page-action-search:before{content:"\\f002";}</style>'); $('head').append('<style>#page-action #page-action-search:before{content:"\\f002";}</style>');
var animeTitleElem = document.getElementById('htitle'); var animeTitleElem = document.getElementById('htitle');
if(animeTitleElem !== null) if (animeTitleElem !== null)
{ {
var animeTitle = animeTitleElem.innerText; var animeTitle = animeTitleElem.innerText;
if(animeTitle) { if (animeTitle)
$('#page-action').append('<li id="page-action-search"><a href="http://kissanime.ru/Search/Anime?keyword=' + animeTitle + '" target="_blank">KissAnime</a></li>'); {
$('#page-action').append('<li id="page-action-search"><a href="https://proxer.me/search?s=search&name=' + animeTitle + '&typ=all-anime#top" target="_blank">Proxer</a></li>'); $('#page-action').append('<li id="page-action-search"><a href="http://kissanime.ru/Search/Anime?keyword=' + animeTitle + '" target="_blank">KissAnime</a></li>');
$('#page-action').append('<li id="page-action-search"><a href="http://9anime.to/search?keyword=' + animeTitle + '&typ=all-anime#top" target="_blank">9Anime</a></li>'); $('#page-action').append('<li id="page-action-search"><a href="https://proxer.me/search?s=search&name=' + animeTitle + '&typ=all-anime#top" target="_blank">Proxer</a></li>');
} $('#page-action').append('<li id="page-action-search"><a href="http://9anime.to/search?keyword=' + animeTitle + '" target="_blank">9Anime</a></li>');
} $('li#page-action-search a').css("color", $('li#page-action-search').css("color"));
}); }
}
});