From my personal point of view using PD/PF doesn't sounds like an hack and can keep the code coherent between loaded and unloaded pages: just for example, scaling code (for the reason explained in the other issue) works both with loaded and unloaded pages. Otherwise in any existing and future functions we should take in consideration if page is loaded or not and deal with different DOM.

Anyway it's not a big deal, so if you prefer to keep PD/PF just for loaded pages no problem, I'll submit a fix in the following days.

For the matter of ```.page``` files, I get it. Keep them unmodified and do the stuff in javascript viewer.
Can you patch the binary to output the json mentioned above (or a variable inside the main ```.html```)? I'm more skilled in frontend that in C and this would save me a lot of time.