Vanilla JS

At least a first pass. Pasting from File menu into pagetitle field needs addressing.