← All posts

Tutorials

YouTube power-user: hide Shorts, auto-skip intro, custom shortcuts — 6 JustZix rules

YouTube in 2026 is 60% UI clutter, 40% video player. Shorts spam the feed, "Up next" auto-plays after 5s and leaves you anxious, sponsors take 30 seconds of every intro. All fixable in 6 JustZix rules. Domain match: *://youtube.com/* + *://www.youtube.com/*.

Rule 1 — CSS: Hide Shorts everywhere

/* Shorts shelf in the feed and sidebar */
ytd-rich-shelf-renderer[is-shorts],
ytd-reel-shelf-renderer,
a[title="Shorts"], a[href="/shorts"],
ytd-guide-entry-renderer:has(a[title="Shorts"]),
ytd-mini-guide-entry-renderer[aria-label="Shorts"] {
  display: none !important;
}
/* Shorts videos in search results */
ytd-video-renderer:has(a[href*="/shorts/"]) {
  display: none !important;
}

Rule 2 — CSS: Hide "Up next" + Suggested

/* Suggested videos sidebar (right side) */
ytd-watch-next-secondary-results-renderer { display: none !important; }
/* Plus: enlarge the video player to max-width */
ytd-watch-flexy[is-two-columns_] #primary {
  max-width: 100% !important;
}
ytd-watch-flexy #primary-inner #player {
  max-width: 1600px !important;
  margin: 0 auto !important;
}

Rule 3 — JS: Auto-skip ads

// JS rule. MutationObserver because the player rebuilds on each video.
const skipAds = () => {
  // Standard skip button after 5s
  const skip = document.querySelector('.ytp-ad-skip-button, .ytp-skip-ad-button');
  if (skip) skip.click();
  // "Sponsored video" overlay
  const close = document.querySelector('.ytp-ad-overlay-close-button');
  if (close) close.click();
  // Mute video player during ads (visual ads still play, but less annoying)
  const v = document.querySelector('video');
  const adShowing = document.querySelector('.ad-showing');
  if (v && adShowing && !v.muted) { v.muted = true; v.dataset.jzReMute = '1'; }
  if (v && !adShowing && v.dataset.jzReMute === '1') {
    v.muted = false; delete v.dataset.jzReMute;
  }
};
setInterval(skipAds, 500);
JUSTZIX.log('YouTube ad-skipper active.');

Rule 4 — JS: Keyboard shortcuts (J/L for ±10s, S for skip intro)

document.addEventListener('keydown', (e) => {
  // Ignore when typing in textarea/input (comments)
  if (['INPUT','TEXTAREA'].includes(e.target.tagName)) return;
  if (e.target.isContentEditable) return;
  const v = document.querySelector('video');
  if (!v) return;

  if (e.key === 'j' || e.key === 'J') { v.currentTime -= 10; e.preventDefault(); }
  if (e.key === 'l' || e.key === 'L') { v.currentTime += 10; e.preventDefault(); }
  // S = skip 30s (typical sponsor length in intros)
  if (e.key === 's' && !e.shiftKey) {
    v.currentTime += 30;
    JUSTZIX.log(`Skip +30s @ ${Math.round(v.currentTime)}s`);
    e.preventDefault();
  }
});

Rule 5 — JS: Disable autoplay next video

// Wait for player to load
const dis = setInterval(() => {
  const toggle = document.querySelector('[aria-label*="utoplay"]');
  if (toggle && toggle.getAttribute('aria-checked') !== 'false') {
    toggle.click();
    JUSTZIX.log('Autoplay disabled.');
    clearInterval(dis);
  }
}, 1000);

Rule 6 — BUTTON action: Screenshot with timestamp

Click → copies URL with &t=Xs timestamp and timestamp as text:

// Action BUTTON "📸 Share clip"
const v = document.querySelector('video');
if (!v) return;
const sec = Math.floor(v.currentTime);
const min = Math.floor(sec / 60);
const remSec = sec % 60;
const url = new URL(location.href);
url.searchParams.set('t', sec + 's');
const ts = `${min}:${String(remSec).padStart(2, '0')}`;
const result = `${url.toString()}\n(@ ${ts})`;
navigator.clipboard.writeText(result);
JUSTZIX.log(`Copied: ${url.toString()} (${ts})`);

Setup snapped in the top-right

Action bar with BUTTON "📸 Share" + TOGGLE3 "Quality" (Auto/720p/1080p) + SLIDER "Speed" (0.5x-2x). Snapped to the top-right corner. Output Console shows your JUSTZIX.log entries per action — because it tracks your actions, not YouTube's tracking.

What's next

Install JustZix and enjoy YouTube without clutter.

Rate this post

No ratings yet — be the first.

Try it yourself

Install JustZix and paste any snippet from this article. Two minutes from zero to a working rule across all your devices.

Get JustZix

Features · How it works · Examples · Use cases