Better xHamster.com

Make video player larger, scroll to video, remove hover shadows - 12/22/2021, 02:06:49 AM

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 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        Better xHamster.com
// @namespace   Violentmonkey Scripts
// @match       https://xhamster.com/videos/*
// @grant       none
// @version     1.3
// @author      -
// @description Make video player larger, scroll to video, remove hover shadows - 12/22/2021, 02:06:49 AM
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// ==/UserScript==

this.$ = jQuery.noConflict(true)

// make large player take up full height of window
$("<style type='text/css'> div.xplayer-large-mode{ height: 750px !important } </style>").appendTo("head")


$("div.width-wrap.with-player-container").first().ready(function () {

  // get rid of the idiotic hover shadows
  $("div.xplayer-background-top").remove()
  $("div.xplayer-background-bottom").remove()

  // make player large by default
  player = $("div#player-container");

  if(! player.hasClass("xplayer-large-mode")) {
    $("div.large-mode").trigger("click")
  }
  if($("html").scrollTop() == 0) {
    player[0].scrollIntoView({
      behavior: 'instant',
      block: 'end',
      inline: 'center'
    });
  }
})