liuli.se

磁链下载地址显示

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         liuli.se
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  磁链下载地址显示
// @author       aolose
// @include      /www\.liuli\.se\/wp\/\d+\.html
// @grant        none
// ==/UserScript==

(function() {
   'use strict';
    const t = /[0-9a-z]{40,40}/;
    const a=[].find.call(document.querySelectorAll('.entry-content p'),p=>t.test(p.innerText));
    const r = 'magnet:?xt=urn:btih:'
    if(a)a.innerHTML=a.innerHTML.replace(/([0-9a-z]{40,40})/,`<a href="${r}$1" target="_blank">${r}$1</a>`);
})();