1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-06-29 03:21:09 +12:00
Commit graph

212 commits

Author SHA1 Message Date
gorhill d47d8bf0bf this fixes #158 2015-05-02 17:41:52 -04:00
gorhill 44f1a61c42 placeholder styling gone: it's bloat-ish 2015-05-02 17:13:55 -04:00
gorhill cd13d2870b this fixes sticky popup on FF 2015-05-02 13:43:50 -04:00
gorhill ddaa948cf4 new way of handling blocked documents 2015-05-02 13:30:29 -04:00
gorhill e751a5403b code review 2015-05-02 12:07:40 -04:00
gorhill 0e77cbd15d this fixes #45 + revised color-blind mode + support shutdown of content script 2015-05-02 11:17:17 -04:00
gorhill 1583a3edc6 no longer needed 2015-05-02 09:26:14 -04:00
gorhill dbe14694c8 code review 2015-05-02 00:18:31 -04:00
gorhill eb42375215 code review 2015-05-01 23:54:32 -04:00
gorhill c472e23c7d assets updater, hosts files pane, etc. 2015-05-01 19:27:43 -04:00
gorhill f4807b6b29 code review 2015-05-01 08:09:01 -04:00
gorhill 37331b1ef2 various fixes re. behind-the-scene scope 2015-04-30 19:37:55 -04:00
gorhill b01964db9b more fixes for rule edit mode 2015-04-30 19:13:03 -04:00
gorhill 171fef784e this fixes rule rendering in edit mode in FF 2015-04-30 19:03:35 -04:00
gorhill f815223f27 https://github.com/gorhill/uBlock/issues/150 needs to be fixed here too 2015-04-30 10:05:00 -04:00
gorhill 1c05281183 comments 2015-04-30 09:58:45 -04:00
gorhill 1f4ff9c809 more refactoring, code review 2015-04-21 19:47:19 -04:00
gorhill 8ae33e9c12 FF: this fixes availability of response headers for when item pulled from cache 2015-04-21 17:38:54 -04:00
gorhill 7cd060a15f refactoring, fixing script/frame blocking on FF, etc., more to do 2015-04-21 16:22:29 -04:00
gorhill cb29f10173 fixed matrix css 2015-04-21 10:16:46 -04:00
gorhill c1314e496b support ping request type explicitly 2015-04-19 16:30:28 -04:00
gorhill 595de33e83 sanitizing outgoing headers (drafty) 2015-04-19 16:19:14 -04:00
gorhill 5106c4bc44 this fixes rendering of toolbar icon 2015-04-19 10:06:05 -04:00
gorhill 0b1ddfa17b code review 2015-04-13 15:05:53 -04:00
gorhill 5f177a2e30 this fixes reload button 2015-04-13 15:01:12 -04:00
gorhill 2d4431fe0c punycode: use non-minified version 2015-04-13 13:09:57 -04:00
gorhill 9340975606 a whole lot more left to do, at least popup shows 2015-04-13 12:31:55 -04:00
gorhill 19ddf588fb i18n work 2015-04-12 07:06:50 -04:00
gorhill ed67045360 first pass 2015-04-11 17:15:57 -04:00
Deathamns e54c09da8a 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:39:18 -04:00
Deathamns e6e3868080 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:39:18 -04:00
Deathamns 9f23b45651 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:39:18 -04:00
Deathamns 686403af38 Avoid using Chrome's @@bidi_* type i18n messages
... for the sake of portability.

When including vapi-common.js in an HTML file, then the body element there
will have a "dir" attribute filled with the current locale's direction
(ltr or rtl).

The following languages are considered right-to-left: ar, he, fa, ps, ur.
Everything else is left-to-right.

After the "dir" attribute is set, we can decide in CSS which elements
should have different styling for rtl languages (e.g., body[dir=rtl] #id).
2015-04-10 19:39:18 -04:00
Deathamns 358ec2c644 Fix download URL for the fallback method 2015-04-10 19:39:18 -04:00
Deathamns da0e62dff6 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
2015-04-10 19:39:18 -04:00
Deathamns 25caa9241c Set default dimensions for Safari's popup 2015-04-10 19:39:18 -04:00
Deathamns 2216b7f32e 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.
2015-04-10 19:39:18 -04:00
Deathamns db83931fb7 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.
2015-04-10 19:39:18 -04:00
Deathamns cd08ad9782 Work on vendor API abstraction, and near complete Safari support 2015-04-10 19:39:18 -04:00
Deathamns 33e6728468 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:37:25 -04:00
Deathamns 03af075a64 Move MutationObserver shim
Since it will be used only for older Safari versions, move it to Safari
related code, so it doesn't pollute the content scripts.
2015-04-10 19:37:25 -04:00
Deathamns ef30ab4c2d Respect defer attribute when mirroring 2015-04-10 19:37:25 -04:00
Deathamns abb13424b4 Call XHR.open even if the request will be blocked
Without calling it an error may be thrown if other XHR parameters are set.
2015-04-10 19:37:25 -04:00
Deathamns d9c9627758 Only top window should have type main_frame 2015-04-10 19:37:25 -04:00
Deathamns 8f0172467a Remove unnecessary messaging workaround
A better fix was introduced in e36c702 for this issue.

The actual problem was that Safari when sends a message from the
background to content, then it passes to all the frames in the target tab,
but it doesn't make copies, it passes only references to the same object,
so if one frame modifies the message, then other frames would have
received the modified message.
2015-04-10 19:37:25 -04:00
Deathamns aebfb15aa2 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:37:25 -04:00
Deathamns a39572448d Fix messaging for Safari 2015-04-10 19:37:25 -04:00
Deathamns 08247fb5dd 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:37:25 -04:00
Deathamns 1a38523875 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:37:25 -04:00
Deathamns 0bc67a8819 Drop js-loader, updates from gorhill/uBlock/master 2015-04-10 19:37:25 -04:00