Easy Download in H ACG

维护网络健康发展:)

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Easy Download in H ACG
// @version      1.0
// @description  维护网络健康发展:)
// @author       FeiLong
// @icon         http://www.hacg.red/favicon.ico
// @match        http://www.hacg.red/wp/*
// @grant        none
// @namespace https://greasyfork.org/zh-CN/scripts/16997-easy-download-in-h-acg
// ==/UserScript==
/* jshint -W097 */
'use strict';

// Your code here...

//get web html
var b=document.body.innerHTML;

/**********************************************************************************************/
//auto display
b=b.replace(/display: none;/g,'display: yes;')
//magnet
b=b.replace(/([\w\d]{40})/g, function(word){
  return word.toUpperCase();}
  );
b = b.replace(/([\w\d]{40})/g,'<a target=\"_blank\" href=\"magnet\:\?xt\=urn\:btih\:$1\">magnet\:\?xt\=urn\:btih\:$1<\/a><br><a target=\"_blank\" href=\"http\:\/\/torcache\.net\/torrent\/$1\.torrent\">下载种子<\/a>');
//pan.baidu
b = b.replace(/\/s\/([\w\d]{6,8})/g,'<a target=\"_blank\" href=\"http\:\/\/pan.baidu.com\/s\/$1\">http\:\/\/pan.baidu.com\/s\/$1<\/a>');
//8 jiang
b = b.replace(/([\w\d]{6,8}) ([^<]+)<br>\n(⑨)/g,'<a  target=\"_blank\" href=\"http\:\/\/pan.baidu.com\/s\/$1\">$1<\/a><br>提取码:$2<br>解压密码:$3')
b = b.replace(/小8酱/,'<a name=\"little8\">小8酱<\/a>');
b = b.replace(/发表于/,'<h1><a href=\"#little8\">直达小8酱<\/a><h1>');
/**********************************************************************************************/

//finish
document.body.innerHTML = b;