redditp mobile friendly

better buttons

  1. // ==UserScript==
  2. // @name redditp mobile friendly
  3. // @namespace redditp.mobile.friendly
  4. // @version 2025-05-14
  5. // @description better buttons
  6. // @author You
  7. // @match https://redditp.com/*
  8. // @match https://www.redditp.com/*
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. for (const id of ['prevButton', 'nextButton']) {
  16. const left = id == 'prevButton';
  17. const button = document.getElementById(id);
  18. if (button) {
  19. button.style.left = "0xp";
  20. if (left) {
  21. button.style.top = "0px";
  22. } else {
  23. button.style.top = "50%";
  24. }
  25. button.style.height = "50%";
  26. button.style.width = "90%";
  27. button.style.opacity = "0";
  28. } else {
  29. console.log(`couldn't find button: ${id}`);
  30. }
  31. }
  32. console.log('applied redditp optimization');
  33. })();
  34.  
  35. /*
  36. (function() {
  37. 'use strict';
  38. for (const id of ['prevButton', 'nextButton']) {
  39. const button = document.getElementById(id);
  40. if (button) {
  41. button.style.height = "100%";
  42. button.style.width = "50%";
  43. button.style.opacity = "0";
  44. button.style.top = "0px";
  45. }
  46. }
  47. })();
  48. */