1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-02 10:24:59 +12:00
Commit graph

1610 commits

Author SHA1 Message Date
Deathamns 42d69aba2d Add license headers, plus some code styling 2015-04-10 19:34:14 -04:00
Deathamns 706a51c211 Firefox: blocking and content scripts for e10s 2015-04-10 19:34:14 -04:00
gorhill c752853031 lot of work related to dynamic filtering + new net requests logger 2015-04-10 19:34:14 -04:00
gorhill ed30222601 this fixes #455 2015-04-10 19:34:06 -04:00
gorhill 2a108917b5 another round of work re dynamic filtering 2015-04-10 19:34:06 -04:00
gorhill ce9acac0ae this fixes #418; also remove last chrome API reference from portable code 2015-04-10 19:34:06 -04:00
Raymond Hill 9515769fb5 extension restart is platform-dependent 2015-04-10 19:34:06 -04:00
Raymond Hill dccbbb3879 remove depending on vapi-appinfo.js 2015-04-10 19:34:06 -04:00
Raymond Hill c168d050f0 code review, fixes #383 2015-04-10 19:34:06 -04:00
Raymond Hill 6d5361cebc this fixes #380 2015-04-10 19:34:06 -04:00
Raymond Hill 97ca80d8bc use "platform" as suggested in #360 2015-04-10 19:34:06 -04:00
Raymond Hill ec6ad5ab80 use "platform" as suggested in #360 2015-04-10 19:34:03 -04:00
Raymond Hill e9accabf13 jshint 2015-04-10 19:34:03 -04:00
Deathamns 0f7ce05de2 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)
2015-04-10 19:34:03 -04:00
Raymond Hill ff6c553fb2 more spurious warnings in console foiled 2015-04-10 19:34:03 -04:00
Raymond Hill b9a1cab269 oops 2015-04-10 19:34:03 -04:00
Raymond Hill 2730d5954b fix spurious warning in console 2015-04-10 19:34:03 -04:00
Raymond Hill eb22ee51b3 avoid memory leaks in case no request handler found 2015-04-10 19:34:03 -04:00
Raymond Hill 2310d01835 requests must be deemed unhandled by default 2015-04-10 19:34:03 -04:00
Raymond Hill a2e45a024f now it's fixed... 2015-04-10 19:34:03 -04:00
Raymond Hill 2c209ab8d3 fix bug introduced in 338bf595078d0a7e52c70edd93f7b866dd00d314 2015-04-10 19:34:03 -04:00
Raymond Hill 8436f11e5a code review 2015-04-10 19:34:03 -04:00
Raymond Hill 789bfe09f6 eliminate overhead of creating two funcs/closure for each port connection 2015-04-10 19:34:03 -04:00
Raymond Hill 0a0c011960 give specific message handlers priority over default one 2015-04-10 19:34:03 -04:00
Raymond Hill aa1f793963 continued: corralling platform-specific stuff into their meta folder 2015-04-10 19:34:03 -04:00
Raymond Hill d09bbb3e1e further separate platform-specific code 2015-04-10 19:34:03 -04:00
Deathamns fccb781950 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)
2015-04-10 19:33:59 -04:00
Raymond Hill bd5492654f give specific message handlers priority over default one 2015-04-10 19:33:59 -04:00
Deathamns c3178cd442 Only top window should have type main_frame 2015-04-10 19:33:59 -04:00
Deathamns 8eb76e880c 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).
2015-04-10 19:33:59 -04:00
Deathamns 29eabd44fd Fix messaging for Safari 2015-04-10 19:33:59 -04:00
Deathamns 872a478f91 Preferences button for Safari
Brings back the possibility to click a checkbox which opens the extension
settings from Safari's Preferences/Extensions.
2015-04-10 19:33:59 -04:00
Deathamns 3d535c6c69 Messaging fixes
Checking the message name (and connectorId) is mandatory for Safari,
because when the background page sends a response back to a document,
then all the frames in its owner tab will receive the exact same
message, which could confuse the script in some cases.
2015-04-10 19:33:59 -04:00
Deathamns bda4dba902 Use different page navigation detection for Safari
The beforeNavigate event wasn't reliable (sometimes didn't fire, sometimes
fired unnecessary when opening a link with the middle click - which had a
workaround previously, but that's also removed by this commit).

When the event didn't fire, the bindTabToPageStats method didn't run,
and the requests related to the tab weren't blocked.
2015-04-10 19:33:59 -04:00
Deathamns ceb18d4629 Site-patching possibility for Safari
Safari's extension API doesn't provide a way to intercept requests
initiated by plugins, so those cases need special care (or at least the
popular sites).

This commit adds a new JS file (sitepatch-safari.js), which will store the
patches (if it's possible to create one) for specific sites.

As an example, this commit includes a technique for removing in-video ads
from YouTube videos.
2015-04-10 19:33:59 -04:00
Deathamns c0b1565131 Badge number sometimes disappeared in Safari 2015-04-10 19:33:59 -04:00
Deathamns 31f9683d9f 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).
2015-04-10 19:33:59 -04:00
Deathamns 1be99cf58e Remove unnecessary comments 2015-04-10 19:33:59 -04:00
Deathamns 816dca2f33 Script injection, element picker, messaging
- Add script injection to vAPI, plus a raw implementation for Safari
  (element-picker.js requires it)
- Tweak element picker to work with Safari
- Revert a change from previous commit: element-picker.js' background
  message handler (since actually it can have its own messaging channel)
- Don't send "undefined" reponses from background to content
2015-04-10 19:33:59 -04:00
Deathamns 9981c25286 Remove storage change-event listener from Safari
Earlier, a technique was used to open the extension's Options page when
the user clicked a checkbox input at Safari's extension settings. The method was removed because:
- the Options page can be opened via the extension's toolbar button (which
  cannot be disabled in Safari, so it will be there all the time);
- involved more clicks than opening from the toolbar button;
- the string beside the checkbox couldn't be localized.
2015-04-10 19:33:58 -04:00
Deathamns be7668767f Minor changes
- Update assets from gorhill/uBlock/master
- Remove whitespace from element-picker.js
- Simplify code in profiler.js (btw, Date is still needed as fallback
  for older browsers)
- Clarification for Safari's storage where the QUOTA_BYTES came from
2015-04-10 19:33:58 -04:00
Deathamns 35ed9cd853 Work on vendor API abstraction, and near complete Safari support 2015-04-10 19:33:58 -04:00
gorhill 63aa4be9f7 reorganizing, preparing move to vAPI 2015-04-10 17:06:49 -04:00
gorhill 5d311f144b Merge branch 'master' of https://github.com/gorhill/uMatrix 2015-04-10 10:45:51 -04:00
gorhill 056e68da66 this fixes #42 2015-04-10 10:45:40 -04:00
Raymond Hill 9fa4e2b106 Update README.md 2015-04-10 10:12:36 -04:00
gorhill 86441e399a oops 2015-04-10 10:10:57 -04:00
Raymond Hill e7542cda41 Update README.md 2015-04-10 10:08:40 -04:00
gorhill 615ac8608c automated build 2015-04-10 10:06:46 -04:00
gorhill b63c5fd9b2 this fixes #138 2015-03-14 11:58:37 -04:00