Adjust google drive userscript prompt
This commit is contained in:
parent
aea456436e
commit
a56f0d5b10
4 changed files with 8 additions and 13 deletions
|
|
@ -6,7 +6,7 @@ window.GoogleDrivePlayer = class GoogleDrivePlayer extends VideoJSPlayer
|
|||
super(data)
|
||||
|
||||
load: (data) ->
|
||||
if not window.hasDriveUserscript and not data.meta.direct
|
||||
if not window.hasDriveUserscript
|
||||
window.promptToInstallDriveUserscript()
|
||||
else if window.hasDriveUserscript
|
||||
window.maybePromptToUpgradeUserscript()
|
||||
|
|
@ -31,5 +31,3 @@ window.GoogleDrivePlayer = class GoogleDrivePlayer extends VideoJSPlayer
|
|||
jitter: 500
|
||||
})
|
||||
, Math.random() * 1000)
|
||||
else
|
||||
super(data)
|
||||
|
|
|
|||
|
|
@ -112,9 +112,8 @@ window.promptToInstallDriveUserscript = ->
|
|||
alertBox.className = 'alert alert-info'
|
||||
alertBox.innerHTML = """
|
||||
Due to continual breaking changes making it increasingly difficult to
|
||||
maintain Google Drive support, you can now install a userscript that
|
||||
simplifies the code and has better compatibility. In the future, the
|
||||
old player will be removed."""
|
||||
maintain Google Drive support, Google Drive now requires installing
|
||||
a userscript in order to play the video."""
|
||||
alertBox.appendChild(document.createElement('br'))
|
||||
infoLink = document.createElement('a')
|
||||
infoLink.className = 'btn btn-info'
|
||||
|
|
@ -129,4 +128,4 @@ old player will be removed."""
|
|||
closeButton.onclick = ->
|
||||
alertBox.parentNode.removeChild(alertBox)
|
||||
alertBox.insertBefore(closeButton, alertBox.firstChild)
|
||||
document.getElementById('videowrap').appendChild(alertBox)
|
||||
removeOld($('<div/>').append(alertBox))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue