Commit graph

5 commits

Author SHA1 Message Date
Deathamns
749b6f186d Use a dedicated file for storing extension info
Chrome has getManifest(), Safari doesn't have anything, Firefox has an
asynchronous API...
So, instead of using extension APIs, store the common informations
(extension name, version, homepage url) in a file (vapi-appinfo.js), which
can be included when it's needed (its data will be available at vAPI.app.____).
The file's content is updated each time the extension is being built, so
it shouldn't be modified manually.
2014-11-09 17:39:38 +01:00
Deathamns
fbffc5b07e Use HTML5 download instead of extension API
Benefits:
- Cross browser solution (however only for relatively new browsers)
- Doesn't need extra permission in Chrome

If the browser doesn't suppor the download attribute, then a new tab will
be opened with the exported data.

Other changes:
- Start the download only if the data is not empty (previously the
  download started anyway)
- Reorder code in vapi-client.js for Safari, so unnecessary code doesn't
  run on extension pages
2014-11-09 17:39:36 +01:00
Deathamns
1a83d1a753 Move vAPI into .jshintrc as a global 2014-11-09 17:39:22 +01:00
Deathamns
0886f7e886 Add .jshintrc, and use the "use strict" directive
.jshintrc's otion-set is a personal choice, merely a suggestion.
Beside that, it includes some common globals for specific browsers, so
there's no need to set the globals in every .js file.

In order to force strict coding, "use strict" directive was added into
every .js file.
2014-11-09 17:39:17 +01:00
Deathamns
5b79bf3536 Work on vendor API abstraction, and near complete Safari support 2014-11-09 17:39:12 +01:00
Renamed from js/about.js (Browse further)