Skip to content

Google Drive Userscript Installation Guide

AssTractionHero edited this page Feb 23, 2017 · 48 revisions

This guide will walk you through the installation of a userscript necessary to play media hosted by Google Drive on newer CyTube installations. If you already know what a userscript is, get it here.

This userscript will work only if you connect to CyTube from cytu.be or www.cytu.be. Alternate addresses are not supported by this script.

Table of Contents

  1. Purpose
  2. Chrome
  3. Firefox
  4. [Third-party cookies] (#wiki-third-party-cookies)
  5. [AdBlock and Privacy Badger] (#wiki-adblock-and-privacy-badger)
  6. Other browsers

Purpose

Since Google Drive support was launched in early 2014, it has broken at least 4-5 times. Each time it required increased effort to repair, and disrupted the operation of many channels. Because there is no official API for it like there is for YouTube videos, support for it relies on undocumented tricks.

In August 2016, the decision was made to phase out the native support for Google Drive and instead require users to install a userscript. The userscript circumvents certain browser restrictions and makes the code easier to repair, simpler to write, and less prone to failure. (It could still break due to future Google Drive changes, but it will now be potentially easier to fix.) This short script is installed in a browser host extension, such as Tampermonkey or Greasemonkey. It runs on a CyTube page and provides additional functionality needed to play Google Drive videos.


Chrome

In order to run userscripts on Chrome you will need to install a userscript host browser extension called Tampermonkey. Once you've installed it, opening the CyTube Google Drive userscript link should turn the tab into an installation dialog. Here you may review the source code of the userscript. Once you are satisfied it only does what we said it does, click the install button.

  1. Open the Tampermonkey page on the Chrome Web Store site.
    Tampermonkey Extension
  2. Confirm the installation of the Tampermonkey extension in Chrome.
    Confirming Tampermonkey
  3. Install the CyTube Google Drive userscript.
    Installing the userscript

Firefox

For Firefox, you can install the Tampermonkey addon from here, then follow the same steps as for Chrome to install the userscript.

The script is also compatible with Greasemonkey.


Third-party cookies

In both the Chrome and the Firefox installations of the userscript, it's important that your browser does not block third-party cookies.

In Chrome, that setting is found in Settings: Show advanced settings... > Privacy: Content settings... > Cookies, or from entering chrome://settings/content into the omnibox. Either the checkbox for Block third-party cookies and site data should be unchecked, or an exception for cytu.be should be made by clicking on the Manage exceptions... button.

In Firefox, the third-party cookies setting is found in Options > Privacy: History, or from entering about:preferences#privacy into the omnibox. It's shown only if Firefox uses custom settings for the History. The Accept cookies from sites checkbox should be checked and Accept third-party cookies should be set to Always, or an exception should be made for cytu.be by clicking on the Exceptions... button.


AdBlock and Privacy Badger

Other extensions such as AdBlock and Privacy Badger may also block the necessary trackers for Google Drive playback on CyTube, even if third-party cookies are not being blocked. Disabling the AdBlock or Privacy Badger extensions while on the CyTube site should fix this problem.


Other browsers

Other browsers should work much the same way, install a userscript host extension/plugin and then installing the userscript into it. Tampermonkey supports most browsers.

Clone this wiki locally