Question Filester: Previewing or opening videos in a new window

StudyPern

Lurker
Joined
Nov 27, 2023
Posts
31
Reaction score
0
There are huge albums on filester, and i don't want to download everything in them... is there any effective way to at least get videos from the galleries to open in a new tab so i can preview them before i download? right clicking on thumbnails never gives the option to open in a new tab/window.

Large albums are basically impossible to use because navigating them is so time consuming. If you open one video and even try to just go back to the gallery, you need to click the 'reopen all pages' button to even get the full gallery back up.
 
Got AI to draft a userscript for me to do that. Install TamperMonkey, then add the following userscript:

Code:
		// ==UserScript==
// @name         Filester middle-click / new tab fix
// @match        https://filester.me/f/*
// @match        https://filester.sh/f/*
// @grant        none
// ==/UserScript==

(function() {
  function urlFor(el) {
    const m = (el.getAttribute('onclick') || '').match(/\/d\/[A-Za-z0-9]+/);
    return m ? location.origin + m[0] : null;
  }
  function fix(el) {
    if (el.dataset.newtabFixed) return;
    el.dataset.newtabFixed = "1";
    el.title = "Left: open | Middle/Ctrl+Click: new tab";

    el.addEventListener('mousedown', e => {
      if (e.button === 1) e.preventDefault(); // no autoscroll
    });
    el.addEventListener('auxclick', e => {
      if (e.button === 1) {
        e.preventDefault(); e.stopPropagation();
        const u = urlFor(el);
        if (u) window.open(u, '_blank', 'noopener');
      }
    });
    el.addEventListener('click', e => {
      if (e.ctrlKey || e.metaKey || e.shiftKey) {
        e.preventDefault(); e.stopPropagation();
        const u = urlFor(el);
        if (u) window.open(u, '_blank', 'noopener');
      }
    });

    // native  button: gives right-click > Open in new tab for free
    const u = urlFor(el);
    if (u && !el.querySelector('.newtab-btn')) {
      const a = document.createElement('a');
      a.href = u; a.target = '_blank'; a.rel = 'noopener';
      a.className = 'newtab-btn'; a.textContent = '↗';
      a.title = 'Open in new tab';
      a.style.cssText = 'position:absolute;top:.5rem;left:.5rem;background:rgba(0,0,0,.6);color:#fff;border-radius:6px;padding:2px 7px;text-decoration:none;z-index:5';
      a.addEventListener('click', e => e.stopPropagation());
      el.style.position = 'relative';
      el.appendChild(a);
    }
  }
  function scan() {
    document.querySelectorAll('.file-item').forEach(fix);
  }
  scan();
  new MutationObserver(scan).observe(document.body, {childList:true, subtree:true});
})();

Feel free to ask AI what it does, as it would be a bit crazy to just paste a script from a stranger lol
 
thanks for going to the effort - did it actually work for you though? I still can't get individual videos to open in a new tab/window.

i messed around with getting gemini to make a script that does work, but no luck.
 
Back
Top