From 536519a9a15483e6cc9ef0ab5535528b729743fd Mon Sep 17 00:00:00 2001 From: gigaherz Date: Fri, 23 Mar 2012 16:26:06 +0100 Subject: [PATCH] Assign the filename to the page title instead of the full URL --- web/viewer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/viewer.js b/web/viewer.js index 67ef67e97..73a65ca05 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -258,7 +258,9 @@ var PDFView = { }, open: function pdfViewOpen(url, scale) { - document.title = this.url = url; + this.url = url; + + document.title = (url.substring(url.lastIndexOf('/')+1)) || url; var self = this; PDFJS.getPdf(