☰

MissAV - Wider Player

Videos player more wider

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램을 먼저 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

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