„ani-search-enhancer.user.js“ ändern
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name aniSearch Enhancer
|
// @name aniSearch Enhancer
|
||||||
// @namespace http://git.nivram.io/marvinlehmann/ani-search-enhancer
|
// @namespace http://git.nivram.io/marvinlehmann/ani-search-enhancer
|
||||||
// @version 1.7
|
// @version 1.71
|
||||||
// @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
|
// @author Marvin Lehmann
|
||||||
// @grant GM_xmlhttpRequest
|
// @grant GM_xmlhttpRequest
|
||||||
@@ -50,18 +50,28 @@ $(function () {
|
|||||||
</li>`);
|
</li>`);
|
||||||
|
|
||||||
const $stream_links = $('#stream-links');
|
const $stream_links = $('#stream-links');
|
||||||
$stream_links.change(function () {
|
const $page_action_stream = $('#page-action-stream')
|
||||||
const target = $(this).val();
|
|
||||||
if (target) {
|
|
||||||
window.open(target, '_blank');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$stream_links.append(new Option("Stream List", "https://www.reddit.com/r/animepiracy/wiki/animestreamlist"));
|
const clickHandler = function (e) {
|
||||||
$stream_links.append(new Option("> 9anime.to", "https://9anime.to/search?keyword=" + encodedTitle));
|
console.log(e);
|
||||||
$stream_links.append(new Option("> AnimeVibe", "https://animevibe.xyz/?s=" + encodedTitle));
|
if (e.target === e.currentTarget) {
|
||||||
$stream_links.append(new Option("> KissAnime.ru", "http://kissanime.ru/Search/Anime?keyword=" + encodedTitle));
|
console.log("test");
|
||||||
$stream_links.append(new Option("> Proxer.me", "https://proxer.me/search?s=search&name=" + encodedTitle + "&typ=all-anime#top"));
|
const targetUrl = $stream_links.val();
|
||||||
|
console.log(targetUrl);
|
||||||
|
if (targetUrl) {
|
||||||
|
window.open(targetUrl, '_blank');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// $stream_links.change(clickHandler) ;
|
||||||
|
$page_action_stream.click(clickHandler);
|
||||||
|
|
||||||
|
$stream_links.append(new Option("> Stream List", "https://www.reddit.com/r/animepiracy/wiki/animestreamlist"));
|
||||||
|
$stream_links.append(new Option("@ 9anime", "https://9anime.to/search?keyword=" + encodedTitle));
|
||||||
|
$stream_links.append(new Option("@ AnimeVibe", "https://animevibe.xyz/?s=" + encodedTitle));
|
||||||
|
$stream_links.append(new Option("@ KissAnime", "http://kissanime.ru/Search/Anime?keyword=" + encodedTitle));
|
||||||
|
$stream_links.append(new Option("@ Proxer", "https://proxer.me/search?s=search&name=" + encodedTitle + "&typ=all-anime#top"));
|
||||||
|
|
||||||
GM_xmlhttpRequest({
|
GM_xmlhttpRequest({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
@@ -71,7 +81,7 @@ $(function () {
|
|||||||
if (resp.response.total > 0) {
|
if (resp.response.total > 0) {
|
||||||
const firstResult = resp.response.data[0];
|
const firstResult = resp.response.data[0];
|
||||||
const targetPage = 'https://animepahe.com/anime/' + firstResult.slug;
|
const targetPage = 'https://animepahe.com/anime/' + firstResult.slug;
|
||||||
$stream_links.append(new Option("> AnimePahe.com", targetPage));
|
$stream_links.append(new Option("@ AnimePahe", targetPage));
|
||||||
|
|
||||||
// Did we possibly get the wrong one?
|
// Did we possibly get the wrong one?
|
||||||
// if (!firstResult.started_airing_date.includes(animeReleaseYear)) {
|
// if (!firstResult.started_airing_date.includes(animeReleaseYear)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user