From 3f98e2fc73475c764e8e3df03d1be9048604c6f3 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 7 Jun 2020 11:21:21 -0400 Subject: [PATCH] Remove options page header on help page --- public/help/index_en.html | 2 +- src/options.ts | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/public/help/index_en.html b/public/help/index_en.html index 2c363ac3..605ed501 100644 --- a/public/help/index_en.html +++ b/public/help/index_en.html @@ -37,7 +37,7 @@ You can also hide/show all UI elements added to the YouTube page.

- +

How skipping works

diff --git a/src/options.ts b/src/options.ts index e9a622a5..0a196a9a 100644 --- a/src/options.ts +++ b/src/options.ts @@ -13,6 +13,13 @@ window.addEventListener('DOMContentLoaded', init); async function init() { utils.localizeHtmlPage(); + // Remove header if needed + if (window.location.hash === "#embed") { + for (const element of document.getElementsByClassName("titleBar")) { + element.classList.add("hidden"); + } + } + if (!Config.configListeners.includes(optionsConfigUpdateListener)) { Config.configListeners.push(optionsConfigUpdateListener); }