Skip to content

Instantly share code, notes, and snippets.

@strawbberrys
Created March 5, 2024 19:15
Show Gist options
  • Save strawbberrys/2c68a941421a0ce53ecd55e6400c70c7 to your computer and use it in GitHub Desktop.
Save strawbberrys/2c68a941421a0ce53ecd55e6400c70c7 to your computer and use it in GitHub Desktop.
agar.io Banner Remover TamperMonkey Script
// ==UserScript==
// @name agar.io Banner Remover
// @namespace http://tampermonkey.net/
// @version 2024-03-05
// @description Removes every banner advertisement and allows true fullscreen.
// @author strawberrys
// @match https://agar.io/
// @icon https://www.google.com/s2/favicons?sz=64&domain=agar.io
// @grant none
// @run-at document-end
// ==/UserScript==
(function() {
'use strict';
const allBanners = document.querySelectorAll("[id ^= agar-io_]");
const canvas = document.getElementById("canvas");
const rootStyle = document.querySelector(":root").style;
const bottomBannerHeight = rootStyle.removeProperty("--bottom-banner-height");
allBanners.forEach((element) => element.remove());
canvas.height += parseInt(bottomBannerHeight);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment