Greasy Fork is available in English.

Sakuraz

脚本只是实验用,更改图片加载地址【非必要情况下(如真的无法加载图片,特别是晚上)不推荐用,因为服务器带宽小(1Mbps),正常情况下反而拖慢速度】;为避免不必要的争议,脚本不会替换樱花社区的图片

Dette scriptet har blitt slettet.

// ==UserScript==
// @name         Sakuraz
// @namespace    替换图片地址(可能会加快也可能减慢图片加载速度,甚至无法正常显示)
// @version      2019.07.11
// @description  脚本只是实验用,更改图片加载地址【非必要情况下(如真的无法加载图片,特别是晚上)不推荐用,因为服务器带宽小(1Mbps),正常情况下反而拖慢速度】;为避免不必要的争议,脚本不会替换樱花社区的图片
// @author       FuMan
// @match        https://www.sakuraz.net/*
// @grant        document-idle
// @icon 		 data:image/png;base64,AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAMQOAADEDgAAAAAAAAAAAAD///tm///7ZqKJ8vCiifLw4tz7/+Lc+/+0o/P/tKPz/6iS8f+okvH/pY3y/6WN8v/V0ev/1dHr/4uHwf+Lh8H/lo/Q/5aP0P+vpeT/r6Xk/8C37P/At+z/18/4/9fP+P+tmfL/rZny/6qV8/+qlfP/qpXz8KqV8/CkjvFopI7xaP//+2b///tmoony8KKJ8vDi3Pv/4tz7/7Sj8/+0o/P/qJLx/6iS8f+ljfL/pY3y/9XR6//V0ev/i4fB/4uHwf+Wj9D/lo/Q/6+l5P+vpeT/wLfs/8C37P/Xz/j/18/4/62Z8v+tmfL/qpXz/6qV8/+qlfPwqpXz8KSO8WikjvFo3db58N3W+fDEt/f/xLf3/9PK9//Tyvf/yL32/8i99v+nkfH/p5Hx/7Wj9P+1o/T/8e77//Hu+/+qpcn/qqXJ/6iizv+oos7/qqDf/6qg3/+poN7/qaDe/9LN6v/Szer/0cf3/9HH9/+nkfH/p5Hx/6uW9P+rlvT/qZXz8amV8/Hd1vnw3db58MS39//Et/f/08r3/9PK9//Ivfb/yL32/6eR8f+nkfH/taP0/7Wj9P/x7vv/8e77/6qly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fD/6uvv/+rr7//d3Oj/3dzo/9/d5//f3ef/3Njl/9zY5f/KxeD/ysXg/93Z6f/d2en/+Pf1//j39f/y8fn/8vH5/83D9//Nw/f/oorx/6KK8f+rlvT/q5b0/6uV8/GrlfPxqZTz8KmU8/CokvT/qJL0/+7r+//u6/v/6enw/+np8P/q6+//6uvv/93c6P/d3Oj/393n/9/d5//c2OX/3Njl/8rF4P/KxeD/3dnp/93Z6f/49/X/+Pf1//Lx+f/y8fn/zcP3/83D9/+iivH/oorx/6uW9P+rlvT/q5Xz8auV8/Glj/NmpY/zZqiT8vCok/LwsJ30/7Cd9P/Ivff/yL33/76v9f++r/X/z8X4/8/F+P/h2/r/4dv6/+Le+P/i3vj/5N75/+Te+f/Tyvj/08r4/6iS8v+okvL/o4rx/6OK8f+nkPH/p5Dx/6qV8/+qlfP/qpXz8KqV8/CkjvFopI7xaKWP82alj/NmqJPy8KiT8vCwnfT/sJ30/8i99//Ivff/vq/1/76v9f/Pxfj/z8X4/+Hb+v/h2/r/4t74/+Le+P/k3vn/5N75/9PK+P/Tyvj/qJLy/6iS8v+jivH/o4rx/6eQ8f+nkPH/qpXz/6qV8/+qlfPwqpXz8KSO8WikjvFo8AAAD/AAAA/AAAADwAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAPAAAAD8AAAD/AAAA8=
// ==/UserScript==

(function() {
    'use strict';

    // backup 用于从服务器加载图片
    var backup = 'https://www.fuman.tk/sakuraz/index.php?url=';

    //替换地址,加快访问速度(可能加快)

    var rule_1 = /https:\/\/(.*?).sakuracdn.com\/wp-content\/plugins\/a3-lazy-load\/assets\/images\/lazy_placeholder.gif/;
    var rule_2 = /https:\/\/(.*?).sakuracdn.com\/wp-content\/uploads/;

    for ( let a = 0 ; document.querySelectorAll('img').length > a ; a++ ) {
        if ( document.querySelectorAll('img')[ a ].getAttribute( 'src' ).search( /https:\/\/(.*?).sakuracdn.com\/wp-content\/plugins\/a3-lazy-load\/assets\/images\/lazy_placeholder.gif/ ) != -1 ) {
            try {
                document.querySelectorAll('img')[ a ].setAttribute( 'data-src' , backup + document.querySelectorAll('img')[ a ].getAttribute( 'data-src') );
            }
            catch ( error ) {;}
        }
        else if ( document.querySelectorAll('img')[ a ].getAttribute( 'data-src' ).search( /https:\/\/(.*?).sakuracdn.com\/wp-content\/uploads/ ) != -1 ) {
            document.querySelectorAll('img')[ a ].setAttribute( 'src' , backup + document.querySelectorAll('img')[ a ].getAttribute( 'src' ) );
        }
    }
})();