您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
百度贴吧大图还原
- // ==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");
- }
- }