Commit Graph

150 Commits (415857c55bd88973bef1ebdc78f9b27383d7e977)

Author SHA1 Message Date
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)
10 years ago
Raymond Hill bd5492654f give specific message handlers priority over default one 10 years ago
Deathamns c3178cd442 Only top window should have type `main_frame` 10 years ago
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).
10 years ago
Deathamns 29eabd44fd Fix messaging for Safari 10 years ago
Deathamns 872a478f91 Preferences button for Safari
Brings back the possibility to click a checkbox which opens the extension
settings from Safari's Preferences/Extensions.
10 years ago
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.
10 years ago
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.
10 years ago
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.
10 years ago
Deathamns c0b1565131 Badge number sometimes disappeared in Safari 10 years ago
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).
10 years ago
Deathamns 1be99cf58e Remove unnecessary comments 10 years ago
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
10 years ago
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.
10 years ago
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
10 years ago
Deathamns 35ed9cd853 Work on vendor API abstraction, and near complete Safari support 10 years ago
gorhill 63aa4be9f7 reorganizing, preparing move to vAPI 10 years ago
gorhill 056e68da66 this fixes #42 10 years ago
gorhill 01f7cea94f re #89: fixed using non-compliant color 10 years ago
emanueLczirai 7085beb66a missing semicolon 10 years ago
gorhill 0174955287 comment re potential redundant eval 10 years ago
gorhill b68ba6d728 this fixes #82 10 years ago
Raymond Hill f0063372c5 this fixes #77 10 years ago
Raymond Hill 5777dc0b15 code review: actually no `file:` should occurs within `https:` doc 10 years ago
Raymond Hill baa8e86fd4 this addresses issue raised in #71 10 years ago
Raymond Hill b62fb94a00 code review 10 years ago
Raymond Hill 44533d77eb this fixes #72 10 years ago
Raymond Hill e39b36beda code review; make strict https break less stuff on new tab page 10 years ago
Raymond Hill 36233c7325 vertical ellispsis instead 10 years ago
Raymond Hill ee361ae37f comments 10 years ago
Raymond Hill a31351c6f9 doc is hardcoded now 10 years ago
Raymond Hill bf5b6c4517 code review 10 years ago
Raymond Hill 9a93c2375c move "Strict HTTPS" last since now it is built-in the browser 10 years ago
Raymond Hill cf02253cdd this should help futur occurrences of #65 10 years ago
Raymond Hill dc3de2a3ca make ua-spoofing code easier to read from dev tools 10 years ago
Raymond Hill 40bc8087e5 this fixes #61 10 years ago
Raymond Hill 238e6c3536 re #61 10 years ago
Raymond Hill 5d8bae3da2 this fixes #59 10 years ago
Raymond Hill 977f94a50a fine-tuning for RTL languages 10 years ago
Raymond Hill d01ab961b8 this fixes #7, #36 10 years ago
Raymond Hill ce6305210c UI work toward fixing #7, #36 10 years ago
Raymond Hill 5f3dc76b32 code review 10 years ago
Raymond Hill 5e19edaab7 ability to foil mixed content 10 years ago
Raymond Hill 5ba8f58094 ensure switches are listed first: more convenient 10 years ago
Raymond Hill 2962bd19e2 cide review 10 years ago
Raymond Hill 4aab150af3 infrastructure work toward addressing #7, #36 10 years ago
gorhill 3524c12924 fixed double definition as per 4bf6664d6b 10 years ago
gorhill f0a58ad06f bring back color hint for site-level scope 10 years ago
gorhill 3edd9eabc6 export must be on left side since permanent rules are exported 10 years ago
gorhill 4211613055 fix rendering of mu character 10 years ago