您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
NFO urls beginning with http become clickable
// ==UserScript== // @name Linkfy TL NFO Links // @namespace pootz10 // @description NFO urls beginning with http become clickable // @include /(^https?:\/\/www\.|^https?:\/\/)torrentleech\.org\/(torrent).*/ // @version 1.5 // @history 1.5 - Language added on highlight list // @history 1.4 - fix issue where script stopped working after firefox 84.x // @history 1.3 - highlight subtitles (não lançado na net) // @history 1.2 - minor fix, a missing space between ' " could not change color of the link on some browsers // @history 1.1 - update regex to detect when url has only www. // @license GNU // @require https://code.jquery.com/jquery-2.1.1.min.js // @grant GM_addStyle // @run-at document-idle // ==/UserScript== $('#nfo_text').each( function() { var re = /\(?(?:https?:\/\/|www\.)(\S+)/g; var link = '<a href="https://' + "$1" + ' " style="color:yellow;" target="_blank">https://' + "$1" + '</a>'; //var reSUBs = /(Subtitles|Subtitles.+?$|Subs[\W].+?$|SUBTITLES:?$|Language\s+:?\s?[A-Za-z]+$)/mg; var reSUBs = /(Subs[\W].+?$|SUBTITLES:?$|Language\s+:?\s?[A-Za-z, ]+$|Subtitles?:?(\s|\.)+[A-Za-z, ]+$|Subtitles.+?$|Subtitles)/gm; var subs = '<font' + ' style="color:lime;" >' + "$1" + '<font style="color:white;">'; var linkify = $(this).text().replace(re, link).replace(reSUBs, subs); linkify = linkify.replace(/https?:\/\/https?:\/\//g, "https://"); linkify = linkify.replace(/\/'|\/"/g, "/"); $(this).html(linkify); });