Guest User

Untitled

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