xtannier/WebAnnotator — pull request #10 by kmike (2013-12-21 23:00:32+00:00)
Title: An option to suggest increasing numbers as file names

Hi,

I tried "suggest file name from page title" in practice, and using titles as file names is not always a good idea: there are duplicated titles like "Contact Us", and some websites use the same on all pages. So here is an alternative (which is made default):

* for local file names save dialog still suggests the original name;
* for remote URLs extension suggests increasing numbers as file names.

This means that if user follows the suggestions and have "quit after annotation" option enabled she gets increasing numbers (0.html, 1.html, ...). The twist is that the next number to suggest is "(the last number used as a filename in saveas dialog) + 1". So, for example, if there are 100 pages annotated and browser is restarted then the extension will suggest 0.html; to start annotating from 101.html user should save the page as 101.html instead of 0.html, and the numbering will continue to 102.html, 103.html, etc.