From 0352674db1fdfeeecfa2f00ccb51b189b225f4ca Mon Sep 17 00:00:00 2001 From: Jakub Gezela Date: Tue, 2 Jan 2024 13:27:53 +0100 Subject: [PATCH] Removed "This is preview" banner Added remove-previewBanner.js file to remove "This is preview" banner, that is appearing on desktop devices. --- manifest.json | 2 +- remove-previewBanner.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 remove-previewBanner.js diff --git a/manifest.json b/manifest.json index 23f445f..a3d0bde 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,7 @@ "content_scripts": [ { - "js": ["version-check.js", "remove-banner.js", "remove-blur.js", "doc-viewer.js"], + "js": ["version-check.js", "remove-banner.js", "remove-blur.js", "doc-viewer.js", "remove-previewBanner.js"], "css": ["style.css"], "matches": ["https://www.studocu.com/*", "https://www.studeersnel.nl/*"] } diff --git a/remove-previewBanner.js b/remove-previewBanner.js new file mode 100644 index 0000000..47d42d9 --- /dev/null +++ b/remove-previewBanner.js @@ -0,0 +1,7 @@ +// Remove "This is preview" banner +window.addEventListener("load", () => { + const previewBanner = document.getElementsByClassName("_95f5f1767857 _0838fb325c04")[0]; + if(previewBanner) { + previewBanner.remove(); + } +});