Windy.com country remover

Removes specific elements from windy.com

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==
// @name         Windy.com country remover
// @namespace    http://tampermonkey.net/
// @version      1.11
// @description  Removes specific elements from windy.com
// @author       UAEpro
// @match        https://*.windy.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Function to remove elements
    function removeElements() {
        // Remove "open-in-app" element
        const openInApp = document.getElementById('open-in-app');
        if (openInApp) {
            openInApp.remove();
        }

        // Remove marker pane
        const markerPane = document.querySelector('.leaflet-pane.leaflet-marker-pane');
        if (markerPane) {
            markerPane.remove();
        }

        // Remove logo
        const logo = document.getElementById('logo');
        if (logo) {
            logo.remove();
        }
    }

    // Initial removal
    removeElements();

    // Set up a MutationObserver to handle dynamically loaded elements
    const observer = new MutationObserver(function(mutations) {
        removeElements();
    });

    // Start observing the document with the configured parameters
    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();