| 123456789101112131415161718192021222324252627 |
- import Foundation
- enum RedditHomeChromeStyle {
- /// Hides Reddit's header Log In button and user-menu trigger in the embedded WebView.
- static let injectionScript = """
- (function() {
- const STYLE_ID = 'reddora-home-chrome-style';
- if (document.getElementById(STYLE_ID)) return;
- const style = document.createElement('style');
- style.id = STYLE_ID;
- style.textContent = `
- #login-button,
- faceplate-tracker:has(#login-button),
- #expand-user-drawer-button,
- activate-feature:has(#expand-user-drawer-button),
- rpl-tooltip:has(#expand-user-drawer-button) {
- display: none !important;
- visibility: hidden !important;
- pointer-events: none !important;
- }
- `;
- (document.head || document.documentElement).appendChild(style);
- })();
- """
- }
|