Support CloudTube

This commit is contained in:
Ajay Ramachandran
2021-04-08 18:42:13 -04:00
parent 5cf6719681
commit 4020cdc4f2
3 changed files with 15 additions and 9 deletions

View File

@@ -341,20 +341,23 @@
"keybindCurrentlySet": { "keybindCurrentlySet": {
"message": ". It is currently set to:" "message": ". It is currently set to:"
}, },
"supportInvidious": { "supportOtherSites": {
"message": "Support Invidious" "message": "Support 3rd Party YouTube-Sites"
}, },
"supportInvidiousDescription": { "supportOtherSitesDescription": {
"message": "Invidious (invidio.us) is a third party YouTube client. To enable support, you must accept the extra permissions. This does NOT work in incognito on Chrome and other Chromium variants." "message": "Support third party party YouTube clients. To enable support, you must accept the extra permissions. This does NOT work in incognito on Chrome and other Chromium variants."
},
"supportedSites": {
"message": "Supported Sites: "
}, },
"optionsInfo": { "optionsInfo": {
"message": "Enable Invidious support, disable autoskip, hide buttons and more." "message": "Enable Invidious support, disable autoskip, hide buttons and more."
}, },
"addInvidiousInstance": { "addInvidiousInstance": {
"message": "Add Invidious Instance" "message": "Add 3rd-Party Client Instance"
}, },
"addInvidiousInstanceDescription": { "addInvidiousInstanceDescription": {
"message": "Add a custom instance of Invidious. This must be formatted with JUST the domain. Example: invidious.ajay.app" "message": "Add a custom instance. This must be formatted with JUST the domain. Example: invidious.ajay.app"
}, },
"add": { "add": {
"message": "Add" "message": "Add"

View File

@@ -32,7 +32,7 @@
<br/> <br/>
<div id="support-invidious" option-type="toggle" sync-option="supportInvidious"> <div id="support-invidious" option-type="toggle" sync-option="supportInvidious">
<label class="switch-container" label-name="__MSG_supportInvidious__"> <label class="switch-container" label-name="__MSG_supportOtherSites__">
<label class="switch"> <label class="switch">
<input type="checkbox"> <input type="checkbox">
<span class="slider round"></span> <span class="slider round"></span>
@@ -42,7 +42,8 @@
<br/> <br/>
<br/> <br/>
<div class="small-description">__MSG_supportInvidiousDescription__</div> <div class="small-description">(__MSG_supportedSites__ Invidious, CloudTube)</div>
<div class="small-description">__MSG_supportOtherSitesDescription__ </div>
</div> </div>
<br/> <br/>

View File

@@ -23,7 +23,9 @@ class SkipNotice {
//get reference node //get reference node
let referenceNode = document.getElementById("player-container-id") let referenceNode = document.getElementById("player-container-id")
|| document.getElementById("movie_player") || document.querySelector("#player-container .video-js"); ?? document.getElementById("movie_player")
?? document.querySelector("#player-container .video-js") // Invidious
?? document.querySelector(".main-video-section > .video-container"); // Cloudtube
if (referenceNode == null) { if (referenceNode == null) {
//for embeds //for embeds
const player = document.getElementById("player"); const player = document.getElementById("player");