CSS: marinetraffic.com

Cleaning of UI from useless details

目前为 2020-12-29 提交的版本,查看 最新版本

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