ColaManga 浏览增强

隐藏广告内容,阻止广告点击,提昇浏览体验。自定义背景颜色,调整图片大小。当图片载入失败时,自动重新载入图片。提供快捷键功能:[← 上一页]、[下一页 →]、[↑ 自动上滚动]、[↓ 自动下滚动]。当用户滚动到页面底部时,自动跳转到下一页。

目前为 2024-03-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name ColaManga 瀏覽增強
  3. // @name:zh-TW ColaManga 瀏覽增強
  4. // @name:zh-CN ColaManga 浏览增强
  5. // @name:en ColaManga Browsing Enhancement
  6. // @version 0.0.4
  7. // @author HentaiSaru
  8. // @description 隱藏廣告內容,阻止廣告點擊,提昇瀏覽體驗。自訂背景顏色,圖片大小調整。當圖片載入失敗時,自動重新載入圖片。提供熱鍵功能:[← 上一頁]、[下一頁 →]、[↑ 自動上滾動]、[↓ 自動下滾動]。當用戶滾動到頁面底部時,自動跳轉到下一頁。
  9. // @description:zh-TW 隱藏廣告內容,阻止廣告點擊,提昇瀏覽體驗。自訂背景顏色,圖片大小調整。當圖片載入失敗時,自動重新載入圖片。提供熱鍵功能:[← 上一頁]、[下一頁 →]、[↑ 自動上滾動]、[↓ 自動下滾動]。當用戶滾動到頁面底部時,自動跳轉到下一頁。
  10. // @description:zh-CN 隐藏广告内容,阻止广告点击,提昇浏览体验。自定义背景颜色,调整图片大小。当图片载入失败时,自动重新载入图片。提供快捷键功能:[← 上一页]、[下一页 →]、[↑ 自动上滚动]、[↓ 自动下滚动]。当用户滚动到页面底部时,自动跳转到下一页。
  11. // @description:en Hide advertisement content, block ad clicks, enhance browsing experience. Customize background color, adjust image size. Automatically reload images when they fail to load. Provide shortcut key functionalities: [← Previous Page], [Next Page →], [↑ Auto Scroll Up], [↓ Auto Scroll Down]. Automatically jump to the next page when users scroll to the bottom of the page.
  12.  
  13. // @match *://www.colamanga.com/manga-*/*/*.html
  14. // @icon https://www.colamanga.com/favicon.png
  15.  
  16. // @license MIT
  17. // @namespace https://gf.qytechs.cn/users/989635
  18.  
  19. // @run-at document-body
  20. // @grant GM_getValue
  21. // @require https://update.gf.qytechs.cn/scripts/487608/1333587/GrammarSimplified.js
  22. // ==/UserScript==
  23. !function(){class f extends API{constructor(){super();this.JumpTrigger=!1;this.Observer_Next=this.Rotation_Up=this.Rotation_Down=this.MangaList=this.BottomStrip=this.PreviousPage=this.NextPage=this.ContentsPage=this.HomePage=this.Interval=this.GetStatus=null;this.Get_Data=async()=>{this.WaitMap(["div.mh_readtitle","div.mh_headpager","div.mh_readend a","#mangalist"],20,a=>{var [a,b,c,d]=a;a=this.$$("a",!0,a);this.ContentsPage=a[0].href;this.HomePage=a[1].href;b=this.$$("a.mh_prevbook",!0,b);this.PreviousPage=b[0].href;this.NextPage=b[1].href;this.MangaList=d;this.BottomStrip=c;this.GetStatus=[this.ContentsPage,this.HomePage,this.PreviousPage,this.NextPage,this.MangaList,this.BottomStrip].every(e=>e)})};this.RegisterRotation=(a,b,c)=>setInterval(()=>{window.scrollBy(0,b)},c);this.CleanRotation=a=>(clearInterval(a),null);this.Get_Style=()=>(this.store("get","Style")||[{BG_Color:"#595959",Img_Bw:"auto",Img_Mw:"100%"}])[0];this.ImgStyle=this.Get_Style()}async BlockAds(){this.Interval=setInterval(()=>{var a=this.$$("iframe");a&&a.remove()},600);this.AddStyle("body {pointer-events: none;}body .mh_wrap,.modal-background {pointer-events: auto;}","Inject-Blocking-Ads")}async BackgroundStyle(){document.body.style.backgroundColor=this.ImgStyle.BG_Color}async PictureStyle(){this.AddStyle(`.mh_comicpic img {vertical-align: top;cursor: pointer;display: block;margin: auto;width: ${this.ImgStyle.Img_Bw};max-width: ${this.ImgStyle.Img_Mw};}`,"Inject-Image-Style");this.AutoReload()}async AutoReload(){try{let a=new MouseEvent("click",{bubbles:!0,cancelable:!0});const b=new IntersectionObserver(c=>{c.forEach(d=>{d.isIntersecting&&d.target.dispatchEvent(a)})},{threshold:.3});this.$$("span.mh_btn:not(.contact)",!0,this.MangaList).forEach(c=>{b.observe(c)})}catch{}}async Hotkey_Switch(){this.GetStatus&&this.AddListener(document,"keydown",a=>{a=a.key;"ArrowLeft"!=a||this.JumpTrigger?"ArrowRight"!=a||this.JumpTrigger?"ArrowUp"==a?(this.Rotation_Down=this.Rotation_Down&&this.CleanRotation(this.Rotation_Down),this.Rotation_Up=this.Rotation_Up?this.CleanRotation(this.Rotation_Up):this.RegisterRotation(this.Rotation_Up,-2,7)):"ArrowDown"==a&&(this.Rotation_Up=this.Rotation_Up&&this.CleanRotation(this.Rotation_Up),this.Rotation_Down=this.Rotation_Down?this.CleanRotation(this.Rotation_Down):this.RegisterRotation(this.Rotation_Down,2,7)):(this.JumpTrigger=!0,location.assign(this.NextPage)):(this.JumpTrigger=!0,location.assign(this.PreviousPage))},{capture:!0,passive:!0})}async Automatic_Next(){if(this.GetStatus){const a=this,b=a.$$("img",!0,a.MangaList),c=b[Math.floor(.7*b.length)];a.Observer_Next=new IntersectionObserver(d=>{d.forEach(e=>{e.isIntersecting&&!this.JumpTrigger&&c.src&&(c.src=!0,location.assign(a.NextPage))})},{threshold:.5});a.Observer_Next.observe(a.BottomStrip)}}async Injection(){try{this.Get_Data();this.BackgroundStyle();const a=setInterval(()=>{null!=this.GetStatus&&(clearInterval(a),this.BlockAds(),this.PictureStyle(),this.Hotkey_Switch(),this.Automatic_Next())},300)}catch(a){this.DEV&&this.log(null,a)}}}(new f).Injection()}();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址