UI changes

Test resizing AH/DLP/SB/SV/QQ ui for mobile and remove a few buttons

Από την 21/05/2025. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name        UI changes
// @description Test resizing AH/DLP/SB/SV/QQ ui for mobile and remove a few buttons
// @author      C89sd
// @version     1.6
// @namespace   https://greasyfork.org/users/1376767
// @match       https://www.alternatehistory.com/*
// @match       https://forums.spacebattles.com/*
// @match       https://forums.darklordpotter.net/*
// @match       https://questionablequesting.com/*
// @match       https://forum.questionablequesting.com/*
// @match       https://forums.sufficientvelocity.com/*
// @grant       GM_addStyle
// @run-at      document-start
// ==/UserScript==

const css = `
#XF, #XenForo { font-size: 0.9375em !important;  }

html, body { font-size: 15px !important;  line-height: 1.3 !important; }

h1.p-title-value { font-size: 18px !important; }
.threadmarkListingHeader-content.threadmarkListingHeader-content--info.with-icon { display: none !important; } /* QQ: hide title below img */


.structItem-title, .node-title {    font-size: 14px !important; }
.structItem-minor, .node-meta, .node-extra  {    font-size: 12px !important; line-height: 1.3 !important; }
.structItem-pageJump { font-size: 10px !important; }
.tagItem {             font-size: 10px !important; }
.structItem-cell {     font-size: 12px !important; }
.pageNavSimple-el {    font-size: 12px !important; }
.p-breadcrumbs { font-size: 12px !important; }

.button--link { font-size: 12px !important;}
.threadmarkListingHeader-contentLink { font-size: 12px !important; }
#top, .inputGroup, .input--inline { font-size: 12px !important; }

.structItem-tagBlock {
  padding-top: 4px !important;
  display: block !important;
}

:root {
  --padTOP: 1px;
  --padBOTTOM: 2px;
}
.structItem-cell--icon {
  width: 54px !important;
  padding: calc(10px + var(--padTOP)) 9px 10px 9px !important;       /* ADD TOP PADDING */
}

.structItem-cell--main, .node-main {
  padding-top: calc(5px + var(--padTOP)) !important;        /* ADD TOP PADDING */
  padding-bottom: 2px !important;

}
.structItem-cell--latest, .structItem-cell--meta {
  padding-right: 8px !important;
  padding-bottom: calc(8px + var(--padBOTTOM)) !important;    /* ADD BOTTOM PADDING */
}



/* Remove ignore button */
.structItem-ignore  { display: none !important; }
`;
GM_addStyle(css);



window.addEventListener('DOMContentLoaded', () => {
  // Replace 'Thread Tools' with 'Mark threadmarks read'
  const A = Array.from(document.querySelectorAll('.menuTrigger')).find(e => e.textContent === 'Thread Tools');
  const B = Array.from(document.querySelectorAll('.menu-linkRow')).find(e => e.textContent === 'Mark threadmarks read');
  if (A && B) {
    A.classList.remove('menuTrigger');
    A.style.display = 'flex';
    A.textContent = B.textContent;
    A.addEventListener('click', function(e) {
      e.stopPropagation();
      e.preventDefault();
      B.click();
    });
  }

  // Remove thread ignore button.
  const btn = document.querySelector('.button--link[data-sk-ignore="Ignore"]');
  if (btn) btn.remove();
});