// ==UserScript== // @name ☄️动漫之家增强☄️ // @namespace http://tampermonkey.net/ // @version 0.1 // @description 动漫之家去广告🚫,并排布局📖,高度自适应↕️,辅助翻页↔️,暗夜模式🌙 // @author Byaidu // @match *.dmzj.com/* // @require https://code.jquery.com/jquery-1.12.4.min.js // @grant GM_addStyle // @run-at document-start // @downloadURL none // ==/UserScript== (function() { 'use strict'; //去广告 GM_addStyle('*[style*="2147"]{display:none !important;}') GM_addStyle('*[style*="hidden"]{display:none !important;}') //去二维码 GM_addStyle('.footer{display:none !important;}') GM_addStyle('.foot{display:none !important;}') //漫画并页排布 GM_addStyle('#center_box{justify-content:center;flex-direction: row-reverse;display: flex;flex-wrap: wrap;}') //漫画高度自适应 GM_addStyle('#center_box img{height:100vh !important;}') //漫画上下间隔缩小 GM_addStyle('.inner_img{margin-top:20px !important;}') //漫画页暗夜模式 if(location.href.indexOf("shtml")>=0){ GM_addStyle('*{background: rgb(25,25,25) !important;}') } //上下方向键滚动页面,左右方向键切换章节 let img_id=0 $("body").keydown(function(event) { if (event.keyCode == 38) { if (img_id>0) img_id-=2 $("html,body").animate({scrollTop: $("#img_"+img_id).offset().top}, 1000); } else if (event.keyCode == 40) { img_id+=2 $("html,body").animate({scrollTop: $("#img_"+img_id).offset().top}, 1000); } else if (event.keyCode == 37) { location.href = $("#prev_chapter").attr("href"); } else if (event.keyCode == 39) { location.href = $("#next_chapter").attr("href"); } }) })();