Redirect YT video to embedded video

Redirects any opened YT video to the YT embedded video to make the video take the whole screen.

目前為 2021-11-18 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Redirect YT video to embedded video
// @namespace    YTRedir
// @version      0.1
// @description  Redirects any opened YT video to the YT embedded video to make the video take the whole screen.
// @author       hacker09
// @match        https://www.youtube.com/watch?v=*
// @match        https://m.youtube.com/watch?v=*
// @icon         https://www.youtube.com/s/desktop/03f86491/img/favicon.ico
// @run-at       document-start
// @grant        none
// ==/UserScript==
 
(function() {
  'use strict';
  var NoFeature = location.href.replace('&feature=emb_title', '');
  var YTID = 'https://www.youtube.com/embed/' + location.search.replace('?v=', '') + '?autoplay=1';
  location = NoFeature.replace(location.href, YTID);
})();