Hikarinoakari direct links

bypass hikarinoakari.com/out?... , go to ouo.io/... directly

/* eslint-disable no-multi-spaces */
/* eslint-disable no-return-assign */

// ==UserScript==
// @name               Hikarinoakari direct links
// @namespace          PY-DNG userscripts
// @version            0.1.1
// @description        bypass hikarinoakari.com/out?... , go to ouo.io/... directly
// @author             PY-DNG
// @license            Do What The F*ck You Want To Public License
// @match              *://*.hikarinoakari.com/*
// @match              *://hikarinoakari.com/*
// @require            https://update.greasyfork.org/scripts/456034/1282804/Basic%20Functions%20%28For%20userscripts%29.js
// @icon               data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAACzNJREFUWEc9l9uPXdddxz/7fva5ztXjGY89jh07Tpo4+BYHX2gr3gqtVAmh8gRCICjQklb0GQn+ABAvoEq8EQlEkVMrdmNs10lkO47HIYlre3yJx2PP5cyZcz/77L3Pvi601lDOy4z2Za3v+v6+v+/vu7WlT94Tum4w9Hwsx8a0bII4Rpg6MTm6Y4GhEYYBpYJLFscUDIMkCKkWXfJ4hIFGkiQUCyVGQcSVy1fIMxgOfZaXl6lNjPPHf/onBNGIXBMYtoluaPiBj/bi7mXR7fb470uXSdKEY8ePM7d7HrdSYeD7RHlKsVwizRKKToF0NKLoOIy8IY6hY5saoyCkVCxCrvHo0RM+uvYRtu0QhCPW1tapjNX4s7/4PhmCjJxUZOimTiYytIefnhdCwJVLl2k0GkxPT6NpGvsOvMzrh9/Aj0LcksvQHyLyTAGYqNYQSYZjWxg6+MMhpmHy8MEjFm/fUWyOj0+wvlGn3e0qAD9456+xCg5JnuKPAgXAtE205/eviSSKuX/3VzxeeoghBHE0Issy5nfv5s0jb1KqlhEip1qtILIU2zTpttrkWUoYj9jc3CQMQh7cX6K+vsn8/B7K5Qqrq+s8fbbCxPQU7/zkx9iuQ5wn2wAMA8My0Z7e/6WIgpBw4PHRlatkYcj+vXt5srTE+voaSRpjWiambbF37wKVcomCbTPo9zEMg0yDr5aX6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EfXLtNqvGByoka5WsVxiyoL6KYc4QaOY4MmyPMMkafKmHxvoAxp0O9ta8BvtIVMpTL3hYEv91En8YeemlaDXp8oimhuNeRaBMMh66urPH++wuKnNwkHbaanximVyrjlsuokyUAuBIZlqMmnqCZXegh8T5Vsc31dDSTN72wK27JBEaJjWbZqJenzMnb5/5eGo8DHG/SUs/V7HZrNBp1Wi+bmlopikjk5PySbcgbIQSOvyZ+8Ltcrl8uKVdu2qdc31CG0QXNVOE5BqTsXKBOREzCOtxeT6KVgJHKv32XQ7zDodWm3tuh1O3h9D8u0lIXHcazekczJ+strkt1U5oMwxHVlCwcK2MrKM5aXn6J16k+F6xbRdfP/AWi6QZJmalhIFtIkIQiGqn6jwMMfDuj1ugz7A8IgQL4on/s1ACkYGePl+/L0EoQEYFmWYkICe/DgPl999QRt68WSkNQYpk2aCRWpZS+n2fYCsv5ykTQeEUch8ShU49Ub9JVOZKSX9+VzEmguA6HIVZxPZCwPQzV0JDg5LdN4G9CdO4s8W1lGW3v8hRgfH8eyHdI0w7BsBSbPIZMMZJmiMEliVQoJQHaGpF+WRbZTNArVCeWzUqjyC0oqXG4W+L4CINeQ1OepvBdz48Z1NurraMtffCJkgJB2LBmQm5tWQWV6mfF+TaNsJXky6V5SvTJoyLJITch0IwEIOd81TQFNokiVRVEu82OSoGu6YssbDPjww2uqFbWl61fFzM6dVGpjKk4rAI67rd5UUrmNWIpRCkt+jsnOkCxEUUCzs6mAKABC9g+k8vkkVqeVAORfCcBQ4o6Vj1y9emW7Pb+4ckHs2rWL2vikakNDaqBQRAY6WU/ZGXIRSalcXZZiOPTw5ZdTEtL32wThkCgcKQDS9dTpkxiR5QqYLEWeppi6oQA06ptcvXIZyzL5XzzUxYSfYnEEAAAAAElFTkSuQmCC
// @grant              none
// @run-at             document-start
// ==/UserScript==

/* global LogLevel DoLog Err $ $All $CrE $AEL $$CrE addStyle detectDom destroyEvent copyProp copyProps parseArgs escJsStr replaceText getUrlArgv dl_browser dl_GM AsyncManager */

(function __MAIN__() {
    'use strict';
	const jumper = /https?:\/\/(www\.)?hikarinoakari\.com\/out\/?[a-zA-Z0-9\\\/\+=]+/;
	const toURL = link => atob(link.match(/out\/\?(.+)\/?/)[1]).replace('&', '&').replace('%C3%83%C2%AD', 'í').replace('&', '&');

	// Jump current page
	jumper.test(location.href) &&
		(location.href = toURL(document.location.href));

	// Modify links in page
	detectDom({
		selector: 'a[href*="hikarinoakari.com/out/"]',
		callback: a => jumper.test(a.href) && (a.href = toURL(a.href)),
		once: false
	});
})();