Greasy Fork is available in English.
Automatically forwards country-blocked YouTube videos to youtubeunblocked.live and unblocks the video.
当前为
// ==UserScript==
// @name Youtube Unblocker
// @namespace YTUB
// @version 6.5
// @description Automatically forwards country-blocked YouTube videos to youtubeunblocked.live and unblocks the video.
// @author drhouse
// @match https://www.youtube.com/watch*
// @license CC-BY-NC-SA-4.0
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @locale en
// ==/UserScript==
(function() {
function getYouTubeID(url) {
var match = url.match(/[?&]v=([^&#]+)/);
return match ? match[1] : null;
}
setTimeout(function() {
var subreasonElem = document.getElementById('subreason');
if (subreasonElem && subreasonElem.textContent === 'The uploader has not made this video available in your country') {
var url = window.location.href;
var videoID = getYouTubeID(url);
location.replace('https://108.181.11.175/watch?v='+videoID+'&__cpo=aHR0cHM6Ly93d3cueW91dHViZS5jb20');
}
}, 1000);
})();