// ==UserScript== // @name ACG游戏论坛自动回帖 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 帮助自动回帖,一键查看预览图 // @author lpq // @match https://live.homesacg2.com/* // @match https://bbs.2046acg.com/* // @match https://bbs.acgyouxi.xyz/* // @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",true) showImg() } $("#memoryShow").click(function(){ if($(this).prop("checked")==true){ $.cookie('memoryShow',true) showImg() }else{ $.cookie('memoryShow',false) } }) function showImg(){ $("a[href]").each(function(){ var href=$(this).attr("href"); if(href.indexOf(".jpg")!=-1||href.indexOf(".gif")!=-1){ $(this).html('