Greasy Fork is available in English.

CSS: meteoblue.com

Corrections to UI of meteoblue.com

2022-07-19 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

// ==UserScript==
// @name          CSS: meteoblue.com
// @description   Corrections to UI of meteoblue.com
// @author        MK
// @namespace     max44
// @homepage      https://gf.zukizuki.org/en/users/309172-max44
// @match         *://www.meteoblue.com/*
// @icon          https://www.meteoblue.com/favicon.ico
// @version       1.3.6
// @license       MIT
// ==/UserScript==

(function() {
  //CSS for any mode
  var cssUniversal = `
  /*Position of cloud icons*/
  .picto .weekday.alt {
    line-height: unset !important;
  }

  /*Font size of temperature*/
  .tab-content .tab-temp-max, .tab-content .tab-temp-min {
    line-height: 24.5px;
    font-size: 17.5px;
  }

  /*Position and background of meteo condition icons in hourly forecast table*/
  .hourly-forecast .hourlywind .pictoicon {
    top: 0px !important;
    position: relative !important;
  }
  tr.pictos-1h .picon {
    border-radius: 0px !important;
  }
  tr.pictos-1h > td > div > div[class$='_day'] {
    background-color: #88b7df !important;
  }
  tr.pictos-1h > td > div > div[class$='_night'] {
    background-color: #193f57 !important;
  }

  /*Position of precipitation data in hourly forecast table*/
  .hourly-forecast .hourlywind .precip td span {
    position: unset !important;
  }
  .glyph.rain1h {
    margin-top: -49px !important;
  }
  .hourly-forecast .hourlywind .precip th span:not(.glyph.rain1h)/*:not([style^='margin-top'])*/ {
    position: unset !important;
  }

  /*Dividers between cloud icons on 3 hours table*/
  .hourly-forecast .hourlywind tr.pictos_3h td {
    padding: 0 !important;
    border-right-color: gray !important;
    border-right-style: solid !important;
    border-right-width: thin !important;
  }

  /*Headers*/
  h2, h3 {
    font-size: 150% !important;
  }

  /*Adblock warning*/
  /*div[filter] {
    filter: none !important;
  }*/
  .page-header, .wrapper-main, .wrapper-sda, .navigation-scroll-container, .footer, .footer-quick {
    filter: none !important;
  }
  .unblock-div {
    display: none !important;
  }
  body.unblock {
    overflow: visible !important;
    margin-right: 0px !important;
  }
  `;

  //CSS for light mode only
  var cssLight = `
  /*Active tab colour*/
  .tab.active {
    background: #fffeefff !important;
    /*background: #ffffff !important;*/
  }
  /*Tab colour*/
  .tab {
    background: #e7ecf0 !important;
    /*background: #eaeaea !important;*/
  }
  /*Predictability meter background*/
  .tab_content .tab_predictability .meter_outer {
    background-color: hsl(0, 0%, 96.9%) !important;
  }

  /*Font color of precipitation probability in hourly forecast table*/
  tr.precip-prop > td > span {
    color: rgb(0, 64, 128) !important;
  }
  /*Font color of precipitation data in hourly forecast table*/
  .hourly-forecast .hourlywind .precip td span {
    color: rgb(0, 64, 128) !important;
  }
  `;

  //Change body class to remove adblock warning
  const body = document.querySelector("body.unblock");
  if (body != null) {
    body.setAttribute("class", "                    ");
  }

  const bodyMode = document.querySelector("body.dark");
  var css;
  if (bodyMode != null) {
    css = cssUniversal;
  } else {
    css = cssUniversal + cssLight;
  }

  if (typeof GM_addStyle != 'undefined') {
    GM_addStyle(css);
  } else if (typeof PRO_addStyle != 'undefined') {
    PRO_addStyle(css);
  } else if (typeof addStyle != 'undefined') {
    addStyle(css);
  } else {
    var node = document.createElement('style');
    node.type = 'text/css';
    node.appendChild(document.createTextNode(css));
    document.documentElement.appendChild(node);
  }
})();