Created
April 22, 2025 00:10
-
-
Save tincastle/06bb856d5efdc7a1c0f16f4021c5b246 to your computer and use it in GitHub Desktop.
Revisions
-
tincastle created this gist
Apr 22, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,85 @@ // ==UserScript== // @name Hide Amplenote Subscription banner // @namespace http://tampermonkey.net/ // @version 2024-12-18 // @description try to take over the world! // @author You // @match https://www.amplenote.com/notes* // @icon https://www.google.com/s2/favicons?sz=64&domain=amplenote.com // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... // One shot const interval = 500 function hideBanner() { const banner = document.querySelector('div#header-banner-container > div.account-status-banner') if (!banner) { setTimeout(hideBanner, interval) return } banner.style.display = 'none' } hideBanner() function hideEditor() { const editor = document.querySelector('body.has-header-banner div.note-editor-app-container div.note-editor-app.mdc-top-app-bar--fixed-adjust') if (!editor) { setTimeout(hideEditor, interval) return } editor.style.paddingTop = '64px' } hideEditor() function hidePrimary() { const primarySidebar = document.querySelector('body.has-header-banner div.note-editor-app-container div.note-editor-app.mdc-top-app-bar--fixed-adjust aside.primary-side-nav div.primary-side-nav-content') if (!primarySidebar) { setTimeout(hidePrimary, interval) return } primarySidebar.style.height = 'calc(100vh - 64px)' } hidePrimary() // Continuously const interval_continuous = 1000 function hideSecondary() { const secondarySidebar = document.querySelector('body.has-header-banner div.note-editor-app-container div.note-editor-app.mdc-top-app-bar--fixed-adjust div.secondary-side-nav div.secondary-side-nav-content') if (!secondarySidebar) { setTimeout(hideSecondary, interval_continuous) return } secondarySidebar.style.height = 'calc(100vh - 64px)' setTimeout(hideSecondary, interval_continuous) } hideSecondary() function hideMain() { const main = document.querySelector('body.has-header-banner div.note-editor-app-container div.note-editor-app.mdc-top-app-bar--fixed-adjust div.pane-with-sidebar') if (!main) { setTimeout(hideMain, interval_continuous) return } main.style.height = 'calc(100vh - 64px)' setTimeout(hideMain, interval_continuous) } hideMain() function hideSidebar() { const sidebar = document.querySelector('body.has-header-banner div.note-editor-app-container div.note-editor-app.mdc-top-app-bar--fixed-adjust div.pane-with-sidebar div.sidebar') if (!sidebar) { setTimeout(hideSidebar, interval_continuous) return } sidebar.style.height = 'calc(100vh - 64px)' setTimeout(hideSidebar, interval_continuous) } hideSidebar() })();