v1.7.1/add stan
This commit is contained in:
@@ -24,7 +24,8 @@
|
|||||||
"https://tv.apple.com/*",
|
"https://tv.apple.com/*",
|
||||||
"https://*.viki.com/*",
|
"https://*.viki.com/*",
|
||||||
"https://*.funimation.com/*",
|
"https://*.funimation.com/*",
|
||||||
"https://*.roosterteeth.com/*"
|
"https://*.roosterteeth.com/*",
|
||||||
|
"https://*.stan.com.au/*"
|
||||||
],
|
],
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
@@ -43,7 +44,8 @@
|
|||||||
"https://tv.apple.com/*",
|
"https://tv.apple.com/*",
|
||||||
"https://*.viki.com/*",
|
"https://*.viki.com/*",
|
||||||
"https://*.funimation.com/*",
|
"https://*.funimation.com/*",
|
||||||
"https://*.roosterteeth.com/*"
|
"https://*.roosterteeth.com/*",
|
||||||
|
"https://*.stan.com.au/*"
|
||||||
],
|
],
|
||||||
"run_at": "document_idle",
|
"run_at": "document_idle",
|
||||||
"js": ["/static/js/content.js"],
|
"js": ["/static/js/content.js"],
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export const PLAYER_SOURCE = {
|
|||||||
VIKI: 'viki.',
|
VIKI: 'viki.',
|
||||||
FUNIMATION: 'funimation.',
|
FUNIMATION: 'funimation.',
|
||||||
ROOSTERTEETH: 'roosterteeth.',
|
ROOSTERTEETH: 'roosterteeth.',
|
||||||
|
STAN: 'stan.',
|
||||||
LOCAL: 'localhost',
|
LOCAL: 'localhost',
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -55,6 +56,7 @@ export const getPlayerSource = () => {
|
|||||||
if (HREF.includes(PLAYER_SOURCE.VIKI)) return PLAYER_SOURCE.VIKI;
|
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.FUNIMATION)) return PLAYER_SOURCE.FUNIMATION;
|
||||||
if (HREF.includes(PLAYER_SOURCE.ROOSTERTEETH)) return PLAYER_SOURCE.ROOSTERTEETH;
|
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;
|
if (HREF.includes(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -168,6 +168,10 @@ export default class VideoListener {
|
|||||||
time: serverPlayer.time,
|
time: serverPlayer.time,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
break;
|
||||||
|
case PLAYER_SOURCE.STAN:
|
||||||
|
this.video.element.currentTime = serverPlayer.time;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -352,6 +356,12 @@ export default class VideoListener {
|
|||||||
return roosterTeethShow === '' && roosterTeethEpisode === ''
|
return roosterTeethShow === '' && roosterTeethEpisode === ''
|
||||||
? null
|
? null
|
||||||
: roosterTeethShow + '\n' + roosterTeethEpisode;
|
: 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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -754,6 +764,19 @@ export default class VideoListener {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-2
@@ -282,14 +282,12 @@ body.roosterteeth.visible .party-content-wrapper textarea:focus {
|
|||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
/* VIKI */
|
/* VIKI */
|
||||||
|
|
||||||
body.viki .party-content-wrapper input,
|
body.viki .party-content-wrapper input,
|
||||||
body.viki .party-content-wrapper input:focus {
|
body.viki .party-content-wrapper input:focus {
|
||||||
padding: 18.5px 14px !important;
|
padding: 18.5px 14px !important;
|
||||||
padding-top: 10.5px !important;
|
padding-top: 10.5px !important;
|
||||||
padding-bottom: 10.5px !important;
|
padding-bottom: 10.5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.viki .party-content-wrapper input,
|
body.viki .party-content-wrapper input,
|
||||||
body.viki .party-content-wrapper input:focus,
|
body.viki .party-content-wrapper input:focus,
|
||||||
body.viki .party-content-wrapper textarea,
|
body.viki .party-content-wrapper textarea,
|
||||||
@@ -298,6 +296,13 @@ body.viki .party-content-wrapper textarea:focus {
|
|||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
margin: 0 !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 {
|
#party-loading {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -131,6 +131,9 @@ switch (getPlayerSource()) {
|
|||||||
case PLAYER_SOURCE.ROOSTERTEETH:
|
case PLAYER_SOURCE.ROOSTERTEETH:
|
||||||
document.body.classList.add('roosterteeth');
|
document.body.classList.add('roosterteeth');
|
||||||
break;
|
break;
|
||||||
|
case PLAYER_SOURCE.STAN:
|
||||||
|
document.body.classList.add('stan');
|
||||||
|
break;
|
||||||
case PLAYER_SOURCE.LOCAL:
|
case PLAYER_SOURCE.LOCAL:
|
||||||
document.body.classList.add('local');
|
document.body.classList.add('local');
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user