// ==UserScript== // @name ACG游戏论坛自动回帖 // @namespace http://tampermonkey.net/ // @version 0.3 // @description 帮助自动回帖,一键查看预览图 // @author lpq // @match https://*.2046acg.com/* // @match https://*.acgyouxi.vip/* // @match https://*.yuanacg.com/* // @match https://bbs.90acgxc.com/ // @match https://mx1.mhyacg.com/ // @match https://bbs.90acgxc.com/ // @grant none // @require https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js // @require https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js // @downloadURL none // ==/UserScript== (function() { var $ = jQuery.noConflict(); $("#nv_forum").append('
'); $(".plugin").css("width","130px");$(".plugin .bm").css("background","#f8ba31"); $("#viewImg").click(function(){ $("a[href]").each(function(){ var href=$(this).attr("href"); if(href.indexOf(".jpg")!=-1||href.indexOf(".gif")!=-1){ window.open($(this).attr("href")) } }) $(this).parent().parent().parent().remove(); }) $("#showImg").click(function(){ showImg() $(this).parent().parent().parent().remove(); }) var memoryShow = $.cookie('memoryShow'); if(memoryShow == "true"){ $("#memoryShow").prop("checked","checked") setTimeout(function(){showImg()},1000) } $("#memoryShow").click(function(){ if($(this).prop("checked")==true){ $.cookie('memoryShow',true) showImg() }else{ $.cookie('memoryShow',false) } }) function showImg(){ console.log( $("strong a[href]")) $("strong a[href]").each(function(){ var href=$(this).attr("href"); if(href.indexOf(".jpg")!=-1||href.indexOf(".gif")!=-1){ $(this).html('