hacg-tool

琉璃神社实用脚本

As of 2022-05-15. See the latest version.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey 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 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.

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

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

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         hacg-tool
// @description  琉璃神社实用脚本
// @author       hewel
// @match        *://*.hacg.cat/*
// @version      0.0.1
// @license MIT
// @icon         https://www.google.com/s2/favicons?sz=64&domain=hacg.cat
// @namespace https://greasyfork.org/users/774675
// ==/UserScript==
var _=function(n){"use strict";function r(n,r,t){for(var e=new Array(t),u=0,i=r;u<t;)e[u]=n[i],u=u+1|0,i=i+1|0;return e}function t(n,e){for(;;){var u=e,i=n,c=i.length,o=0===c?1:c,f=o-u.length|0;if(0===f)return i.apply(null,u);if(f>=0)return function(n,r){return function(e){return t(n,r.concat([e]))}}(i,u);e=r(u,o,0|-f),n=i.apply(null,r(u,0,o))}}function e(n){return 1===n.length?n:function(r){return function(n,r){var e=n.length;if(1===e)return n(r);switch(e){case 1:return n(r);case 2:return function(t){return n(r,t)};case 3:return function(t,e){return n(r,t,e)};case 4:return function(t,e,u){return n(r,t,e,u)};case 5:return function(t,e,u,i){return n(r,t,e,u,i)};case 6:return function(t,e,u,i,c){return n(r,t,e,u,i,c)};case 7:return function(t,e,u,i,c,o){return n(r,t,e,u,i,c,o)};default:return t(n,[r])}}(n,r)}}function u(n){return 2===n.length?n:function(r,e){return function(n,r,e){var u=n.length;if(2===u)return n(r,e);switch(u){case 1:return t(n(r),[e]);case 2:return n(r,e);case 3:return function(t){return n(r,e,t)};case 4:return function(t,u){return n(r,e,t,u)};case 5:return function(t,u,i){return n(r,e,t,u,i)};case 6:return function(t,u,i,c){return n(r,e,t,u,i,c)};case 7:return function(t,u,i,c,o){return n(r,e,t,u,i,c,o)};default:return t(n,[r,e])}}(n,r,e)}}function i(n){return void 0===n?{BS_PRIVATE_NESTED_SOME_NONE:0}:null!==n&&void 0!==n.BS_PRIVATE_NESTED_SOME_NONE?{BS_PRIVATE_NESTED_SOME_NONE:n.BS_PRIVATE_NESTED_SOME_NONE+1|0}:n}function c(n){if(null===n||void 0===n.BS_PRIVATE_NESTED_SOME_NONE)return n;var r=n.BS_PRIVATE_NESTED_SOME_NONE;return 0===r?void 0:{BS_PRIVATE_NESTED_SOME_NONE:r-1|0}}function o(n,r){return function(n,r){for(var t=n.length,e=new Array(t),u=0,i=0;i<t;++i){var c=n[i];r(c)&&(e[u]=c,u=u+1|0)}return e.length=u,e}(n,e(r))}function f(n,r){return function(n,r){if(void 0!==n)return i(r(c(n)))}(n,e(r))}function a(n,r){return function(n,r){if(void 0!==n)return r(c(n))}(n,e(r))}function l(n,r){return void 0!==n?c(n):r}function E(n,r,t){return function(n,r,t){return void 0!==n?void 0!==r&&t(c(n),c(r)):void 0===r}(n,r,u(t))}function s(n){if(0==((r=n.nodeType)>12||r<1?12:r-1|0))return i(n);var r}var _=new RegExp("[0-9a-fA-F]{40,}");function v(n){return E(f(s(n),(function(n){return n.className})),"",(function(n,r){return n===r}))}function N(n){return l(f(f(s(n),(function(n){return n.innerText})),(function(n){return _.test(n)})),!1)}var S=o(o(Array.prototype.slice.call(document.querySelectorAll("p")),v),N);function d(n){var r=document.createElement("span");return r.innerHTML=n,r.setAttribute("style","color:#1982d1;"),r.outerHTML}function T(n){var r,t=s(n),e=l(f(t,(function(n){return n.innerHTML})),""),u=f(f(a(null===(r=e.match(_))?void 0:i(r),(function(n){return function(n,r){if(r>=0&&r<n.length)return i(n[r])}(n,0)})),(function(n){return"magnet:?xt=urn:btih:"+n})),d);return f(t,(function(n){n.innerHTML=l(f(u,(function(n){return e.replace(_,n)})),e)}))}return function(n,r){for(var t=n.length,e=new Array(t),u=0;u<t;++u)e[u]=r(n[u])}(S,e(T)),n.highlightLink=d,n.inContent=v,n.isMagnetLink=N,n.magnetHashRe=_,n.nodeListHasMagnetLink=S,n.replaceMagnetHash=T,Object.defineProperty(n,"__esModule",{value:!0}),n}({});