Merge pull request #13841 from Rob--W/crx-viewerCssTheme
Allow customization of theme in Chrome extension + set default theme
This commit is contained in:
commit
bcdf006a71
@ -43,6 +43,19 @@ body {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template id="viewerCssTheme-template">
|
||||||
|
<div class="settings-row">
|
||||||
|
<label>
|
||||||
|
<span></span>
|
||||||
|
<select>
|
||||||
|
<option value="0">Use system theme</option>
|
||||||
|
<option value="1">Light theme</option>
|
||||||
|
<option value="2">Dark theme</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template id="viewOnLoad-template">
|
<template id="viewOnLoad-template">
|
||||||
<div class="settings-row">
|
<div class="settings-row">
|
||||||
<label>
|
<label>
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"viewerCssTheme": {
|
||||||
|
"title": "Theme",
|
||||||
|
"description": "The theme to use.\n0 = Use system theme.\n1 = Light theme.\n2 = Dark theme.",
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2
|
||||||
|
],
|
||||||
|
"default": 2
|
||||||
|
},
|
||||||
"showPreviousViewOnLoad": {
|
"showPreviousViewOnLoad": {
|
||||||
"description": "DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
|
"description": "DEPRECATED. Set viewOnLoad to 1 to disable showing the last page/position on load.",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
@ -188,15 +199,6 @@
|
|||||||
2
|
2
|
||||||
],
|
],
|
||||||
"default": -1
|
"default": -1
|
||||||
},
|
|
||||||
"viewerCssTheme": {
|
|
||||||
"type": "integer",
|
|
||||||
"enum": [
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"default": 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ const defaultOptions = {
|
|||||||
},
|
},
|
||||||
viewerCssTheme: {
|
viewerCssTheme: {
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
value: 0,
|
value: typeof PDFJSDev !== "undefined" && PDFJSDev.test("CHROME") ? 2 : 0,
|
||||||
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
|
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
|
||||||
},
|
},
|
||||||
viewOnLoad: {
|
viewOnLoad: {
|
||||||
|
Loading…
Reference in New Issue
Block a user