v1.7.1/add stan

This commit is contained in:
2020-09-08 11:08:49 -04:00
parent aa900dc874
commit 993a8b8dec
5 changed files with 39 additions and 4 deletions
+2
View File
@@ -35,6 +35,7 @@ export const PLAYER_SOURCE = {
VIKI: 'viki.',
FUNIMATION: 'funimation.',
ROOSTERTEETH: 'roosterteeth.',
STAN: 'stan.',
LOCAL: 'localhost',
};
@@ -55,6 +56,7 @@ export const getPlayerSource = () => {
if (HREF.includes(PLAYER_SOURCE.VIKI)) return PLAYER_SOURCE.VIKI;
if (HREF.includes(PLAYER_SOURCE.FUNIMATION)) return PLAYER_SOURCE.FUNIMATION;
if (HREF.includes(PLAYER_SOURCE.ROOSTERTEETH)) return PLAYER_SOURCE.ROOSTERTEETH;
if (HREF.includes(PLAYER_SOURCE.STAN)) return PLAYER_SOURCE.STAN;
if (HREF.includes(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL;
};
+23
View File
@@ -168,6 +168,10 @@ export default class VideoListener {
time: serverPlayer.time,
})
);
break;
case PLAYER_SOURCE.STAN:
this.video.element.currentTime = serverPlayer.time;
break;
default:
break;
}
@@ -352,6 +356,12 @@ export default class VideoListener {
return roosterTeethShow === '' && roosterTeethEpisode === ''
? null
: roosterTeethShow + '\n' + roosterTeethEpisode;
case PLAYER_SOURCE.STAN:
const stanShowContainer = document.querySelector(nS.show);
const stanEpisodeContainer = document.querySelector(nS.episode);
const stanShow = stanShowContainer ? stanShowContainer.innerHTML : '';
const stanEpisode = stanEpisodeContainer ? stanEpisodeContainer.innerHTML : '';
return stanShow === '' && stanEpisode === '' ? null : stanShow + '\n' + stanEpisode;
default:
break;
}
@@ -754,6 +764,19 @@ export default class VideoListener {
);
}
break;
case PLAYER_SOURCE.STAN:
const stanVideoElement = document.querySelector(this.selectors[PLAYER_SOURCE.STAN]);
if (stanVideoElement) {
this.firstTimeSync(stanVideoElement);
} else {
setInterval(() => {
var sve = document.querySelector(this.selectors[PLAYER_SOURCE.STAN]);
if (sve && !this.video.element && this.video.element !== sve) {
this.firstTimeSync(sve);
}
}, 1000);
}
break;
default:
break;
}
+7 -2
View File
@@ -282,14 +282,12 @@ body.roosterteeth.visible .party-content-wrapper textarea:focus {
box-shadow: none !important;
}
/* VIKI */
body.viki .party-content-wrapper input,
body.viki .party-content-wrapper input:focus {
padding: 18.5px 14px !important;
padding-top: 10.5px !important;
padding-bottom: 10.5px !important;
}
body.viki .party-content-wrapper input,
body.viki .party-content-wrapper input:focus,
body.viki .party-content-wrapper textarea,
@@ -298,6 +296,13 @@ body.viki .party-content-wrapper textarea:focus {
box-shadow: none !important;
margin: 0 !important;
}
/* STAN */
body.stan.visible #playercontainer {
max-width: var(--body-width);
}
body.stan.visible header.site-header {
max-width: var(--body-width);
}
#party-loading {
position: absolute;
+3
View File
@@ -131,6 +131,9 @@ switch (getPlayerSource()) {
case PLAYER_SOURCE.ROOSTERTEETH:
document.body.classList.add('roosterteeth');
break;
case PLAYER_SOURCE.STAN:
document.body.classList.add('stan');
break;
case PLAYER_SOURCE.LOCAL:
document.body.classList.add('local');
break;