☰

MissAV - Wider Player

Videos player more wider

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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();
})();