Skip to content

Commit

Permalink
Fix #4096 Color options in pdf editor not working
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Dec 14, 2023
1 parent d00d5fe commit 714d72c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev/editviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
line.replace('''<title>PDF.js viewer</title>''', '''<meta http-equiv="Content-Security-Policy" content="default-src 'self'; base-uri 'none'; connect-src 'self' ws://127.0.0.1:*; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:;">\n <title>PDF.js viewer</title>''')
.replace('''<link rel="stylesheet" href="viewer.css">''', '''<link rel="stylesheet" href="viewer.css">\n <link rel="stylesheet" href="latexworkshop.css">''')
.replace('''<script src="../build/pdf.mjs" type="module"></script>''', '''<script src="build/pdf.mjs" type="module"></script>''')
.replace('''<script src="viewer.mjs" type="module"></script>''', '''<script src="out/viewer/latexworkshop.js" type="module"></script>\n <script src="viewer/viewer.mjs" type="module"></script>''')
.replace('''<script src="viewer.mjs" type="module"></script>''', '''<script src="out/viewer/latexworkshop.js" type="module"></script>''')
.replace('''<div class="toolbarButtonSpacer"></div>''', '''<!-- <div class="toolbarButtonSpacer"></div> -->''')
)

Expand Down
2 changes: 2 additions & 0 deletions viewer/latexworkshop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -802,3 +802,5 @@ class LateXWorkshopPdfViewer implements ILatexWorkshopPdfViewer {

const extension = new LateXWorkshopPdfViewer()
await extension.waitSetupAppOptionsFinished()
// @ts-expect-error Must import viewer.mjs here, otherwise some config won't work. #4096
await import('../../viewer/viewer.mjs')
1 change: 0 additions & 1 deletion viewer/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<link rel="stylesheet" href="latexworkshop.css">

<script src="out/viewer/latexworkshop.js" type="module"></script>
<script src="viewer/viewer.mjs" type="module"></script>
</head>

<body tabindex="1">
Expand Down

0 comments on commit 714d72c

Please sign in to comment.