diff --git a/ani-search-enhancer.user.js b/ani-search-enhancer.user.js index dbf735e..5d8a586 100644 --- a/ani-search-enhancer.user.js +++ b/ani-search-enhancer.user.js @@ -1,48 +1,57 @@ // ==UserScript== // @name aniSearch Enhancer // @namespace http://git.nivram.io/marvinlehmann/ani-search-enhancer -// @version 1.82 +// @version 1.90 // @description Adds buttons to the info site of an anime on aniSearch which links you directly to various streaming portals. // @author Marvin Lehmann // @grant GM_xmlhttpRequest // @include /^https?://www.anisearch.de/anime/.*$/ // @connect animepahe.com // @connect twist.moe -// @require http://code.jquery.com/jquery-latest.js // @downloadURL http://git.nivram.io/marvinlehmann/ani-search-enhancer/raw/master/ani-search-enhancer.user.js // @supportURL http://git.nivram.io/marvinlehmann/ani-search-enhancer/issues // ==/UserScript== -this.$ = this.jQuery = jQuery.noConflict(true); +(function () { + 'use strict'; -$(function () { - $('head').append(` - `); - const animeTitle = $('#htitle > span[itemprop=name]').text(); - const animeReleaseYear = $('#htitle > span.release_year').text().replace(/\(|\)/g, ''); + const animeTitle = document.getElementById("htitle").textContent; + const animeReleaseYear = document.querySelector("header .release_year").textContent.match(/\d+/); if (animeTitle) { const encodedTitle = encodeURI(animeTitle).replace(/'/g, "%27"); - if ($('#page-action').length === 0) { - $('#htitle').after(''); + if (!document.getElementById("page-action")) { + document.getElementById("htitle").insertAdjacentHTML("beforeend", /*html*/ ``); } - $('#page-action').append(` -
  • + document.getElementById("page-action").insertAdjacentHTML("beforeend", //html + `