Add some big ol nags about no support for gdrive
This commit is contained in:
parent
adfe26aad1
commit
337e8cd1d3
4 changed files with 48 additions and 15 deletions
|
|
@ -57,3 +57,30 @@ a userscript in order to play the video."""
|
|||
alertBox.parentNode.removeChild(alertBox)
|
||||
alertBox.insertBefore(closeButton, alertBox.firstChild)
|
||||
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 = '×'
|
||||
closeButton.onclick = ->
|
||||
alertBox.parentNode.removeChild(alertBox)
|
||||
alertBox.insertBefore(closeButton, alertBox.firstChild)
|
||||
removeOld($('<div/>').append(alertBox))
|
||||
|
|
|
|||
|
|
@ -130,8 +130,11 @@ window.VideoJSPlayer = class VideoJSPlayer extends Player
|
|||
@player.src(@sources[@sourceIdx])
|
||||
else
|
||||
console.error('Out of sources, video will not play')
|
||||
if @mediaType is 'gd' and not window.hasDriveUserscript
|
||||
window.promptToInstallDriveUserscript()
|
||||
if @mediaType is 'gd'
|
||||
if not window.hasDriveUserscript
|
||||
window.promptToInstallDriveUserscript()
|
||||
else
|
||||
window.tellUserNotToContactMeAboutThingsThatAreNotSupported()
|
||||
)
|
||||
@setVolume(VOLUME)
|
||||
@player.on('ended', ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue