CSS: meteoblue.com

Minor corrections to UI of meteoblue.com

当前为 2021-01-01 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name          CSS: meteoblue.com
// @description   Minor corrections to UI of meteoblue.com
// @author        MK
// @homepage      https://greasyfork.org/en/scripts/419280
// @namespace     https://greasyfork.org/users/309172
// @include       https://www.meteoblue.com/*
// @include       http://www.meteoblue.com/*
// @version       1.2
// @note          v1.2 2021-01-01 - code is rewritten to add CSS to the end of the document instead of <HEAD> tag in order to overcome possible server side CSS with !important rule
// @note          v1.1 2020-12-29 - code rectified
// @note          v1.0 2020-12-28 - initial release
// ==/UserScript==

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

  /*Font size in hourly forecast table*/
  .hourly-forecast .hourlywind > tbody {
    font-size: 70% !important;
  }

  /*Dividers between cloud icons*/
  /*.hourly-forecasr .hourlywind > tbody > tr:nth-of-type(1),*/
  .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;
  }

  /*Active tab colour*/
  .tab.active {
    background: #ffc4000f !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;
  }

  /*Social icons*/
  .social {
    font-size: 100% !important;
  }
  .social a {
    font-size: 100% !important;
  }

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

  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);
  }
})();