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,6 +5,14 @@ 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 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 hideBrandingSections = () => {
const nav = document.querySelector('nav'); const nav = document.querySelector('nav');
if (nav) { if (nav) {
@@ -75,14 +83,6 @@ 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__) {
hideBrandingSections(); hideBrandingSections();
} }