// ==UserScript== // @name haha.mx增强选项 // @namespace http://tampermonkey.net/ // @version 1.1.1 // @description 自动读取gif;自动屏蔽踩多的 // @author Alan Wang // @match https://www.haha.mx/* // @match https://www.hahamx.cn/* // @downloadURL https://update.greasyfork.icu/scripts/375686/hahamx%E5%A2%9E%E5%BC%BA%E9%80%89%E9%A1%B9.user.js // @updateURL https://update.greasyfork.icu/scripts/375686/hahamx%E5%A2%9E%E5%BC%BA%E9%80%89%E9%A1%B9.meta.js // ==/UserScript== function readAW() { var settings=localStorage.aw_haha; if (settings) { return JSON.parse(settings); } else { return {gif:true,hide:false}; } } function writeAW(settings) { localStorage.aw_haha=JSON.stringify(settings); } window.onload=function() { 'use strict'; var $options=$('
').insertBefore($(".joke-list")); $options.html(' GIF图点击加载: 隐藏不受欢迎图片: ').css({"line-height":"60px"}); var settings=readAW(); if (settings.hide) { $("#hide").attr("checked","checked"); $(".joke-list-item").each(function(){ var good=$(this).find(".btn-icon-good").text(), bad=$(this).find(".btn-icon-bad").text(); if (bad-good>=50) { $(this).children(".joke-list-item-main").hide().after($('