Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const elementsWithStyleChanges = {
- "modern-video-controls": { position: "none", backgroundColor: "rgba(0, 0, 0, 0)", marginTop: "38px" },
- "video-seekbar": { position: "none", marginTop: "38px" },
- "video-seekbar-hitarea": { position: "none" },
- "video-animation-container": { backgroundColor: "rgba(0, 0, 0, 0)" },
- "control-background": { backgroundColor: "rgba(0, 0, 0, 0)" }
- };
- const classesToHide = ["video-controlbar", "seek-enabled", "elapsed-time-enabled", "volume-enabled", "playback-speed-enabled", "pip-enabled", "full-screen-enabled"];
- function setStyles() {
- for (const className in elementsWithStyleChanges) {
- const elements = document.getElementsByClassName(className);
- const styles = elementsWithStyleChanges[className];
- for (const element of elements) {
- Object.assign(element.style, styles);
- }
- }
- }
- function hideElements() {
- for (const className of classesToHide) {
- const elements = document.getElementsByClassName(className);
- for (const element of elements) {
- element.style.display = "none";
- }
- }
- }
- function modifyElements() {
- setStyles();
- hideElements();
- }
- modifyElements();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement