Greasy Fork is available in English.

动漫花园(dmhy.org) - 种子文件命名

保留下载种子文件的文件名

// ==UserScript==
// @name        动漫花园(dmhy.org) - 种子文件命名
// @namespace   moe.jixun
// @description 保留下载种子文件的文件名
// @match       https://share.dmhy.org/topics/*
// @grant       none
// @version     1.0
// @author      Jixun
// @run-at      document-start
// @grant       GM_download
// ==/UserScript==

addEventListener('DOMContentLoaded', () => {
  const link = document.querySelector('#tabs-1 > p:first-child strong+a');
  const name = link.textContent.trim() + '.torrent';
  link.addEventListener('click', (e) => {
    e.preventDefault();
    GM_download(link.href, name);
  });
});