Last modified: 2013-10-18 19:30:49 UTC
It would be nice if, when navigating through a paginated PDF, it did not require reloading the page every time you click "next page" or "previous page". I think some JavaScript can be employed here to update the URL and load the next/previous page without requiring everything to be refreshed. I don't imagine this would be too difficult to do, so I'm going to mark this as easy. Example PDF: <https://commons.wikimedia.org/wiki/File:MediaWikiPerformanceProfiling.pdf>.
Nemo: if you have reason to believe that this bug would be difficult to resolve, please share in a comment.
I have implemented this as a user script at [[commons:User:Balloonguy/common.js]]. Comments and instructions on how to proceed further with this appreciated. I'm not sure what part of the core I should modify to include this.
(In reply to comment #2) > I have implemented this as a user script at > [[commons:User:Balloonguy/common.js]]. Sweet! > Comments and instructions on how to proceed further with this appreciated. > I'm not sure what part of the core I should modify to include this. When you use "core" on this bug tracker, most people will think of "MediaWiki core", but this particular functionality (PDF handling) is actually in a MediaWiki extension called PdfHandler: <https://www.mediawiki.org/wiki/Extension:PdfHandler>. In order to contribute to this extension, you'll need to get a [[mw:Gerrit]] account. To get started, simply visit [[mw:Developer access]]. Gerrit manages Wikimedia's Git repositories. The Git repository for this particular extension can be viewed here: <https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/PdfHandler.git;a=tree>. I hope this helps. Thanks again for working on this. :-)
Related URL: https://gerrit.wikimedia.org/r/62005 (Gerrit Change Icd1cde7c62c4d462f5b697b9f49f5c08f6e7482b)
I submitted a request with my changes. The code that creates the image pagination resides at ImagePage::openShowImage and is general for all multi-page images, which are currently PDF and DjVu files.
Change 62005 merged by TheDJ: Make image pagination not require a page load. https://gerrit.wikimedia.org/r/62005
Open points for future improvement are: 1: tracking history (using history.pushState or hash fragment tracking). 2: mw.hook notifying about finishing the loading of the page fragment 3: using api to do all of it, instead of downloading a full page.
Let's close this, I split improvement suggestions from comment 7 to bug 55893.