🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

tieba_image_resize

百度贴吧大图还原

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name           tieba_image_resize
// @description    百度贴吧大图还原
// @include        http://tieba.baidu.com/p/*
// @include        http://tieba.baidu.com/f?ct=*
// @include        http://tieba.baidu.com/f?kz=*
// @icon           http://tb.himg.baidu.com/sys/portraitn/item/4e2ed7f8bbb3d4f2c2d2bb21
// @author         congxz6688
// @version        2013.10.1.0
// @namespace https://greasyfork.org/scripts/154
// ==/UserScript==

GM_addStyle(".myresized{max-width:100%;}");

for (var i = 0; i < document.images.length; i++) {
	var image = document.images[i];
	if (image.getAttribute("class") == "BDE_Image" && (image.width == "560" || image.getAttribute("changedsize") == "true" || image.getAttribute("pic_type") == "0")) {
		image.removeAttribute("changedsize");
		image.removeAttribute("pic_type");
		image.removeAttribute("height");
		image.removeAttribute("width");
		image.removeAttribute("class");
		image.setAttribute("class", "myresized");
		image.src = image.src.replace(/forum\/.*sign=.*?(?=\/[0-9a-z]{40})/, "forum/pic/item");
	}
}