[Pkg-javascript-commits] [pdf.js] 145/246: Preserve reference fragment in Chromium URL router
David Prévot
taffit at moszumanska.debian.org
Sun Sep 7 15:36:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit a1671fa512f01b8dbb1fb90d65772f34b4360b6e
Author: Rob Wu <rob at robwu.nl>
Date: Fri Aug 8 12:37:37 2014 +0200
Preserve reference fragment in Chromium URL router
Because removed reference fragments are no longer automatically copied
thanks to https://code.google.com/p/chromium/issues/detail?id=354653
---
extensions/chromium/extension-router.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/extensions/chromium/extension-router.js b/extensions/chromium/extension-router.js
index 6e77252..3f35cf4 100644
--- a/extensions/chromium/extension-router.js
+++ b/extensions/chromium/extension-router.js
@@ -99,6 +99,10 @@ limitations under the License.
var url = parseExtensionURL(details.url);
if (url) {
url = VIEWER_URL + '?file=' + url;
+ var i = details.url.indexOf('#');
+ if (i > 0) {
+ url += details.url.slice(i);
+ }
console.log('Redirecting ' + details.url + ' to ' + url);
return { redirectUrl: url };
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list