pdf.js/extensions/chromium
Jonas Jenwald 4773bf6fcb Add support for updating the document hash, off by default, when the browser history is updated (issue 5753)
This is *really* the best that we can do here, since other proposed solutions would interfere with (and break) the painstakingly implemented browsing history that's present in the default viewer.

I'm still not convinced that this is a good idea in general, but this patch implements it in a way where it is possible to toggle[1] for users that wish to have this feature. In particular, there's a couple of reasons why I'm not finding this feature necessary/great:
 - It's already possible to easily obtain the current hash, by simply clicking on the `viewBookmark` button at any time.
 - Hash changes requires a bit of special handling[2], i.e. extra code, to prevent issues when the browser history is traversed (see `PDFHistory._popState`). Currently this is only necessary when the user has manually changed the hash, with this patch it will always be the case (assuming the feature is active).
 - It's not always possible to change the URL when updating the browser history. For example: In the Firefox built-in viewer, the URL cannot be modified for local files (i.e. those using the `file://` protocol).
This leads to inconsistent behaviour, and may in some cases even result in errors being thrown and the history thus not updating, if the browser prevents changes to the URL during `pushState`/`replaceState` calls.

---
[1] Using the `historyUpdateUrl` viewer preference.

[2] This depends, to a great extent, on browsers always firing `popstate` events *before* `hashchange` events, which may or may not actually be guaranteed.
2019-01-06 20:09:02 +01:00
..
options Add preferences for default scroll/spread modes 2018-05-14 23:10:33 -04:00
pageAction Fix inconsistent spacing and trailing commas in objects in extensions/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-01 13:25:24 +02:00
.eslintrc Use eslint-plugin-mozilla and the webextensions environment to avoid defining globals in each file. 2017-05-17 10:30:46 +01:00
.gitignore Renaming of extensions/chrome folder to extensions/chromium, and small tweak to manifest.json description as per #3600 2013-08-21 18:11:35 +02:00
contentscript.js Fix inconsistent spacing and trailing commas in objects in extensions/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-01 13:25:24 +02:00
contentstyle.css <object> / <embed> support in Chromium extension 2014-05-09 15:46:12 +02:00
extension-router.js Enable the mozilla/use-includes-instead-of-indexOf ESLint rule globally 2018-02-10 23:24:50 +01:00
icon16.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon19.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon38.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon48.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
icon128.png optimize png images using zopflipng 2016-07-10 17:49:16 +08:00
manifest.json [CRX] Recognize blob and data-URLs in the router 2017-02-04 01:20:17 +01:00
pdfHandler-vcros.js Fix inconsistent spacing and trailing commas in objects in extensions/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-01 13:25:24 +02:00
pdfHandler.html [CRX] Remove feature-detect.js 2018-01-26 15:54:35 +01:00
pdfHandler.js [CRX] Stop intercepting ftp in Chrome 59+ 2018-03-21 15:44:31 +01:00
preferences_schema.json Add support for updating the document hash, off by default, when the browser history is updated (issue 5753) 2019-01-06 20:09:02 +01:00
preserve-referer.js [CRX] Expose some headers to fetch requests 2018-02-06 15:06:02 +01:00
restoretab.html Restore extension tab after reload 2015-08-14 19:00:12 +02:00
restoretab.js Uses editorconfig to maintain consistent coding styles 2015-11-14 07:32:18 +05:30
suppress-update.js Fix inconsistent spacing and trailing commas in objects in extensions/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-01 13:25:24 +02:00
telemetry.js Use eslint-plugin-mozilla and the webextensions environment to avoid defining globals in each file. 2017-05-17 10:30:46 +01:00