Clean-up the pre-processor statements in web/viewer.html

Some of these pre-processor statements are *many* years old, and could thus do with some clean-up. Note that the pre-processor originally didn't support else-if statements, and by using those the code becomes a bit less verbose.
This commit is contained in:
Jonas Jenwald 2023-03-18 17:17:46 +01:00
parent 9db4509664
commit 7d688769cf

View File

@ -31,9 +31,12 @@ See https://github.com/adobe-type-tools/cmap-resources
<!--#if MOZCENTRAL-->
<!--#include viewer-snippet-firefox-extension.html-->
<!--#endif-->
<!--#if CHROME-->
<!--#elif CHROME-->
<!--#include viewer-snippet-chrome-extension.html-->
<!--#elif MINIFIED-->
<!--#include viewer-snippet-minified.html-->
<!--#else-->
<!--#include viewer-snippet.html-->
<!--#endif-->
<!--#if MOZCENTRAL-->
@ -42,11 +45,13 @@ See https://github.com/adobe-type-tools/cmap-resources
<link rel="stylesheet" href="viewer.css">
<!--#endif-->
<!--#if !PRODUCTION-->
<!--#if MOZCENTRAL-->
<!--<script src="resource://pdf.js/web/viewer.js"></script>-->
<!--#elif !MINIFIED-->
<!--<script src="viewer.js"></script>-->
<!--#elif !PRODUCTION-->
<link rel="resource" type="application/l10n" href="locale/locale.properties">
<!--#endif-->
<!--#if !PRODUCTION-->
<script defer src="../node_modules/es-module-shims/dist/es-module-shims.js"></script>
<script type="importmap-shim">
{
@ -77,19 +82,6 @@ See https://github.com/adobe-type-tools/cmap-resources
<script src="viewer.js" type="module-shim"></script>
<!--#endif-->
<!--#if (GENERIC && !MINIFIED) -->
<!--#include viewer-snippet.html-->
<!--#endif-->
<!--#if MINIFIED-->
<!--#include viewer-snippet-minified.html-->
<!--#elif MOZCENTRAL-->
<!--<script src="resource://pdf.js/web/viewer.js"></script>-->
<!--#else-->
<!--<script src="viewer.js"></script>-->
<!--#endif-->
</head>
<body tabindex="1">