☰

MissAV - Wider Player

Videos player more wider

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         MissAV - Wider Player
// @icon         https://i.ytimg.com/vi/dFZI0oMybkM/hqdefault.jpg
// @namespace    Stevie B
// @author       Stevie B
// @license      CC-BY-NC-SA-4.0
// @version      1.0
// @description  Videos player more wider
// @match        *://missav.ws/*
// @match        *://missav.live/*
// @match        *://missav.fans/*
// @match        *://missav123.com/*
// @match        *://missav.ai/*
// @match        *://missav.com/*
// @match        *://missav.media/*
// @run-at       document-idle
// @grant        none
// ==/UserScript==

(() => {
  'use strict';

  const sideSelector = 'div.hidden.lg\\:flex.h-full.ml-6.order-last';
  const gridSelector = 'div.grid.grid-cols-2.md\\:grid-cols-3.xl\\:grid-cols-4.gap-5';

  function combineRecommendations() {
    const side = document.querySelector(sideSelector);
    const grid = document.querySelector(gridSelector);
    if (!side || !grid) return false;

    side.querySelectorAll('.flex.mb-6').forEach(card => {
      if (card.dataset.missavMoved) return;
      card.dataset.missavMoved = '1';
      card.className = 'thumbnail group missav-moved-card';
      grid.append(card);
    });

    if (side.querySelectorAll('.flex.mb-6').length === 0) side.style.display = 'none';
    return true;
  }

  function start() {
    const side = document.querySelector(sideSelector);
    if (!side || !combineRecommendations()) {
      setTimeout(start, 300);
      return;
    }

    const observer = new MutationObserver(combineRecommendations);
    observer.observe(side, { childList: true, subtree: true });
  }

  const style = document.createElement('style');
  style.textContent = `
    .missav-moved-card { display: block !important; margin: 0 !important; width: auto !important; }
    .missav-moved-card > .flex-none { width: auto !important; margin: 0 !important; }
    .missav-moved-card > .flex-1 { width: auto !important; margin-top: .5rem; }
    .missav-moved-card .h-full { height: auto !important; }
  `;
  document.head.append(style);
  start();
})();