Commit graph

37 commits

Author SHA1 Message Date
gorhill
1525a828c1 this fixes #810 2015-03-09 10:11:22 -04:00
Deathamns
95b778fbc7 Change extension description 2015-03-07 19:20:18 +01:00
gorhill
3f22ad3906 polishing 2015-03-06 10:22:30 -05:00
gorhill
aa955ebe09 code review, polishing 2015-03-06 00:36:45 -05:00
gorhill
d376c69e2f code review 2015-03-06 00:06:25 -05:00
gorhill
e23c2977d7 this fixes #945 2015-03-05 12:52:12 -05:00
gorhill
0cdf937a5e #815: code review 2015-02-16 11:21:25 -05:00
gorhill
0dc5c62b1e this fixes #815 2015-02-16 11:14:37 -05:00
Deathamns
2642d5aa92 replacing documentElement is enough 2015-02-14 10:47:11 +01:00
Deathamns
af05ceffb8 Strengthen the picker's visibility 2015-02-14 10:47:10 +01:00
Deathamns
fba0bf73ef Don't highlight the picker, handle empty filters 2015-02-14 10:47:09 +01:00
Deathamns
b3a2c9c5d3 Get URLs with properties instead of getAttribute 2015-02-14 10:47:08 +01:00
Deathamns
2d507b3edc Fix highlighting nodes for net filters in element-picker 2015-02-14 10:47:06 +01:00
Deathamns
187355b2b2 Move every part of the picker to the iframe 2015-02-14 10:47:05 +01:00
Deathamns
8693ab738d vAPI.sessionId, element-picker dialog as iframe
vAPI.sessionId - random ID generated every time when a page loads.

Having the dialog in an iframe lowers the chance of interference with the
styling of the page, also avoids using innerHTML (AMO complaint).
2015-02-14 10:47:04 +01:00
gorhill
a9e9ea454f this fixes part of #671 2015-02-03 18:43:51 -05:00
gorhill
fb59756bc6 this fixes #656 2015-01-31 18:33:15 -05:00
gorhill
9467e7fdec this fixes #637 2015-01-30 00:49:30 -05:00
Deathamns
f1bcc0a24b Focus window when activating element-picker 2015-01-18 08:12:39 +01:00
gorhill
ca77c677d7 not needed 2015-01-15 08:30:38 -05:00
Deathamns
089af13e32 URL handling changes 2015-01-15 13:24:35 +01:00
Deathamns
5e55ba772d Code styling 2015-01-13 07:29:49 +01:00
Deathamns
b301ac031e Popup related changes 2015-01-13 07:29:44 +01:00
gorhill
22fe58e59a this fixes #414 2014-12-15 09:00:49 -05:00
gorhill
f7860cab7c this fixes #343 2014-12-15 07:19:32 -05:00
Raymond Hill
a909cc48d4 this is a better solution for #400 2014-12-08 14:12:08 -02:00
Raymond Hill
dfe8eab846 this fixes #401 2014-12-06 15:28:19 -02:00
Raymond Hill
cf8f5c26e5 this fixes #396 2014-12-04 11:33:44 -02:00
Raymond Hill
f6120299af this fixes #387 2014-11-30 19:42:49 -02:00
Deathamns
30ef97a678 Fix messaging for Safari 2014-11-09 17:41:07 +01:00
Deathamns
d98a8161f9 Drop js-loader, updates from gorhill/uBlock/master 2014-11-09 17:41:02 +01:00
Deathamns
d114bf21e7 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.
2014-11-09 17:40:59 +01:00
Deathamns
cc27193147 Element picker tweaks
- Indentation whitespace fixes.
- Use built-in getBoundingClientRect() function instead of self-made.
- Use built-in DOM API for manipulating the class attributes instead of
  altering the className property.
- Add pointer-events: none to the svgRoot when using
  document.elementFromPoint(), but if the browser (older Safari for
  example) doesn't take the pointer-events into account, then fall back to
  display: none.
- Initiate every part of the picker at the same time; when the message is
  received from the background. This way the selected element will have
  the red overlay immediately, instead of showing first the black overlay,
  then a few milliseconds later the red.
2014-11-09 17:40:41 +01:00
Deathamns
d38ca13107 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
2014-11-09 17:39:30 +01:00
Deathamns
88a7910bcb element-picker fixes, changes
- Include latest changes from gorhill/uBlock/master
- Append the pickerRoot container to document.documentElement instead
  of document.body ("body > div" type CSS selectors are more common, so
  they could overwrite the extension's styling with higher probability)
- Request localized strings from the background script instead of using
  the i18n API in content scripts
- Fuse element-picker.js' message handling into contentscript-end.js', since
  only one messaging channel can live at a time in a content script
2014-11-09 17:39:28 +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/element-picker.js (Browse further)