Guest User

Untitled

a guest
Jul 14th, 2025
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.91 KB | Source Code | 0 0
  1. javascript:(function(){
  2.     const customStyles = `
  3.     :not(.katex):not(.katex *) {
  4.         font-family: Arial, sans-serif !important;
  5.     }
  6.     :not(.katex) code:not(.katex *), :not(.katex) span:not(.katex *) {
  7.         font-family: Menlo, monospace !important;
  8.         white-space: pre-wrap !important;
  9.         overflow-wrap: break-word !important;
  10.     }
  11.     :not(.katex) .overflow-auto:not(.katex *), :not(.katex *) .overflow-auto {
  12.         overflow: visible !important;
  13.     }
  14.     :not(.katex) .h-full:not(.katex *), :not(.katex *) .h-full {
  15.         height: auto !important;
  16.     }
  17.     :not(.katex) #text:not(.katex *), :not(.katex *) #text {
  18.         white-space: pre-wrap !important;
  19.     }
  20.     a[data-skip-to-content], #thread-bottom-container, #stage-slideover-sidebar {
  21.         display: none;
  22.     }
  23.     * {
  24.         scrollbar-width: none;
  25.     }
  26.     `;
  27.     const styleSheet = document.createElement("style");
  28.     styleSheet.type = "text/css";
  29.     styleSheet.innerText = customStyles;
  30.     document.head.appendChild(styleSheet);
  31.     const copyButtonParentDivs = document.evaluate("//div[@id='thread']//article//div[./div[./button[@aria-label='Copy']]]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  32.     for (let i = 0; i < copyButtonParentDivs.snapshotLength; i++) {
  33.         const node = copyButtonParentDivs.snapshotItem(i);
  34.         if (node) node.remove();
  35.     }
  36.     const hiddenDiv = document.querySelector("div.draggable:has(~ main#main)");
  37.     if (hiddenDiv) {
  38.         hiddenDiv.style.display = "none";
  39.     }
  40.     const endspacerDivXPathResult = document.evaluate("//div[div/main[@id='main']]/following-sibling::div[1]", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  41.     if (endspacerDivXPathResult) {
  42.         const endspacerDiv = endspacerDivXPathResult.singleNodeValue;
  43.         if (endspacerDiv) {
  44.             endspacerDiv.style.display = "none";
  45.         }
  46.     }
  47. })();
  48.  
Advertisement
Add Comment
Please, Sign In to add comment