Youtube Age Confirmation Bypass

Prevents you from having to sign in to view age restricted videos on YouTube

目前為 2014-08-04 提交的版本,檢視 最新版本

// ==UserScript==
// @name        Youtube Age Confirmation Bypass
// @namespace   kneels
// @description Prevents you from having to sign in to view age restricted videos on YouTube
// @include     https://www.youtube.com/*
// @include     http://*.youtube.com/*
// @include     https://*.youtube.com/*
// @match       http://*.youtube.com/*
// @match       https://*.youtube.com/*
// @exclude     http://apiblog.youtube.com/*
// @exclude     https://apiblog.youtube.com/*
// @version     1.2
// @grant       none
// ==/UserScript==

var message = document.getElementById('player-mole-container').innerHTML;

if(message.search("Content Warning") != -1) {
   var embedString =   "<iframe width=\"100%\" height=\"100%\" src='" + 
                       getEmbedUrl() +  
                       "?autoplay=1' frameborder=\"0\" allowfullscreen></iframe>";
   document.getElementById('player-unavailable').innerHTML = embedString;
}

function getEmbedUrl()
{
    var urlStr = window.location.href.replace('watch?v=', 'embed/');
    var junk = urlStr.indexOf("&");
    if(junk != -1) {
       urlStr = urlStr.substr(0, junk);        
    }
    return urlStr;
};

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址