I was playing around trying to create a small safari extension, most for the fun of it and to see what you could do etc.
Anyways I was thinking about storing some data for my extension in a local database, so I always would have it where I needed it, across page loads.
I searched a bit on google and found this snippet from the Safari Reference Library, that will create a JavaScript database:
var shortName = 'mydatabase';
var version = '1.0';
var displayName = 'My Important Database';
var maxSize = 65536; // in bytes
var db = openDatabase(shortName, version, displayName, maxSize);
This works pretty well and creates the database like I wanted. The only thing is, that this database is domain specific, so my script creating the database will create a database for each domain visited, which wasn't exactly what I wanted.
So how can you, if possible, create a local storage database, that can be assigned to an safari extension, so it will be available on all domains?