Greasy Fork is available in English.

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);
    });
})();