Files
ani-search-enhancer/ani-search-enhancer.user.js

26 lines
1.6 KiB
JavaScript

// ==UserScript==
// @name aniSearch Enhancer
// @namespace http://github.com/marvinlehmann/ani-search-enhancer
// @version 1.5
// @description Adds buttons to the info site of an anime on aniSearch which links you directly to various streaming portals.
// @author Marvin Lehmann
// @grant none
// @include /^https?://www.anisearch.de/anime/.*$/
// @require http://code.jquery.com/jquery-latest.js
// @downloadURL http://raw.githubusercontent.com/marvinlehmann/ani-search-enhancer/master/ani-search-enhancer.user.js
// @supportURL http://github.com/marvinlehmann/ani-search-enhancer/issues
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
$(function() {
$('head').append('<style>#page-action-search:before{content:"\\f002";}</style>');
const animeTitle = $('#htitle > span[itemprop=name]').text();
if (animeTitle) {
const encodedTitle = encodeURI(animeTitle).replace(/'/g, "%27");
if ($('#page-action').length === 0) $('#htitle').after('<ul id="page-action" class="inline"></ul>');
$('#page-action').append('<li id="page-action-search" onclick="window.open(\'http://kissanime.ru/Search/Anime?keyword=' + encodedTitle + '\', \'_blank\');"><span>KissAnime</span></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\');"><span>Proxer</span></li>');
$('#page-action').append('<li id="page-action-search" onclick="window.open(\'https://9anime.to/search?keyword=' + encodedTitle + '\', \'_blank\');"><span>9Anime</span></li>');
}
});