🏠 Home 

WME Mini ScrollBar

Reduces the thickness of the scroll bar. (Only Chrome)

  1. // ==UserScript==
  2. // @name WME Mini ScrollBar
  3. // @name:fr WME Mini ScrollBar
  4. // @namespace https://greasyfork.org/fr/users/150543
  5. // @version 0.0.1
  6. // @description:fr Réduit l'épaisseur de la barre de défilement dans WME (Seulement sur Chrome)
  7. // @description Reduces the thickness of the scroll bar. (Only Chrome)
  8. // @include https://*.waze.com/*editor*
  9. // @include https://www.waze.com/editor*
  10. // @include https://www.waze.com/*/editor*
  11. // @include https://beta.waze.com/*/editor*
  12. // @include https://beta.waze.com/*/editor*
  13. // @exclude https://*.waze.com/user/*
  14. // @exclude https://*.waze.com/*/user/*
  15. // @run-at document-start
  16. // @compatible chrome
  17. // @grant none
  18. // ==/UserScript==
  19. (function() {
  20. 'use strict';
  21. const scrollbarWidth = 8,
  22. thumbBorderWidth = 1,
  23. thumbBorderColor = "rgba(255, 255, 255, 0.4)",
  24. scrollbarMouseOverColor = 'rgba(128, 128, 128, 0.2)',
  25. thumbColor = 'rgba(0, 0, 0, 0.4)',
  26. thumbMouseOverColor = 'rgba(0, 0, 0, 0.8)';
  27. let a = document.createElement('style');
  28. a.textContent = `
  29. <!--
  30. ::-webkit-scrollbar{
  31. width: ${scrollbarWidth}px !important;
  32. height: ${scrollbarWidth}px !important;
  33. background:transparent;
  34. filter: invert();
  35. }
  36. ::-webkit-scrollbar:hover {
  37. background: ${scrollbarMouseOverColor};
  38. }
  39. ::-webkit-scrollbar-thumb {
  40. border: ${thumbBorderWidth}px solid ${thumbBorderColor} !important;
  41. background-color: ${thumbColor} !important;
  42. z-index: 2147483647;
  43. -webkit-border-radius: 12px;
  44. background-clip: content-box;
  45. }
  46. ::-webkit-scrollbar-corner {
  47. background: rgba(255, 255, 255, 0.3);
  48. border: 1px solid transparent
  49. }
  50. ::-webkit-scrollbar-thumb:hover {
  51. background-color: ${thumbMouseOverColor} !important;
  52. }
  53. ::-webkit-scrollbar-thumb:active {
  54. background-color: rgba(0, 0, 0, 0.6) !important
  55. }
  56. -->
  57. `;
  58. let doc;
  59. if (location.origin === "file://") {
  60. doc = document.head || document.documentElement;
  61. } else {
  62. doc = document.body || document.documentElement;
  63. }
  64. doc.appendChild(a);
  65. })();