1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-02 00:42:45 +01:00
Commit Graph

1013 Commits

Author SHA1 Message Date
Deathamns
ab12c8d7d9 Remove unnecessary comments 2014-11-09 17:39:33 +01:00
Deathamns
7dba1f7e22 Use extension API to open links from the popup
Safari doesn't seem to follow links embedded in the popup window (not even
with target="_blank").
2014-11-09 17:39:31 +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
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
775f51a04b Fix "invalid token" exception in Safari
Seems like in older versions the const keyword doesn't play well with the "use strict" directive
2014-11-09 17:39:24 +01:00
Deathamns
1a83d1a753 Move vAPI into .jshintrc as a global 2014-11-09 17:39:22 +01:00
Deathamns
171619506b 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.
2014-11-09 17:39:20 +01:00
Deathamns
7af9805296 Safari shows integers only over the toolbar icon 2014-11-09 17:39:19 +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
4278121f74 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
2014-11-09 17:39:15 +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