// ==UserScript== // @name Clean wetter.com // @description Hide unrelated elements, auto load updates // @namespace shiftgeist // @match https://www.wetter.com/* // @grant GM_addStyle // @version 20250226 // @author shiftgeist // @license GNU GPLv3 // @icon https://cs3.wettercomassets.com/wcomv5/images/icons/favicon/48x48.png // @downloadURL none // ==/UserScript== GM_addStyle(` nav, aside, footer, #weather-headline, #current-weather-with-content .thumbnail-container, #nowcast, #outstream-outer, #wetter, #current-weather-with-content #snow-link, #furtherDetails, #ski-area-link, #livecam, #globalText, #pictureNewsWithRightText, #video-teaser-fixed, .werbung, .social-grid, .warnings-grid, .city-weather-grid, .cityweather h2, .cityweather h3, .cityweather p, .page-gradient, .header-login, .swg-col-arrow, .info-grid, .scroll, [data-tb-region="inlineVideoBox"], [data-module="forecast-layout1-additional"], [data-for="climate"], [data-template="columnsWidget"], [data-tb-region="aufmachermodul"], [data-template="startpageWidget"], [data-contenttype="hd-live-webcams"] { display: none !important; width: 0px !important; height: 0px !important; } #cnt-with-location-attributes .rtw_weather_txt.text--small { font-size: 1rem !important; } .desk-two-thirds, .homepagemapmodule .c1, .mia-map-container { width: unset !important; max-width: unset !important; } #header-placeholder, .mia-map-container, .homepagemapmodule, .cityweather { height: auto !important; min-height: auto !important; } .forecast-navigation-move, .bg--blue-gradient, .forecast-navigation-grid a:not(.is-active):not(:hover), .forecast-navigation-line a.is-active, .forecast-navigation-line a:hover { background: #3769b6 !important; } .forecast-navigation-grid a.is-active, .forecast-navigation-grid a:hover { background: #fff !important; } #current-weather-with-content { margin: -30px -40px 0; } .forecast-navigation-move { border-radius: 0 0 4px 4px; padding: 10px 10px 6px 10px; } .bottom-border--grey { border: none !important; } .sun-moon .sun { font-size: 18px; } .spaces-weather-grid .swg-row-wrapper { grid-template-columns: unset !important; } #cnt-with-location-attributes.flex-gap { gap: unset; } `); setInterval(() => { const hasUpdate = document.querySelector('#newRefresh .btn'); if (hasUpdate.offsetParent) { hasUpdate.click(); } }, 5000); const selectors = [ ['div.app-layout', 'News zum Thema Wetter'], ['div.app-layout', 'Wetter live in Deutschland'], ['div.app-layout', 'Webvideos aus aller Welt'], ['div.app-layout', 'Wetter Deutschland'], ['div.app-layout', 'Tipps für die Wahl des richtigen Lichtschutzfaktors'], ['div.c2', 'Mehr zum Wetter'], ['.layout__item', 'Aktuelle Videos für das Wetter in Deutschland'], ['.layout__item', 'Unwetterwarnungen'], ['.layout__item', '3-Tage-Wetter'], ['.pt--', 'Standort'], ]; selectors.forEach(([select, text]) => { const parents = Array.from(document.querySelectorAll(select)); const parentF = parents.filter(p => p.innerText.toLowerCase().startsWith(text.toLowerCase())); parentF.forEach(p => { p.style.display = 'none'; }); console.log(`[clean] Removed ${parentF.length} elements.`) })