[uBlock Origin 1.45.0] ! Title: GelboLube (Universal) [stack menubar modified] ! Version: 202211101656 ! Expires: 2 days ! Author: kowith337 and contributors ! From: https://github.com/kowith337/GelboLube/raw/primary/gelbolube.txt ! Homepage: https://github.com/kowith337/PersonalFilterListCollection/tree/master/filterlist/imageboard ! Mirror: https://gitlab.com/kowith337/PersonalFilterListCollection/raw/master/filterlist/imageboard/GelboLube.txt ! Note: You can read each entry below... ! 1. It doesn't matter to have any checksum tools because uBo is now fully support filterlists that created on GitHub, GitLab, ! etc. and regularly auto check itself when it's outdated more than 2 days. ! 2. This rules not completely to hide ads and collapse space, but it still remove ads and unwanted resources. ! (e.g. subdocuments and other scripts file that no need to load them) ! 3. Author/Owner/Contributor of "gelbooru.com" will frequently update their sites to keep ads from their partners appear. ! 4. This is a universal version that compatible for any browsers, even some of browsers market share aren't use modern engine ! like most big brands. (thanks for the `!#if` and `!#endif` directive) ! 5. Split menu bar are deprecated and move to "legacy" version, you can still subscribe if you've still missing it even it's ! still ugly until now. ! ------------------------------------------------------ GelboLube Core -------------------------------------------------------- ! ! Element Hiding - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Block external hyperlinks, include CCBill ads and Patreon. ! gelbooru.com##.content #nup ! gelbooru.com##.sidebar #tup ! gelbooru.com##a#ext ! gelbooru.com##a.ext gelbooru.com##a[href*="adtng.com" i] gelbooru.com##a[href*="click.php" i] gelbooru.com##a[href*="media.r18" i] gelbooru.com##a[href*="mnfclub.com" i] gelbooru.com##a[href^="http://" i][href*="/track/" i] gelbooru.com##a[href^="https://" i][href*="/track/" i] gelbooru.com##a[rel="nofollow" i] video gelbooru.com##.contain-push a[href*="tdForward.php" i] ! 2. Block ExoClick iFrame (Not sure is it still exist?) gelbooru.com##iframe[src*="exoclick" i] ! Leftover ad space above of image list / image view and below page number ! Those was hidden already by 3p requests block, such as R18.com banner, ad frame from ContentABC.com gelbooru.com##.contain-push .hidden-xs[style*="max-width: 728px"] gelbooru.com##.contain-push div[style^="max-width: 728px"][style*="overflow"] gelbooru.com##.contain-push div[style^="max-width: 750px"][style*="Overflow"] ! 3. Trying to block NoScript gelbooru.com##noscript ! 4. I have no idea about tag, can uBlock handle it? gelbooru.com##ins.adsbytrafficjunky ! 5. Hide all AdToniq AAB overlay (DOM Wildcard) gelbooru.com##div[id^="adtoniq-" i] ! Filtered procedural hiding - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Element hiding in tags list pane that also insert tall banner ads gelbooru.com##div[class^="paginat"] a:has(img) gelbooru.com##div[id^="paginat"] a:has(img) ! 2. To block hyperlink ads that appear under the tag lists (currently know it's promote r18.com and jabcomix.com) gelbooru.com##div[class^="sidebar"] a[target]:has(img) ! 3. Hide hyperlink that link to '/extra/', e.g. shirt promo, TheDoujin, internal redirect before sent to external ads sites. gelbooru.com##.contain-push a:has(img[src^="/extras/" i]) gelbooru.com##.contain-push a:has(img[src*="thedoujin" i]) ! 4. Remove leftover frame that serve ads from 'ContentABC' gelbooru.com##.contain-push center .hidden-xs:has(iframe[name^="spot_id" i]) ! 5. Use 'matches-css' to remove placeholder after allowed 'ExoLoader.addZone' to generate advert space gelbooru.com###searchTags div:matches-css(height: 600px) gelbooru.com##.contain-push center center div:matches-css(width: 1000px) gelbooru.com##.contain-push center div:matches-css(width: 300px) gelbooru.com##.contain-push center div:matches-css(max-width: 750px) ! 6. They trying to make a full screen transparent overlay to guaranteed that popup ads will be show when user start to click ! (anywhere of site) gelbooru.com##body div[style*="z-index"]:matches-css(width: 100%) ! 7. Hide red bar notices for specific reason (e.g. pasta notice, promote merch, patron) gelbooru.com##.alert-warning:has(a[href*="javascript" i]) gelbooru.com##.alert-warning:has(a[href*="moneygrubbingwhore.com" i]) gelbooru.com##.alert-warning:has(a[href*="patreon.com/gelbooru" i]) ! 8. Remove berserk rant! gelbooru.com##.contain-push center div[style]:not(#paginator) ! 9. Remove non-same-site out of menu (e.g. buy shirts, TheDoujin, GYDADC; save custom style menu space) gelbooru.com###navbar ul.nav li:has(a[href*="moneygrubbingwhore.com" i]) gelbooru.com###navbar ul.nav li:has(a[href*="gydadc.com" i]) gelbooru.com###navbar ul.nav li:has(a[href*="thedoujin.com" i]) ! 10. Remove Twitter shilling gelbooru.com##.alert-info:has(a[href*="twitter.com/gelbooru" i]) ! Requests Blocking - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. [Prequel] Block Every videos, subdocs and scripts (See below for what things could be exclude) ||gelbooru.com$media ||gelbooru.com$script ||gelbooru.com$subdocument ! Block extra things (Banner images that promote their shi{r}ts, TheDoujin rebirth) ||gelbooru.com/extras/$image,other ||gelbooru.com/mind/$image,other ||gelbooru.com/thedoujin*$image,other ! Unbreak - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Allow jQuery from GoogleAPIs and BootStrap (suggested by toshiya44) @@||*/script/jquery*$script,domain=gelbooru.com @@||ajax.googleapis.com/ajax/libs/jquery*$script,domain=gelbooru.com @@||bootstrapcdn.com/bootstrap/*$script,domain=gelbooru.com @@||gelbooru.com/script/jquery*$script,first-party ! 2. Useful scripts ! - [application3.js] is questionable due to it's have `BPJS` function inside that script. ! - [autocomplete.js] is allowed for autocomplete search. ! - [miscJs.js] HayStack or something that I can't understand, but allowed because it doesn't have anything harm to end users. ! Note that they have lately rename main script file, (previously was `application.js`), but I'm not sure that they still want ! to abuse my exclusion (and may include uAssets) or not, as well as new autocomplete script that named `autocomplete.old.js` ! that not sure they will inject hostile script and name it like `autocomplete..js`, and any otherwise... @@/script/application.js?$script,domain=gelbooru.com @@/script/application.js|$script,domain=gelbooru.com @@/script/application3.js?$script,domain=gelbooru.com @@/script/application3.js|$script,domain=gelbooru.com @@/script/autocomplete.*.js?$script,domain=gelbooru.com @@/script/autocomplete.*.js|$script,domain=gelbooru.com @@/script/miscJs.js?$script,domain=gelbooru.com @@/script/miscJs.js|$script,domain=gelbooru.com @@||gelbooru.com/script/application.js?$script,first-party @@||gelbooru.com/script/application.js|$script,first-party @@||gelbooru.com/script/application3.js?$script,first-party @@||gelbooru.com/script/application3.js|$script,first-party @@||gelbooru.com/script/autocomplete.*.js?$script,first-party @@||gelbooru.com/script/autocomplete.*.js|$script,first-party @@||gelbooru.com/script/miscJs.js?$script,first-party @@||gelbooru.com/script/miscJs.js|$script,first-party ! 3. Actual WebM Videos (Legitimate WebM vids are loaded from /images/ only, otherwise is adverts!) @@||gelbooru.com/images/$media @@||gelbooru.com//images/$media ! 4. Legitimate thumbnails conclusion ! a. Blame to Gelbooru's false that place advert images into "/0A/" (now they use "/0C/") ! b. some filterlists blocking part of "/ad/" ! Note: all thumbnails are loaded as jpg files and have image id assigned after ?, ex. (thumbnail_.jpg?) @@||gelbooru.com/thumbnails/*/*/thumbnail_*.jpg$image @@||gelbooru.com/thumbnails/*/*/thumbnail_*.jpg?$image ! 5. Honeypot script that deploy specific value to check, if users block all scripts (or use noscript), ! a few code of inline-script will triggered to show ads under page number again. ! Note: Althought, I didn't see they use "youhate.us" domain long time ago, I've seen once when downloading full size image ! while connections is too slow to load image directly from Gelbooru domain. @@||gelbooru.com/ads.js?$script @@||youhate.us/ads.js?$script ! 6. Allow lazyload script to be loaded because function to load thumbnail is depend on this, since 2017/10/03 (Now they halt?) @@||*/script/lazyload.js?$script,domain=gelbooru.com @@||gelbooru.com/script/lazyload.js?$script,first-party ! Counter other filterlists - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Counter uBlock Assets that's block inline-script, the purpose is my filter still block some bad scripts and function, ! such as prevent ExoLoader to execute and deploy cookie, prevent read ILS ads check, block GoogleAnalyticsObject, ... ||gelbooru.com$inline-script,badfilter ! 2. Counter uBlock Assets that's allow script from first party domains entirely, I cannot predict the possibility about when ! they placed hostile scripts at top level or somewhere else, due to they frequently update their ads code and changed ! backend script name often that you can see they use 'bed.php', 'bed2.php', 'bluet.php' and such, current plan is only allow ! scripts one-by-one is safe for now. @@||gelbooru.com^$first-party,script,badfilter ! 3. Counter EasyList and/or Fanboy lists (Esp. Enhanced tracking OR Ultimate / What are they doing right now?) ! - Block every script at every domains to be loaded, but the main problem is they still whitelist ExoClick, I don't know why? ! - Resized and/or Full image(s) was blocked, due to Gelbooru move all images to 'gelbooru.com' instead of 'assets.gelbooru.com' ! - Allowing all '/thumbnails/' images mean also allow ads images that located at same path to be loaded. @@||assets.gelbooru.com/thumbnails/$image,badfilter |http://$script,domain=gelbooru.com,badfilter |https://$script,domain=gelbooru.com,badfilter ||gelbooru.com^$first-party,image,badfilter ! 4. Counter and override AdGuard GenericHide whitelist! @@||gelbooru.com$generichide,badfilter ||gelbooru.com$generichide,important ! Strict blocking - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Third party their use to serve ads and track users. ! Now using $important tag due to counter EasyList filters that whitelist ExoClick script ads. ||4uvjosuc.com$domain=gelbooru.com,important ||adnium.com$domain=gelbooru.com,important ||adtng.com$domain=gelbooru.com,important ||amazonaws.com$domain=gelbooru.com,important ||atas.io$domain=gelbooru.com,important ||ccbill.com$domain=gelbooru.com,important ||contentabc.com$domain=gelbooru.com,important ||dynsrvaba.com$domain=gelbooru.com,important ||exoclick.com$domain=gelbooru.com,important ||exosrv.com$domain=gelbooru.com,important ||google-analytics.com$domain=gelbooru.com,important ||googletagmanager.com$domain=gelbooru.com,important ||hdscout.com$domain=gelbooru.com,important ||jabcomix.com$domain=gelbooru.com,important ||javhd.com$domain=gelbooru.com,important ||juicyads.com$domain=gelbooru.com,important ||mnfclub.com$domain=gelbooru.com,important ||r18.com$domain=gelbooru.com,important ||trafficjunky.net$domain=gelbooru.com,important ||tsyndicate.com$domain=gelbooru.com,important ||twitter.com$domain=gelbooru.com,important ||verotel.com$domain=gelbooru.com,important ! 2. Block "r18.com" promo, /r18/ strict! ||gelbooru.com/r18/$important ! 3. Block "JabComix" promo, /r19/ strict! ||gelbooru.com/r19/$important ! 4. Block hostile scripts that load as php, it's an ad script that foolish exception rule and loaded as php document. ! Additional note: license.* js file is similar to holstile script for survive ad-blocking that used in "OpenLoad". ||gelbooru.com//script/application.js.php$important ||gelbooru.com//script/bed.php$important ||gelbooru.com//script/bed2.php$important ||gelbooru.com//script/bluet.php$important ||gelbooru.com//script/bluet.wry$important ||gelbooru.com//script/bpjs.js$important ||gelbooru.com//script/license.*$important ||gelbooru.com/bed.php$important ||gelbooru.com/bed2.php$important ||gelbooru.com/bluet.php$important ||gelbooru.com/bluet.wry$important ||gelbooru.com/script/application.js.php$important ||gelbooru.com/script/bed.php$important ||gelbooru.com/script/bed2.php$important ||gelbooru.com/script/bluet.php$important ||gelbooru.com/script/bluet.wry$important ||gelbooru.com/script/bpjs.js$important ||gelbooru.com/script/license.*$important ! 5. Pre-blocking images ahead to prevent advert images that placed as '/thumbnails/0X/', this will supply by Unbreak #4 that ! actually load legitimate thumbnails, I've reduced priority for [*.jpg] due to it's use for other appearance, such as ! recent comments that load thumbnail images without '?' referrer, also prevent repetitive (and abusive) requests ! that their currently using, like re-request every images as "other" instead of request as it's own type from first time. ||gelbooru.com/thumbnails/*.jpg| ||gelbooru.com/thumbnails/*.gif|$important ||gelbooru.com/thumbnails/*.png|$important ! 6. To preventing resources request abuse that they trying to reload blocked resources as 'other' for able to re-access blocked ! JS function and/or re-deploy ads and such... ! Note that it's also break AutoComplete due to the search query are now rely to `beacon`, not `xhr` anymore. ||gelbooru.com/*.php*$~document,~inline-script,~xmlhttprequest ||gelbooru.com//script/application.js$~script,important ||gelbooru.com//script/try.js$important ||gelbooru.com//script/tryt.js$important ||gelbooru.com/ads.js$~script,important ||gelbooru.com/script/application.js$~script,important ||gelbooru.com/script/try.js$important ||gelbooru.com/script/tryt.js$important ||youhate.us/ads.js$~script,important ! Block then Redirect - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! Experimental for replace a dummy script, frame, text, etc. ! Redirect rules is only affect for specific type of request only. ||amazonaws.com/html/danaton3.html$subdocument,important,domain=gelbooru.com,redirect=noopframe ||gelbooru.com/autoDebug.js$script,important,redirect=noopjs ||gelbooru.com/index.php?page=autoDebug$xmlhttprequest,important,redirect=nooptext ||gelbooru.com/intermission.php$subdocument,important,redirect=noopframe ! Inject Scriptlets - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Prevent Google Analytics to be executed, but it works only inline script due to they recently add asynchronous script after ! document loaded. gelbooru.com##+js(aopw, GoogleAnalyticsObject) ! 2. Prevent JuicyAds execute, same behavior as Google Analytics gelbooru.com##+js(aopw, adsbyjuicy) ! 3. Experimental, to foil ILS function for Chromium / Firefox WebExt gelbooru.com##+js(acs, AddZone, idzone) gelbooru.com##+js(acs, ImplicityBreakingSite) gelbooru.com##+js(acs, adtoniq) gelbooru.com##+js(acs, domain_base, exosrv.com) gelbooru.com##+js(acs, serve, script_url) gelbooru.com##+js(acs, window.dataLayer, gtag) ! 4. Inject constant value (Only a value that not match to specific string will be applied) gelbooru.com##+js(set, BPJS, noopFunc) gelbooru.com##+js(set, ExoDetector, noopFunc) gelbooru.com##+js(set, adtoniq, noopFunc) ! CSS Re-design / Mobile Improvement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Overall adjust menu bar to reduce thickness of them, previously, I've use this section to divide each menu bars but for now ! they have increase menu items more and more and cause my old "half divide" style looks very ugly! ! this will surely conflict when you request desktop view or when you're already use desktop browser. gelbooru.com##.navbar:style(min-height: 24px !important) gelbooru.com##.navbar#submenu:style(margin: 0px !important; position: relative !important; width:100% !important; z-index: initial !important) ! 2. Adjust padding between menu items, also reduce priority of "Bold highlight" items by revert back to normal font weight. gelbooru.com##.navbar .navbar-nav li a:style(font-weight: normal !important; padding-left: 4px !important; padding-right: 4px !important; padding-top: 10px !important; padding-bottom: 10px !important; line-height: 20px !important) gelbooru.com##.navbar .navbar-nav li a b:style(font-weight: normal !important; padding-left: 0px !important; padding-right: 0px !important) ! 3. Adjust "light bulb" icon size and positioning (aka. toggle dark mode) gelbooru.com##.navbar .navbar-nav li a.ui-icon-lightbulb:after:style(font-size: 16px !important; position: relative !important) ! 4. Adjust to reduce thickness of "soft alert" height and expand maximum width (old value use 15px, so, reduce to 8px instead.) gelbooru.com##.padding15 .alert.alert-info:style(padding: 8px 15px !important; margin: 8px 0px !important; width: auto 100% !important) ! 5. Replace "Gelbooru Logo" to "text" (Indeed!) gelbooru.com##.navbar-header .navbar-brand:style(background: none 0px transparent !important; font-size: 12px !important; height: 20px !important; line-height: 20px !important; padding-top: 10px !important; padding-bottom: 10px !important) gelbooru.com##.navbar-header .navbar-brand:after:style(content: "Gelbooru" !important) ! 6. Reduce heigh of toggle menu bar button to 8px, reduce margin between top and bottom to 4px. ! * Mobile site user experience gelbooru.com##nav.navbar .navbar-toggle:style(padding: 8px !important; margin-top: 4px !important; margin-bottom: 4px !important) ! 7. Remove blur overlay for images requiring an account gelbooru.com##body img:style(filter:none !important) ! 8. Fix extra-long search bar caused by padding adjust. (reported from Twitter DM, so I won't shout reporter name.) ! * Re-adjust to reduce space between top and bottom gelbooru.com##.padding15:style(padding: 8px 15px !important) ! HTML filtering (Firefox quantum only, maybe old Microsoft Edge) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! able to remove some specific path inside the non-filtered document before it's load ! currently require 1.14.23 beta and run on Firefox Quantum (57+) !#if cap_html_filtering gelbooru.com##^div[id^="adtoniq-msg-bar"] gelbooru.com##^ins[class="adsbytrafficjunky"] ! gelbooru.com##^script:has-text(BPJS) ! gelbooru.com##^script:has-text(BetterJsPop) gelbooru.com##^script:has-text(EXoDetector) gelbooru.com##^script:has-text(adtoniq) gelbooru.com##^script:has-text(fuckingnormieswry) gelbooru.com##^script[async][src^="https://media.trafficjunky.net"] gelbooru.com##^script[async][src^="https://www.googletagmanager.com"] gelbooru.com##^script[src*="/autoDebug.js"] gelbooru.com##^script[src*="/script/bpjs.js"] gelbooru.com##^script[src*="/script/license"] gelbooru.com##^script[src*="/script/try.js"] gelbooru.com##^script[src*="/script/tryt.js"] gelbooru.com##^script[src^="https://ads.exoclick.com"] ! gelbooru.com##^script:has-text(abvertDar) !#endif ! Firefox + uBO Legacy Only - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! ##script rules are work only uBlock0 1.2.0 + Firefox 42 or newer, but make sure it's not over than 56, if your Firefox version ! over than that, you will be forced to install WebExtension version and need to look for "Chromium/WebExt" version... ! Note: Fennec F-Droid also work, Not sure for IceCat and Pale Moon because it based on ESR build... ! - I can confirmed these inline script filter rules below can collaps space that caused from every immoral ads, for now. ! - Only the legacy version of uBlock Origin can be used these rules, the legacy version will be no longer release and get updated ! when stable version of Firefox 57 released, or maybe need someone to clone and port to keep extended support beyond EoL! ! - Keep in mind because they may rename some function to survive blocking, such as change [advertVar] to [abvertDar] !#if env_firefox gelbooru.com##script:contains(.AddZone) gelbooru.com##script:contains(.addZone) gelbooru.com##script:contains(.serve) gelbooru.com##script:contains(BetterJsPop) gelbooru.com##script:contains(EXoDetector) gelbooru.com##script:contains(ExoDetector) gelbooru.com##script:contains(ExoLoader) gelbooru.com##script:contains(GoogleAnalyticsObject) gelbooru.com##script:contains(ImplicityBreakingSite) gelbooru.com##script:contains(_gaq.push) gelbooru.com##script:contains(ad_idzone) gelbooru.com##script:contains(adtoniq) gelbooru.com##script:contains(adsbyjuicy) gelbooru.com##script:contains(advertVar) gelbooru.com##script:contains(function gtag) gelbooru.com##script:contains(gelcomPoop) gelbooru.com##script:contains(trw_domain) ! gelbooru.com##script:contains(abvertDar) ! gelbooru.com##script:contains(adnOpt) !#endif ! Specific rules to use for some case or unless some requirement are met - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ! 1. Cancel hiding "Switch layout" for actual mobile devices, sometime it's needed to do, I guess. !#if !env_mobile gelbooru.com##.alert-info:has(a[href*="?page=ihnt"]) !#endif