2015-01-07 02:22:35 +09:00
|
|
|
<!doctype html>
|
|
|
|
<!--
|
|
|
|
Copyright 2015 Mozilla Foundation
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>PDF.js viewer options</title>
|
|
|
|
<style>
|
|
|
|
/* TODO: Remove as much custom CSS as possible - crbug.com/446511 */
|
|
|
|
body {
|
|
|
|
min-width: 400px; /* a page at the settings page is at least 400px wide */
|
|
|
|
margin: 14px 17px; /* already added by default in Chrome 40.0.2212.0 */
|
|
|
|
}
|
|
|
|
.settings-row {
|
|
|
|
margin: 0.65em 0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="settings-boxes"></div>
|
|
|
|
<button id="reset-button">Restore default settings</button>
|
|
|
|
|
|
|
|
<template id="checkbox-template">
|
|
|
|
<!-- Chromium's style: //src/extensions/renderer/resources/extension.css -->
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox">
|
|
|
|
<span></span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2021-08-02 01:51:02 +09:00
|
|
|
<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>
|
|
|
|
|
Modify a number of the viewer preferences, whose current default value is `0`, such that they behave as expected with the view history
The intention with preferences such as `sidebarViewOnLoad`/`scrollModeOnLoad`/`spreadModeOnLoad` were always that they should be able to *unconditionally* override their view history counterparts.
Due to the way that these preferences were initially implemented[1], trying to e.g. force the sidebar to remain hidden on load cannot be guaranteed[2]. The reason for this is the use of "enumeration values" containing zero, which in hindsight was an unfortunate choice on my part.
At this point it's also not as simple as just re-numbering the affected structures, since that would wreak havoc on existing (modified) preferences. The only reasonable solution that I was able to come up with was to change the *default* values of the preferences themselves, but not their actual values or the meaning thereof.
As part of the refactoring, the `disablePageMode` preference was combined with the *adjusted* `sidebarViewOnLoad` one, to hopefully reduce confusion by not tracking related state separately.
Additionally, the `showPreviousViewOnLoad` and `disableOpenActionDestination` preferences were combined into a *new* `viewOnLoad` enumeration preference, to further avoid tracking related state separately.
2019-01-27 20:07:38 +09:00
|
|
|
<template id="viewOnLoad-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
|
|
|
<option value="-1">Default</option>
|
|
|
|
<option value="0">Show previous position</option>
|
|
|
|
<option value="1">Show initial position</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2015-01-07 02:22:35 +09:00
|
|
|
<template id="defaultZoomValue-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
|
|
|
<option value="auto" selected="selected">Automatic Zoom</option>
|
|
|
|
<option value="page-actual">Actual Size</option>
|
2017-07-11 04:27:39 +09:00
|
|
|
<option value="page-fit">Page Fit</option>
|
|
|
|
<option value="page-width">Page Width</option>
|
2015-01-07 02:22:35 +09:00
|
|
|
<option value="custom" class="custom-zoom" hidden></option>
|
|
|
|
<option value="50">50%</option>
|
|
|
|
<option value="75">75%</option>
|
|
|
|
<option value="100">100%</option>
|
|
|
|
<option value="125">125%</option>
|
|
|
|
<option value="150">150%</option>
|
|
|
|
<option value="200">200%</option>
|
|
|
|
<option value="300">300%</option>
|
|
|
|
<option value="400">400%</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template id="sidebarViewOnLoad-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
Modify a number of the viewer preferences, whose current default value is `0`, such that they behave as expected with the view history
The intention with preferences such as `sidebarViewOnLoad`/`scrollModeOnLoad`/`spreadModeOnLoad` were always that they should be able to *unconditionally* override their view history counterparts.
Due to the way that these preferences were initially implemented[1], trying to e.g. force the sidebar to remain hidden on load cannot be guaranteed[2]. The reason for this is the use of "enumeration values" containing zero, which in hindsight was an unfortunate choice on my part.
At this point it's also not as simple as just re-numbering the affected structures, since that would wreak havoc on existing (modified) preferences. The only reasonable solution that I was able to come up with was to change the *default* values of the preferences themselves, but not their actual values or the meaning thereof.
As part of the refactoring, the `disablePageMode` preference was combined with the *adjusted* `sidebarViewOnLoad` one, to hopefully reduce confusion by not tracking related state separately.
Additionally, the `showPreviousViewOnLoad` and `disableOpenActionDestination` preferences were combined into a *new* `viewOnLoad` enumeration preference, to further avoid tracking related state separately.
2019-01-27 20:07:38 +09:00
|
|
|
<option value="-1">Default</option>
|
2015-01-07 02:22:35 +09:00
|
|
|
<option value="0">Do not show sidebar</option>
|
|
|
|
<option value="1">Show thumbnails in sidebar</option>
|
|
|
|
<option value="2">Show document outline in sidebar</option>
|
|
|
|
<option value="3">Show attachments in sidebar</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2017-07-15 08:50:15 +09:00
|
|
|
<template id="cursorToolOnLoad-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
|
|
|
<option value="0">Text selection tool</option>
|
|
|
|
<option value="1">Hand tool</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
[CRX] Make textLayerMode pref visible and add migration logic
In a1cfa5f4d7c8fcf55e9f3b51a23885dca8782915, the textLayerMode
preference was introduced, to replace the disableTextLayer and
enhanceTextSelection preferences.
As a result, the text selection preference was no longer visible
in Chrome (because preferences are only rendered by default for
boolean preferences, not for enumerations).
This commit adds the necessary bits to
extensions/chromium/options/options.{html,js}
so that the textLayerMode preference can be changed again.
Also, migration logic has been added to move over preferences
from the old to the new names:
- In web/chromecom.js, the logic is added to translate
preferences that were set by an administrator (it is read-only,
so this layer is unavoidable).
- In extensions/chromium/options/migration.js, similar logic is
added, except in this case the preference storage is writable,
so this migration logic happens only once.
The "enhanced text selection" mode is still experimental, so it
has been marked as experimental to signal that there may be bugs.
The list of tasks that block promotion to stable is at #7584.
2018-02-17 02:02:05 +09:00
|
|
|
<template id="textLayerMode-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
|
|
|
<option value="0">Disable text selection</option>
|
|
|
|
<option value="1">Enable text selection</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2016-05-25 07:32:32 +09:00
|
|
|
<template id="externalLinkTarget-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
|
|
|
<option value="0">Default</option>
|
|
|
|
<option value="1">Current window/tab</option>
|
|
|
|
<option value="2">New window/tab</option>
|
|
|
|
<option value="3">Parent window/tab</option>
|
|
|
|
<option value="4">Top window/tab</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2018-05-15 12:10:33 +09:00
|
|
|
<template id="scrollModeOnLoad-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
Modify a number of the viewer preferences, whose current default value is `0`, such that they behave as expected with the view history
The intention with preferences such as `sidebarViewOnLoad`/`scrollModeOnLoad`/`spreadModeOnLoad` were always that they should be able to *unconditionally* override their view history counterparts.
Due to the way that these preferences were initially implemented[1], trying to e.g. force the sidebar to remain hidden on load cannot be guaranteed[2]. The reason for this is the use of "enumeration values" containing zero, which in hindsight was an unfortunate choice on my part.
At this point it's also not as simple as just re-numbering the affected structures, since that would wreak havoc on existing (modified) preferences. The only reasonable solution that I was able to come up with was to change the *default* values of the preferences themselves, but not their actual values or the meaning thereof.
As part of the refactoring, the `disablePageMode` preference was combined with the *adjusted* `sidebarViewOnLoad` one, to hopefully reduce confusion by not tracking related state separately.
Additionally, the `showPreviousViewOnLoad` and `disableOpenActionDestination` preferences were combined into a *new* `viewOnLoad` enumeration preference, to further avoid tracking related state separately.
2019-01-27 20:07:38 +09:00
|
|
|
<option value="-1">Default</option>
|
2021-11-08 18:18:25 +09:00
|
|
|
<option value="3">Page scrolling</option>
|
2018-05-15 12:10:33 +09:00
|
|
|
<option value="0">Vertical scrolling</option>
|
|
|
|
<option value="1">Horizontal scrolling</option>
|
|
|
|
<option value="2">Wrapped scrolling</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template id="spreadModeOnLoad-template">
|
|
|
|
<div class="settings-row">
|
|
|
|
<label>
|
|
|
|
<span></span>
|
|
|
|
<select>
|
Modify a number of the viewer preferences, whose current default value is `0`, such that they behave as expected with the view history
The intention with preferences such as `sidebarViewOnLoad`/`scrollModeOnLoad`/`spreadModeOnLoad` were always that they should be able to *unconditionally* override their view history counterparts.
Due to the way that these preferences were initially implemented[1], trying to e.g. force the sidebar to remain hidden on load cannot be guaranteed[2]. The reason for this is the use of "enumeration values" containing zero, which in hindsight was an unfortunate choice on my part.
At this point it's also not as simple as just re-numbering the affected structures, since that would wreak havoc on existing (modified) preferences. The only reasonable solution that I was able to come up with was to change the *default* values of the preferences themselves, but not their actual values or the meaning thereof.
As part of the refactoring, the `disablePageMode` preference was combined with the *adjusted* `sidebarViewOnLoad` one, to hopefully reduce confusion by not tracking related state separately.
Additionally, the `showPreviousViewOnLoad` and `disableOpenActionDestination` preferences were combined into a *new* `viewOnLoad` enumeration preference, to further avoid tracking related state separately.
2019-01-27 20:07:38 +09:00
|
|
|
<option value="-1">Default</option>
|
2018-05-15 12:10:33 +09:00
|
|
|
<option value="0">No spreads</option>
|
|
|
|
<option value="1">Odd spreads</option>
|
|
|
|
<option value="2">Even spreads</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2015-01-07 02:22:35 +09:00
|
|
|
<script src="options.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|