Block Short Video Carousel View

Block the short video carousel view on dzen.ru

  1. // ==UserScript==
  2. // @name Block Short Video Carousel View
  3. // @namespace http://dzen.ru/
  4. // @version 0.4
  5. // @description Block the short video carousel view on dzen.ru
  6. // @author Your Name
  7. // @match https://dzen.ru/*
  8. // @require https://code.jquery.com/jquery-3.6.0.min.js
  9. // @grant GM_addStyle
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. /* global jQuery */
  14.  
  15. var observer = new MutationObserver(function(mutations) {
  16. mutations.forEach(function(mutation) {
  17. if (mutation.addedNodes) {
  18. jQuery('.short-video-carousel-view').hide();
  19. }
  20. });
  21. });
  22.  
  23. var config = { childList: true, subtree: true };
  24. observer.observe(document.body, config);
  25.  
  26. GM_addStyle('.short-video-carousel-view { display: none !important; }');