CSS: windy.com

Corrections to UI of windy.com

  1. // ==UserScript==
  2. // @name CSS: windy.com
  3. // @description Corrections to UI of windy.com
  4. // @author MK
  5. // @namespace max44
  6. // @homepage https://greasyfork.org/en/users/309172-max44
  7. // @match *://*.windy.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=windy.com
  9. // @version 1.0
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. //Workaround: This document requires 'TrustedHTML' assignment
  17. if (window.trustedTypes && trustedTypes.createPolicy) {
  18. if (!trustedTypes.defaultPolicy) {
  19. const passThroughFn = (x) => x;
  20. trustedTypes.createPolicy('default', {
  21. createHTML: passThroughFn,
  22. createScriptURL: passThroughFn,
  23. createScript: passThroughFn,
  24. });
  25. }
  26. }
  27.  
  28. var css = `
  29. /*Hide go premium button*/
  30. #desktop-premium-icon, .premium-button {
  31. display: none !important;
  32. }
  33.  
  34. /*Hide premium map selectors*/
  35. .map-selector a.clickable:has(.premium-flag) {
  36. display: none !important;
  37. }
  38.  
  39. /*Hide premium features*/
  40. .data-table .extended,
  41. #detail-box-desktop > div:has(.premium-flag),
  42. #plugin-detail .height-tides, #plugin-detail .legend-sst {
  43. display: none !important;
  44. }
  45.  
  46. /*Hide watermark*/
  47. .premium-calendar #map-container::after {
  48. background-image: none !important;
  49. }
  50.  
  51. /*Hide startup articles*/
  52. [data-plugin="startup-articles"] {
  53. display: none !important;
  54. }
  55.  
  56. /*Make logo smaller*/
  57. #device-mobile #logo {
  58. left: 0 !important;
  59. margin-left: 10px !important;
  60. top: 0px !important;
  61. }
  62. .animated-windy-logo .w-sprite {
  63. width: 16px !important;
  64. height: 16px !important;
  65. background-size: 864px 16px !important;
  66. }
  67. .animated-windy-logo .text {
  68. width: 55px !important;
  69. }
  70. `;
  71.  
  72. if (typeof GM_addStyle != 'undefined') {
  73. GM_addStyle(css);
  74. } else if (typeof PRO_addStyle != 'undefined') {
  75. PRO_addStyle(css);
  76. } else if (typeof addStyle != 'undefined') {
  77. addStyle(css);
  78. } else {
  79. var node = document.createElement('style');
  80. node.type = 'text/css';
  81. node.appendChild(document.createTextNode(css));
  82. document.documentElement.appendChild(node);
  83. }
  84. })();