Skip to content

Commit

Permalink
Merge pull request gorhill#15 from gorhill/master
Browse files Browse the repository at this point in the history
Re-sync with uBo master
  • Loading branch information
ryanbr authored Aug 3, 2020
2 parents 525d10a + 59496cf commit 887e7d1
Show file tree
Hide file tree
Showing 33 changed files with 1,389 additions and 1,937 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ There is also a development version if you want to test uBlock Origin with the l

uBlock Origin is compatible with [SeaMonkey](http://www.seamonkey-project.org/), [Pale Moon](https://www.palemoon.org/), and possibly other browsers based on Firefox: for installation, see [Install / Firefox legacy](https://github.com/gorhill/uBlock/blob/master/dist/README.md#firefox-legacy).

uBO mat also be installable as a [Debian package](https://packages.debian.org/stable/source/ublock-origin):
uBO may also be installed as a [Debian package](https://packages.debian.org/stable/source/ublock-origin):

- Firefox 56-: `apt-get install xul-ext-ublock-origin`
- Firefox 55+: `apt-get install webext-ublock-origin`
Expand Down
6 changes: 3 additions & 3 deletions dist/firefox/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"[email protected]": {
"updates": [
{
"version": "1.28.5.4",
"version": "1.28.5.13",
"browser_specific_settings": { "gecko": { "strict_min_version": "55" } },
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.28.5b4",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.28.5b4/uBlock0_1.28.5b4.firefox.signed.xpi"
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.28.5b13",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.28.5b13/uBlock0_1.28.5b13.firefox.signed.xpi"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion dist/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.28.5.4
1.28.5.13
24 changes: 22 additions & 2 deletions docs/tests/static-filtering-parser-checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@

! valid patterns
a*
|*
||*
*$xhr
|*$xhr
|$xhr
||*$xhr
||$xhr
||*|$xhr

! valid hosts file entries
:: ab
:: AB
:: ab # comment

! valid options
$script,redirect=noop.js
Expand All @@ -47,6 +56,17 @@ a
|
||
$
*
|*
||*
||*|

! bad hosts file entries
:: a
:: ab/
:: ab/ # comment
::/ ab
:: ab$

! bad regex
/(abc|def/$xhr
Expand Down
30 changes: 7 additions & 23 deletions platform/chromium/vapi-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ vAPI.webextFlavor = {
dispatch();
});
if ( browser.runtime.getURL('').startsWith('moz-extension://') ) {
soup.add('mozilla')
.add('firefox')
soup.add('firefox')
.add('user_stylesheet')
.add('html_filtering');
flavor.major = 60;
Expand All @@ -85,29 +84,14 @@ vAPI.webextFlavor = {
}

// Synchronous -- order of tests is important
let match;
if ( (match = /\bEdge\/(\d+)/.exec(ua)) !== null ) {
flavor.major = parseInt(match[1], 10) || 0;
soup.add('microsoft').add('edge');
} else if ( (match = /\bOPR\/(\d+)/.exec(ua)) !== null ) {
const reEx = /\bChrom(?:e|ium)\/([\d.]+)/;
if ( reEx.test(ua) ) { match = reEx.exec(ua); }
flavor.major = parseInt(match[1], 10) || 0;
soup.add('opera').add('chromium');
} else if ( (match = /\bChromium\/(\d+)/.exec(ua)) !== null ) {
flavor.major = parseInt(match[1], 10) || 0;
const match = /\bChrom(?:e|ium)\/([\d.]+)/.exec(ua);
if ( match !== null ) {
soup.add('chromium');
} else if ( (match = /\bChrome\/(\d+)/.exec(ua)) !== null ) {
flavor.major = parseInt(match[1], 10) || 0;
soup.add('google').add('chromium');
} else if ( (match = /\bSafari\/(\d+)/.exec(ua)) !== null ) {
flavor.major = parseInt(match[1], 10) || 0;
soup.add('apple').add('safari');
}

// https://github.com/gorhill/uBlock/issues/3588
if ( soup.has('chromium') && flavor.major >= 66 ) {
soup.add('user_stylesheet');
// https://github.com/gorhill/uBlock/issues/3588
if ( flavor.major >= 66 ) {
soup.add('user_stylesheet');
}
}

// Don't starve potential listeners
Expand Down
54 changes: 0 additions & 54 deletions platform/chromium/vapi-usercss.js

This file was deleted.

Loading

0 comments on commit 887e7d1

Please sign in to comment.