Add some big ol nags about no support for gdrive

This commit is contained in:
Calvin Montgomery 2021-08-08 09:49:20 -07:00
parent adfe26aad1
commit 337e8cd1d3
4 changed files with 48 additions and 15 deletions

View File

@ -2,7 +2,7 @@
"author": "Calvin Montgomery", "author": "Calvin Montgomery",
"name": "CyTube", "name": "CyTube",
"description": "Online media synchronizer and chat", "description": "Online media synchronizer and chat",
"version": "3.78.0", "version": "3.78.1",
"repository": { "repository": {
"url": "http://github.com/calzoneman/sync" "url": "http://github.com/calzoneman/sync"
}, },

View File

@ -57,3 +57,30 @@ a userscript in order to play the video."""
alertBox.parentNode.removeChild(alertBox) alertBox.parentNode.removeChild(alertBox)
alertBox.insertBefore(closeButton, alertBox.firstChild) alertBox.insertBefore(closeButton, alertBox.firstChild)
removeOld($('<div/>').append(alertBox)) removeOld($('<div/>').append(alertBox))
window.tellUserNotToContactMeAboutThingsThatAreNotSupported = ->
if document.getElementById('prompt-no-gdrive-support')
return
alertBox = document.createElement('div')
alertBox.id = 'prompt-no-gdrive-support'
alertBox.className = 'alert alert-danger'
alertBox.innerHTML = """
CyTube has detected an error in Google Drive playback. Please note that the
staff in CyTube support channels DO NOT PROVIDE SUPPORT FOR GOOGLE DRIVE. It
is left in the code as-is for existing users, but we will not assist in
troubleshooting any errors that occur.<br>"""
alertBox.appendChild(document.createElement('br'))
infoLink = document.createElement('a')
infoLink.className = 'btn btn-danger'
infoLink.href = 'https://github.com/calzoneman/sync/wiki/Frequently-Asked-Questions#why-dont-you-support-google-drive-anymore'
infoLink.textContent = 'Click here for details'
infoLink.target = '_blank'
alertBox.appendChild(infoLink)
closeButton = document.createElement('button')
closeButton.className = 'close pull-right'
closeButton.innerHTML = '&times;'
closeButton.onclick = ->
alertBox.parentNode.removeChild(alertBox)
alertBox.insertBefore(closeButton, alertBox.firstChild)
removeOld($('<div/>').append(alertBox))

View File

@ -130,8 +130,11 @@ window.VideoJSPlayer = class VideoJSPlayer extends Player
@player.src(@sources[@sourceIdx]) @player.src(@sources[@sourceIdx])
else else
console.error('Out of sources, video will not play') console.error('Out of sources, video will not play')
if @mediaType is 'gd' and not window.hasDriveUserscript if @mediaType is 'gd'
if not window.hasDriveUserscript
window.promptToInstallDriveUserscript() window.promptToInstallDriveUserscript()
else
window.tellUserNotToContactMeAboutThingsThatAreNotSupported()
) )
@setVolume(VOLUME) @setVolume(VOLUME)
@player.on('ended', -> @player.on('ended', ->

View File

@ -3,18 +3,21 @@ extends layout.pug
block content block content
.col-md-8.col-md-offset-2 .col-md-8.col-md-offset-2
h1 Google Drive Userscript h1 Google Drive Userscript
h2 Why? h2 Disclaimer
.alert.alert-danger.messagebox
strong Unsupported
p. p.
Since Google Drive support was launched in early 2014, it has broken This functionality is provided <strong>as-is</strong> for backwards
at least 4-5 times, requiring increasing effort to get it working again compatibility for existing users for whom it already is known to work.
and disrupting many channels. This is because there is no official API There are many reasons, known and unknown, for which it may
for it like there is for YouTube videos, which means support for it <strong>not</strong> work for you; please note the staff in CyTube
relies on undocumented tricks. In August 2016, the decision was made support channels cannot provide any troubleshooting assistance and you
to phase out the native support for Google Drive and instead require will be asked to simply use a different video provider.
users to install a userscript, which allows to bypass certain browser p.
restrictions and make the code easier, simpler, and less prone to failure This functionality was originally added so that users could share their
(it could still break due to future Google Drive changes, but is less own personal videos stored in their Drive. No support whatsoever will
likely to be difficult to fix). be provided to users attempting to use it to circumvent copyright
restrictions on third-party video hosts.
h2 How It Works h2 How It Works
p. p.
The userscript is a short script that you can install using a browser The userscript is a short script that you can install using a browser