Skip to content

Instantly share code, notes, and snippets.

@Fordi
Last active July 23, 2020 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fordi/d617a570adf0fd2621cce8b3c2465bb3 to your computer and use it in GitHub Desktop.
Save Fordi/d617a570adf0fd2621cce8b3c2465bb3 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Always Nova
// @match https://kissanime.ru/Anime/*
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
(async (window, document) => {
const qsa = (s, e = document) => [].slice.call(e.querySelectorAll(s));
qsa('a[href]').forEach(link => {
const u = new URL(link.href);
if (/\/Anime\/[^\/]+\/[^\/]+/.test(u.pathname)) {
u.searchParams.set('s', 'nova');
link.href = u.toString();
}
});
})(unsafeWindow, unsafeWindow.document);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment