您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Script automatically replaces all the Joyreactor posts' .jpeg images with their .jpg versions.
// ==UserScript== // @name Joyreactor Delmor_S' Script // @grant none // @include *reactor.cc* // @include *joyreactor.cc* // @include *reactor.com* // @include *jr-proxy.com* // @run-at document-idle // @description Script automatically replaces all the Joyreactor posts' .jpeg images with their .jpg versions. // @version 1.1.1 // @require http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js // @namespace https://greasyfork.org/users/4638 // ==/UserScript== setTimeout(function() { var tempHTML = $('body').html(); if (tempHTML.includes('Лучше выключите этот глючный userscript.') || tempHTML.includes('Если у вас установлен блокировщик рекламы')) { //alert('Пробую перезагрузить страницу...'); location.reload(); } $('div[class*="image"] img').each(function() { var tempSrc = $(this).attr('src'); tempSrc = tempSrc.replace(/\.jpeg/g, '.jpg?' + new Date().getTime()); tempSrc = tempSrc.replace(/\.png/g, '.png?' + new Date().getTime()); $(this).attr('src', tempSrc); }); $('div[class*="image"] img').on({ 'error': function() { var tempSrc = $(this).attr('src'); tempSrc = tempSrc.replace(/\.jpeg/g, '.jpg?' + new Date().getTime()); tempSrc = tempSrc.replace(/\.png/g, '.png?' + new Date().getTime()); $(this).attr('src', tempSrc); } }); $('div[class*="uhead_nick"] img').on({ 'error': function() { var tempSrc = $(this).attr('src'); $(this).attr('src', ""); $(this).attr('src', tempSrc); } }); }, 1000);