CSS: marinetraffic.com

Corrections to UI of marinetraffic.com

目前为 2021-02-18 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name CSS: marinetraffic.com
  3. // @description Corrections to UI of marinetraffic.com
  4. // @author MK
  5. // @namespace max44
  6. // @homepage https://greasyfork.org/en/users/309172-max44
  7. // @include https://www.marinetraffic.com/*
  8. // @include http://www.marinetraffic.com/*
  9. // @version 1.1.1
  10. // @note v1.1.1 2021-02-18: @namespace and @homepage changed
  11. // @note v1.1 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
  12. // @note v1.0 2020-12-29: initial release
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. var css = `
  17. .under-map-wrapper {
  18. height: 0px !important;
  19. }
  20. /*Make the 2nd div (space under the map) in d-flex invisible*/
  21. .d-flex.flex-column.flex-1-1-auto.align-self-stretch > div:nth-of-type(2) {
  22. margin-top: 0px !important;
  23. margin-bottom: 0px !important;
  24. height: 0px !important;
  25. }
  26.  
  27. /*Make right panel invisible*/
  28. .d-flex.flexcol.align-items-start.justify-content-start.flex-wrap.flex-0-0-auto {
  29. margin-top: 0px !important;
  30. margin-bottom: 0px !important;
  31. height: 0px !important;
  32. width: 0px !important;
  33. }
  34.  
  35. .underMapAdMobile {
  36. margin-top: 0px !important;
  37. margin-bottom: 0px !important;
  38. height: 0px !important;
  39. width: 0px !important;
  40. }
  41. `;
  42.  
  43. if (typeof GM_addStyle != 'undefined') {
  44. GM_addStyle(css);
  45. } else if (typeof PRO_addStyle != 'undefined') {
  46. PRO_addStyle(css);
  47. } else if (typeof addStyle != 'undefined') {
  48. addStyle(css);
  49. } else {
  50. var node = document.createElement('style');
  51. node.type = 'text/css';
  52. node.appendChild(document.createTextNode(css));
  53. document.documentElement.appendChild(node);
  54. }
  55. })();