Remove spaces at the sides

Removes the empty space on shitty manga sites, also makes real zooming actually work

  1. // ==UserScript==
  2. // @name Remove spaces at the sides
  3. // @namespace https://greasyfork.org/en/users/434434-lagradost
  4. // @match https://isekaiscan.com/manga/*/*/
  5. // @match https://manhuas.net/manhua/*/*/
  6. // @match https://toonily.com/webtoon/*/*/
  7. // @match https://mangazuki.online/mangas/*/*/
  8. // @grant none
  9. // @version 2.1
  10. // @author Ost
  11. // @description Removes the empty space on shitty manga sites, also makes real zooming actually work
  12. // ==/UserScript==
  13.  
  14. document.querySelector("div.content-area > div.container").classList.remove("container");
  15. /*img = document.getElementsByClassName('img'); //Since all the sites are copy-pasted it works
  16. for (var i = 0; i < img.length; i++) {
  17. console.log(img[i]);
  18. img[i].style.backgroundRepeat="no-repeat";
  19. img[i].style.backgroundSize="contain";
  20. img[i].style.width="100%";
  21. }*/
  22.  
  23. var sheet = window.document.styleSheets[0];
  24. sheet.insertRule('img { background-repeat: no-repeat; background-size: contain;width: 100%; } ', sheet.cssRules.length);
  25. sheet.insertRule('.reading-manga .reading-content {padding: 0px !important;}', sheet.cssRules.length);