JoyReactor better mobile link

Добавляет в ссылку на мобильную версию полный адрес текущей страницы

// ==UserScript==
// @name         JoyReactor better mobile link
// @description  Добавляет в ссылку на мобильную версию полный адрес текущей страницы
// @icon        http://joyreactor.cc/favicon.ico
// @namespace    https://gist.github.com/qiwichupa/6a81db04507c850e27e7e44bbdd04066
// @homepage     https://greasyfork.org/ru/scripts/499146-joyreactor-better-mobile-link
// @author       qiwichupa
// @version      2024.06.30.14
// @license      Public Domain
// @include      https://*.reactor.cc/*
// @include      https://joyreactor.cc/*
// @grant        none
// ==/UserScript==

$('a[href^="http://m.joyreactor.cc"]').each(function() {
    var link = $(this);
    var href = link.attr('href');
    if (href)
        var page=window.location.href.replace(window.location.origin, "")
        link.attr('href', href+page);
});