thisVID.com Native Player (HTML5) and download

Replace video player with HTML5 native player (also enables download of videos)

Από την 08/02/2025. Δείτε την τελευταία έκδοση.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey 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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         thisVID.com Native Player (HTML5) and download
// @namespace    _pc
// @version      2
// @license      MIT
// @description  Replace video player with HTML5 native player (also enables download of videos)
// @author       verydelight
// @match        *://thisvid.com/videos/*
// @grant        none
// ==/UserScript==

(function() {
	'use strict';
	function insertVideo() {
		const videoElement = document.querySelector('video.fp-engine');
		if (!videoElement) return;
		const videoUrl = videoElement.src;
		const fpPlayer = document.querySelector('.fp-player');
		const ktPlayer = document.getElementById('kt_player');
		const imgElement = document.querySelector('.video-holder img');
		[fpPlayer, ktPlayer, imgElement].forEach(el => el?.remove());
		const newVideoElement = document.createElement('video');
		newVideoElement.src = videoUrl;
		newVideoElement.controls = true;
		newVideoElement.setAttribute("style", "width:100%;");
		const videoHolder = document.querySelector('.video-holder');
		if (videoHolder) {
			videoHolder.appendChild(newVideoElement);
			newVideoElement.play();
		}
		observer.disconnect();
	}
	const observer = new MutationObserver(mutations => {
		mutations.forEach(mutation => {
			if (mutation.addedNodes.length) {
				insertVideo();
			}
		});
	});
	const targetNode = document.body;
	const config = { childList: true, subtree: true };
	observer.observe(targetNode, config);
})();