32 lines
1.7 KiB
JavaScript
32 lines
1.7 KiB
JavaScript
// ==UserScript==
|
|
// @name aniSearch Enhancer
|
|
// @namespace http://github.com/marvinl97/ani-search-enhancer
|
|
// @version 1.2
|
|
// @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
|
|
// @include /^https?://www.anisearch.de/anime/.*$/
|
|
// @require http://code.jquery.com/jquery-latest.js
|
|
// @downloadURL http://raw.githubusercontent.com/marvinl97/ani-search-enhancer/master/ani-search-enhancer.user.js
|
|
// @supportURL http://github.com/marvinl97/ani-search-enhancer/issues
|
|
// ==/UserScript==
|
|
this.$ = this.jQuery = jQuery.noConflict(true);
|
|
|
|
$(document).ready(function()
|
|
{
|
|
$('head').append('<style>#page-action li{font-size:xx-small;text-overflow:clip;} #page-action-search:before{content:"\\f002";}</style>');
|
|
var animeTitleElem = document.getElementById('htitle');
|
|
if (animeTitleElem !== null)
|
|
{
|
|
var animeTitle = animeTitleElem.innerText;
|
|
if (animeTitle)
|
|
{
|
|
var encodedTitle = encodeURI(animeTitle).replace(/'/g, "%27");
|
|
if (document.getElementById('page-action') === null) $('#infodetails').before('<div><nav><ul id="page-action"></ul></nav></div>');
|
|
$('#page-action').append('<li id="page-action-search" onclick="window.open(\'http://kissanime.ru/Search/Anime?keyword=' + encodedTitle + '\', \'_blank\');">KissAnime</li>');
|
|
$('#page-action').append('<li id="page-action-search" onclick="window.open(\'https://proxer.me/search?s=search&name=' + encodedTitle + '&typ=all-anime#top\', \'_blank\');">Proxer</li>');
|
|
$('#page-action').append('<li id="page-action-search" onclick="window.open(\'https://9anime.to/search?keyword=' + encodedTitle + '\', \'_blank\');">9Anime</li>');
|
|
}
|
|
}
|
|
});
|