// ==UserScript== // @name Kinopoisk Redirect // @namespace https://t.me/johannmosin // @version 0.1 // @description Redirect from kinopoisk.ru to w3w.kpfr.cc // @author Johann Mosin // @match https://www.kinopoisk.ru/*/* // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; // Get the current URL var currentUrl = window.location.href; // Extract the type and id from the URL var parts = currentUrl.split('/'); var type = parts[3]; var id = parts[4]; // Construct the new URL var newUrl = 'https://w3w.kpfr.cc/' + type + '/' + id + '/'; // Redirect to the new URL window.location.href = newUrl; })();