您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Userscript for fixing URLs in mandiner.hu's comments
// ==UserScript== // @name Mandiner comments' URL fixer // @name:hu Mandiner hozzászólás URL-javító // @description Userscript for fixing URLs in mandiner.hu's comments // @description:hu Felhasználói szkript a mandiner.hu hozzászólásaiban található URL-ek kijavításaira // @icon https://mandiner.hu/images/favicon.png // @version 1.2 // @include https://*mandiner.hu/cikk/* // @include https://*mandiner.hu/felhasznalo/* // @grant none // @namespace https://greasyfork.org/users/412587 // ==/UserScript== let actualURL = window.location.href, actualURLRegex = /https:\/\/(.*)mandiner.hu\/cikk\/(\d{6})\d{2}(.*)/, actualURLYearMonth = actualURL.replace(actualURLRegex,'$2'), commentURLs = document.querySelectorAll('.comment .text a'), commentURLRegex = new RegExp ('[\?&]utm_source=mandiner&utm_medium=link&utm_campaign=mandiner_' + actualURLYearMonth, 'gi'); for (let commentURL of commentURLs) { commentURL.setAttribute('href', commentURL.getAttribute('href').replace(commentURLRegex, '')); }