Strudels

Blank Ad Spaces and Page Cut-offs Fixinator

Dec 9th, 2025 (edited)
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Blank Ad Spaces and Page Cut-offs Fixinator
  3. // @namespace    http://tampermonkey.net/
  4. // @version      2026-05-01
  5. // @description  Fix pages getting cut off at the top and giant sections of whitespace left by ad blockers
  6. // @author       Rippy
  7. // @match        http*://*.neopets.com/*
  8. // @icon         https://www.google.com/s2/favicons?sz=64&domain=neopets.com
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. /*
  13.      Use this script as an alternative to the uBlock Origin custom filter solution.
  14.      It should be fine to use both this script + uBlock Origin custom filters at the same time if you really want to, they might cover missing things between each other.
  15.      This script still presumes you do at least have an ad blocker running though, and aims to clean up the residue that ad blockers leave behind.
  16. */
  17.  
  18. (function() {
  19.     'use strict';
  20.  
  21.     $(document).ready(() => {
  22.         if ($("#nl-instream-video")) {
  23.             $("#nl-instream-video").remove();
  24.             $("#nl-instream-video-content").remove();
  25.             $(".nl-ad-top").remove();
  26.             $(".nl-ad-top-content").remove();
  27.             $(".nl-ad-bottom").remove();
  28.             $(".nl-ad-bottom-content").remove();
  29.             $(".nl-mobile-ad").remove();
  30.             if (window.location.href.match(/^https?:\/\/(?:w*).?neopets.com\/inventory.phtml*/)) {
  31.                 $(".inv-menulinks").attr("style", "margin-bottom: 0px !important"); // target the giant whitespace under the menu links
  32.                 $(".popup-body__2020").attr("style", "padding: 20px !important"); // target the whitespace at the bottom of the item popup
  33.                 $("#navsub-buffer__2020").remove();
  34.             }
  35.             else if (window.location.href.match(/^https?:\/\/(?:w*).?neopets.com\/neoboards*/)) {
  36.                 $(".boardNavTop").attr("style", "margin-top: 0px !important"); // target the giant whitespace at the top of each board category
  37.                 $("#boardIndex > ul > li").attr("style", "margin-bottom: 0px !important"); // target the whitespace on the board index under the premium and trading categories
  38.                 $(".reply-ad-wrapper").remove(); // remove the ad element between individual board posts
  39.                 $("#navsub-buffer__2020").remove();
  40.             }
  41.             else if (window.location.href.match(/^https?:\/\/(?:w*).?neopets.com\/games\/*/)) {
  42.                 $(".page-title__2020").attr("style", "margin-top: 150px !important"); // fix the huge page cut-off at the top on html5 game pages
  43.             }
  44.             else {
  45.                 $(".page-title__2020").attr("style", "margin-top: 20px !important"); // slight padding on non-game pages
  46.             }
  47.         }
  48.     });
  49. })();
Advertisement
Add Comment
Please, Sign In to add comment