optimize Simple Mode with true dead code elimination

This commit is contained in:
Lalit Sudhir
2025-10-20 13:01:52 -07:00
parent edc0f27e0f
commit 4e2d04fb9c

View File

@@ -5,7 +5,15 @@ import { createIcons, icons } from 'lucide';
import * as pdfjsLib from 'pdfjs-dist'; import * as pdfjsLib from 'pdfjs-dist';
import '../css/styles.css'; import '../css/styles.css';
const hideBrandingSections = () => { const init = () => {
pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
'pdfjs-dist/build/pdf.worker.min.mjs',
import.meta.url
).toString();
// Handle simple mode - hide branding sections
if (__SIMPLE_MODE__) {
const hideBrandingSections = () => {
const nav = document.querySelector('nav'); const nav = document.querySelector('nav');
if (nav) { if (nav) {
nav.style.display = 'none'; nav.style.display = 'none';
@@ -73,16 +81,8 @@ const hideBrandingSections = () => {
if (app) { if (app) {
app.style.paddingTop = '2rem'; app.style.paddingTop = '2rem';
} }
}; };
const init = () => {
pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
'pdfjs-dist/build/pdf.worker.min.mjs',
import.meta.url
).toString();
// Handle simple mode - hide branding sections
if (__SIMPLE_MODE__) {
hideBrandingSections(); hideBrandingSections();
} }