// ==UserScript== // @name 煎蛋半自动摸鱼小助手 // @namespace https://greasyfork.org/users/186574 // @homepage https://greasyfork.org/scripts/368223 // @version 1.5.0 // @description 隐藏不受欢迎图+随滚动自动展开评论+gif+直接看大图 // @author dccxi // @match http://jandan.net/pic* // @match http://jandan.net/top* // @match https://jandan.net/pic* // @match https://jandan.net/top* // @grant none // @downloadURL none // ==/UserScript== 'use strict'; // 隐藏所有不受欢迎无聊图 $('li[id*="comment-"]').each(function(){ var c = $(this).find("div.text p").eq(0).attr("class"); if (c === "bad_content") { $(this).hide(); } }); var tb = document.querySelectorAll(".tucao-btn"), imgs = document.querySelectorAll("p>a+br+img"), curr_gif_masks = document.querySelectorAll(".gif-mask"); var i = 0, j = 0, k = 0; // 自动展开吐槽 function clickTucao() { if (i < tb.length) { tb[i++].click(); setTimeout(clickTucao, 0); } } setTimeout(clickTucao); // 自动点击大图 function clickImg() { if (j < imgs.length) { if (imgs[j].style.maxHeight != "none") { imgs[j].style.maxHeight = "none"; } ++j; setTimeout(clickImg, 0); } } setTimeout(clickImg); // 加载 gif function loadGif() { if (k < curr_gif_masks.length) { curr_gif_masks[k++].click(); setTimeout(loadGif, 500); } } setTimeout(loadGif);