☰

MissAV - Wider Player

Videos player more wider

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

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

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

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

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

You will need to install a user script manager extension 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.

(I already have a user style manager, let me install it!)

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