(๑•̀ㅂ•́)و✧ 一键拯救你满屏的裂头。【静态头已回复,但 GIF 仍寄】

2025/03/29 12:22

环境版本更新了,已有大批头像陆续恢复中,不需要再设置重定向了 。


(\ _ /)
( ・-・)
/っ :hot_beverage: cdn.linux.do 暂时寄了,但是旧链接没寄 (去掉 cdn. 直接请求会重定向),总而言之在始皇修复之前兵马俑们可以临时用这个方式应急下 ↓

嘿,发现发帖是把前缀 403 了,把源码里的 (和谐,不然还是 403) 删掉即可。

执行前 ↓

执行后 ↓

操作方法:

方式①:

打开论坛后在地址栏输入 java(和谐,不然还是 403)script: 前缀然后把 ↓ 粘贴到后面,回车。

前缀是必须的,如果你回车后跳转到搜索引擎。。就用 方式② 吧。

(function(){function r(){document.querySelectorAll('img[src^="https://cdn.linux.do/"]').forEach(i=>i.src=i.src.replace('https://cdn.linux.do/','https://linux.do/'))}r();let t;window.addEventListener('scroll',()=>{clearTimeout(t);t=setTimeout(r,200)});document.addEventListener('click',()=>setTimeout(r,500));new MutationObserver(m=>m.forEach(m=>{m.type==='childList'&&r()})).observe(document.body,{childList:!0,subtree:!0})})();

↑ 可以 新建书签(记得加上前缀),点击书签在地址栏回车 是等效的。

方式②:

JS 源码,直接 F12 回车或塞油猴都行 ↓

(function() {
    function replaceImageUrls() {
        const images = document.querySelectorAll('img[src^="https://cdn.linux.do/"]');
        images.forEach(img => {
            img.src = img.src.replace('https://cdn.linux.do/', 'https://linux.do/');
        });
    }

    // 初始执行
    replaceImageUrls();

    // 监听滚动事件
    let scrollTimer;
    window.addEventListener('scroll', function() {
        clearTimeout(scrollTimer);
        scrollTimer = setTimeout(replaceImageUrls, 200);
    });

    // 监听点击事件
    document.addEventListener('click', function() {
        setTimeout(replaceImageUrls, 500);
    });

    // 监听 DOM 变化
    const observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            if (mutation.type === 'childList') {
                replaceImageUrls();
            }
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });
})();
39 个赞

吾皇昏庸

不过末将暂时能接受看不了图片,因为加载速度快了很多

20 个赞

手机党表示一脸懵逼

2 个赞

感谢分享啊ww

2 个赞

能快速访问网站也可以

1 个赞

手机用 方式① 就行,不过顺序需要先粘贴再手敲前缀,不然还是会被吞掉前缀。

1 个赞

没事儿,裂开的也是一种美

1 个赞

感谢大佬的教程,果然可以了

1 个赞

黛玉姐太强了 :tieba_087:

2 个赞

PC端如果方法1用不了可以将下面这段代码保存到收藏夹栏

java?script:(function(){function r(){document.querySelectorAll('img[src^="https://cdn.linux.do/"]').forEach(i=>i.src=i.src.replace('https://cdn.linux.do/','https://linux.do/'))}r();let t;window.addEventListener('scroll',()=>{clearTimeout(t);t=setTimeout(r,200)});document.addEventListener('click',()=>setTimeout(r,500));new MutationObserver(m=>m.forEach(m=>{m.type==='childList'&&r()})).observe(document.body,{childList:!0,subtree:!0})})();

请将java ?script中的?去除
然后点击新建的书签,就可以修复了
缺点是每进一个页面就要执行一次

1 个赞

爽了,恢复

2 个赞

:tieba_087: 发帖 403 Error + 10086。论坛机制比较特殊只要不 从新页面打开,本页鼠标左键怎么切页都始终处于「同一页面」所以 JavaScript 可以一直有效。(鼠标中键:嗯哼?)

1 个赞

谢谢大佬~
规范后的油猴脚本
可以直接新建一个脚本,删掉后直接粘贴使用,手机已测试通过~

// ==UserScript==
// @name         Linux.do 图片链接替换
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  将 cdn.linux.do 的图片链接替换为 linux.do
// @author       林黛玉倒拔垂杨柳
// @match        *://*.linux.do/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function replaceImageUrls() {
        const images = document.querySelectorAll('img[src^="https://cdn.linux.do/"]');
        images.forEach(img => {
            img.src = img.src.replace('https://cdn.linux.do/', 'https://linux.do/');
        });
    }

    // 初始执行
    replaceImageUrls();

    // 监听滚动事件
    let scrollTimer;
    window.addEventListener('scroll', function() {
        clearTimeout(scrollTimer);
        scrollTimer = setTimeout(replaceImageUrls, 200);
    });

    // 监听点击事件
    document.addEventListener('click', function() {
        setTimeout(replaceImageUrls, 500);
    });

    // 监听 DOM 变化
    const observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            if (mutation.type === 'childList') {
                replaceImageUrls();
            }
        });
    });

    observer.observe(document.body, { childList: true, subtree: true });
})();
9 个赞

666,可以了

1 个赞

神医啊~

1 个赞

我偷懒, 直接扔到redirector插件里了:

https://einaregilsson.com/redirector/

2 个赞

有点厉害。。

1 个赞

群众中的能人

1 个赞

神医啊

1 个赞

其实吧,我感觉裂开了更有技术氛围

2 个赞