G/O UnSlideshow

Remove slideshows from Kinja sites and show them inline instead

  1. // ==UserScript==
  2. // @name G/O UnSlideshow
  3. // @version 1.0
  4. // @description Remove slideshows from Kinja sites and show them inline instead
  5. // @author T h e n o n y m o u s
  6. // @match https://kotaku.com/*
  7. // @match https://gizmodo.com/*
  8. // @match https://lifehacker.com/*
  9. // @match https://jalopnik.com/*
  10. // @match https://avclub.com/*
  11. // @match https://deadspin.com/*
  12. // @match https://theroot.com/*
  13. // @match https://thetakeout.com/*
  14. // @match https://theinventory.com/*
  15. // @match https://jezebel.com/*
  16. // @match https://theonion.com/*
  17. // @icon https://www.google.com/s2/favicons?sz=64&domain=g-omedia.com
  18. // @grant none
  19. // @namespace https://greasyfork.org/users/924302
  20. // ==/UserScript==
  21.  
  22. (function() {
  23. 'use strict';
  24.  
  25. let head = document.getElementsByTagName('head')[0];
  26. if (head) {
  27. let style = document.createElement('style');
  28. style.type = 'text/css';
  29. style.innerHTML = `
  30. .js_slide, #js_slideshow-comments-button { display: block !important; }
  31. [id^="js_slideshow-"], #js_slideshow-navigation { display: none !important; }
  32. `;
  33. head.appendChild(style);
  34. }
  35. Array.from(document.querySelectorAll(".js_slide img")).filter((x) => x.getAttribute("data-srcset")).forEach((x) => x.setAttribute("srcset", x.getAttribute("data-srcset")));
  36. })();