Xhamster Progressbar Updater (@include FR etc...) v.1

Forces the Xhamster progress bar to update even when it's supposed to be hidden.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Xhamster Progressbar Updater (@include FR etc...) v.1
// @version      1.01
// @description  Forces the Xhamster progress bar to update even when it's supposed to be hidden.
// @icon       https://external-content.duckduckgo.com/ip3/fr.xhamster.com.ico
// @namespace https://greasyfork.org/en/users/7434-janvier56


// @match        https://xhamster.com/videos/*
// @match        https://*.xhamster.com/videos/*
// .xplayer.no-user-action .progress-bar .seeker

// @grant        none
// @namespace https://greasyfork.org/users/14014

// FROM - https://greasyfork.org/fr/scripts/11486-youtube-progressbar-updater

// ==/UserScript==

var findVideoInterval = setInterval(function() {

//    var ytplayer = document.querySelector(".html5-video-player:not(.addedupdateevents)");
var ytplayer = document.querySelector(".xplayer.no-user-action");
    if (!ytplayer) {
        return;
    }

//    ytplayer.className+=" addedupdateevents";
//ytplayer.className+=" no-user-action";

    var video = ytplayer.querySelector("video");

// BUFFER
//    var progressbar = ytplayer.querySelector(".ytp-play-progress");
var progressbar = ytplayer.querySelector(".xplayer.no-user-action .xp-progress-bar .seeker .buffer");

// FILLER
//    var loadbar = ytplayer.querySelector(".ytp-load-progress");
var loadbar = ytplayer.querySelector(".xplayer.no-user-action .xp-progress-bar .seeker .filler");

// HANDLE
//    var loadbar = ytplayer.querySelector(".ytp-load-progress");
var handle = ytplayer.querySelector(".xplayer.no-user-action .xp-progress-bar .seeker .handle");

//    if (!video || !progressbar || !loadbar) {
if (!video || !progressbar || !loadbar || !handle) {
        return;
    }
    video.addEventListener("timeupdate",function() {
        progressbar.style.transform = "scaleX("+(video.currentTime/video.duration)+")";
    });
    video.addEventListener("progress",function() {
        loadbar.style.transform = "scaleX("+(video.buffered.end(video.buffered.length-1)/video.duration)+")";
    });
},500);