btsow磁力提取

与https://greasyfork.org/zh-CN/scripts/22590-easy-offline配合食用

이 스크립트는 직접 설치해서 쓰는 게 아닙니다. 다른 스크립트가 메타 명령 // @require https://update.greasyfork.org/scripts/487087/1325985/btsow%E7%A3%81%E5%8A%9B%E6%8F%90%E5%8F%96.js(으)로 포함하여 쓰는 라이브러리입니다.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==UserScript==
// @name         btsow磁力提取
// @namespace    hoothin
// @version      2024-02-07
// @description  与https://greasyfork.org/zh-CN/scripts/22590-easy-offline配合食用
// @author       hoothin
// @match        https://btsow.motorcycles/search/*
// @grant        none
// @run-at       document-body
// ==/UserScript==

(function() {
    'use strict';
    [].forEach.call(document.querySelectorAll(`.row>a`), link => {
        const magnetLink = document.createElement("a");
        magnetLink.innerText = "🧲";
        magnetLink.style.cssText = "float: left; top: -25px; position: relative; left: -10px; margin-bottom: -25px;";
        magnetLink.href = link.href.replace(/.*\/hash\/(.*)/, "magnet:?xt=urn:btih:$1");
        link.parentNode.appendChild(magnetLink);
    });
})();