Kogama Optimization - Lag Reduction

Script to minimize lags in Kogama by removing unnecessary elements and animations

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript== K O K U S H I B O
// @name         Kogama Optimization - Lag Reduction
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Script to minimize lags in Kogama by removing unnecessary elements and animations
// @author       K O K U S H I B O
// @match        https://www.kogama.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Function to optimize Kogama performance
    function optimizeKogama() {
        // Remove ads and unnecessary elements
        document.querySelectorAll('.advertisement, [id^="ad"], iframe[src*="ads"]').forEach(el => el.remove());

        // Disable animations and transitions
        document.querySelectorAll("*").forEach(el => {
            el.style.animation = "none"; // Disable CSS animations
            el.style.transition = "none"; // Disable CSS transitions
        });

        // Reduce graphical load (e.g., remove background images)
        document.body.style.backgroundImage = "none"; // Disable background images
        document.body.style.backgroundColor = "#000000"; // Set black background (optional)

        console.log("Kogama optimization applied successfully.");
    }

    // Apply optimization regularly (for dynamically loaded elements)
    setInterval(optimizeKogama, 2000); // Run every 2 seconds
})();