From: gigaherz Date: Fri, 23 Mar 2012 15:26:06 +0000 (+0100) Subject: Assign the filename to the page title instead of the full URL X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=536519a9a15483e6cc9ef0ab5535528b729743fd;p=pdf.js.git Assign the filename to the page title instead of the full URL --- diff --git a/web/viewer.js b/web/viewer.js index 67ef67e..73a65ca 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(