Commit Graph

30 Commits

Author SHA1 Message Date
Raymond Hill f149b2e340 jshint 2014-11-24 20:20:21 -02:00
Raymond Hill a430e526b6 use "platform" as suggested in #360 2014-11-24 14:49:11 -02:00
Raymond Hill 266f62914f new revision 2014-11-24 13:40:34 -02:00
Raymond Hill e822616b06 jshint 2014-11-24 13:40:05 -02:00
Raymond Hill 369b038f92 jshint 2014-11-24 12:48:33 -02:00
Deathamns 219eddab74 Ports cleanup
- Remove duplicate platform specific (from src/) and other unnecessary
  files
- Fix and update vapi-*.js files for Safari
- Add tools/make-safari.sh
- Move js/vapi-appinfo.js to meta/ (so, every vendor specific file will be
  at the same location)
2014-11-23 18:21:06 +01:00
Raymond Hill dffe9c79f8 restore original semantic 2014-11-22 14:22:16 -02:00
Raymond Hill 33969e8b2e more spurious warnings in console foiled 2014-11-20 23:18:33 -02:00
Raymond Hill 426aaa2803 oops 2014-11-20 01:50:39 -02:00
Raymond Hill 51b756d5b7 fix spurious warning in console 2014-11-20 01:36:06 -02:00
Raymond Hill 578735dd58 avoid memory leaks in case no request handler found 2014-11-18 11:35:42 -02:00
Raymond Hill f090144d09 requests must be deemed unhandled by default 2014-11-18 11:29:55 -02:00
Raymond Hill 1626051299 now it's fixed... 2014-11-16 17:22:27 -02:00
Raymond Hill f88d1849d0 fix bug introduced in 338bf59507 2014-11-16 17:04:37 -02:00
Raymond Hill adbc0ee2aa code review 2014-11-16 14:39:38 -02:00
Raymond Hill 91276bebfb eliminate overhead of creating two funcs/closure for each port connection 2014-11-16 12:49:55 -02:00
Raymond Hill 338bf59507 give specific message handlers priority over default one 2014-11-16 11:09:28 -02:00
Raymond Hill 84c069dfaa continued: corralling platform-specific stuff into their meta folder 2014-11-16 00:21:13 -02:00
Raymond Hill eafc96859c further separate platform-specific code 2014-11-15 16:15:11 -02:00
Deathamns 0d9d285608 Building extension files
Adds possibility to build extension files (Chrome and Safari) from
command line.

To run from the project directory:
python tools/build.py [meta]

If the optional `meta` argument is set, then only the manifest and
language files are uptated.
Without that everything is being built (extension files too) into the
`dist/build/version_number` folder.

For Chrome there will be two files, a crx, and a .zip file which
includes the key.pem private key (so this must not be shared,
it's just a bit help for publishing it to the Chrome Web Store).

Beside the extension files, update-files are generated too (for self
hosting - Safari needs it).
2014-11-09 18:58:46 +01:00
Deathamns 6f2e449e61 Preferences button for Safari
Brings back the possibility to click a checkbox which opens the extension
settings from Safari's Preferences/Extensions.
2014-11-09 17:41:05 +01:00
Deathamns d98a8161f9 Drop js-loader, updates from gorhill/uBlock/master 2014-11-09 17:41:02 +01:00
Deathamns e6e3f676e2 Fix toolbar icons for Safari 2014-11-09 17:40:57 +01:00
Deathamns 54749b31fb Building Info.plist was missing 2014-11-09 17:40:46 +01:00
Deathamns f6f85ec793 Implement pop-up blocking for Safari
It works similarly to the xhr intercepting, except here the window.open
global function is being overridden.
Note that it could only work if the site's Content Security Policy allows
inline scripts, and the script on the webpage doesn't have a copy of the
original window.open function (it can happen only if the page has an
inline script in its head element, where the reference to the original
function can be obtained - likely this cannot be prevented in Safari).
2014-11-09 17:40:44 +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 2e787d8541 Set default dimensions for Safari's popup 2014-11-09 17:39:35 +01:00
Deathamns f9602fa5a7 Implement popup autoresizing for Safari
By default, Safari doesn't resize the popup to its content, but it's
possible to set the size pragmatically.
The popup will be resized every time when a change happens in the DOM tree.
2014-11-09 17:39:26 +01:00
Deathamns 723fc6087c Alphabetical order for keys in Safari's Info.plist 2014-11-09 17:39:14 +01:00
Deathamns 5b79bf3536 Work on vendor API abstraction, and near complete Safari support 2014-11-09 17:39:12 +01:00