琉璃神社老司机

Don't panic.

// ==UserScript==
// @name         琉璃神社老司机
// @namespace    https://greasyfork.org/users/8650
// @version      1.0.0-beta.5
// @description  Don't panic.
// @author       红领巾
// @include      *://hacg.*/*
// @include      *://*.hacg.*/*
// @include      *://*.llss.*/*
// @include      *://*.llss.fun/*
// @include      *://*.liuli.*/*
// @icon         https://www.llss.me/favicon.ico
// @run-at       document-end
// @grant        none
// ==/UserScript==

// 倒是看你有几个马甲

(function(){
    'use strict';
    
    // Force HTTPS
    if(self.location.protocol == "http:") self.location.replace(self.location.href.replace(/^http/, "https"));
    
    let oldDriver = document.querySelector('.entry-content');
    let childDriver = oldDriver.childNodes;
    let takeMe;
    let fuel;
    let i;
    let j;
    for(i = childDriver.length - 1; i >= 0; --i)
        if(takeMe = childDriver[i].textContent.match(/([a-z0-9]{40})|(\w{32})|(([a-z0-9]{8,39})( ?)[\u4e00-\u9fa5 ]{2,}( ?)+([a-z0-9]{2,31})\b)/ig))
            for(j = 0;j < takeMe.length; ++j) {
                fuel = '<a href="magnet:?xt=urn:btih:' +
                    ( takeMe[j].length >= 40 ? takeMe[j].toString().replace(/(\s|[\u4e00-\u9fa5])+/g, '').trim() : takeMe[j] ) +
                    '">老司机链接</a>';
                // console.log(takeMe[j], '<a href="magnet:?xt=urn:btih:' + fuel);
                childDriver[i].innerHTML = childDriver[i].innerHTML.toString().replace(takeMe[j], fuel);
            }
})();