mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 17:17:57 +01:00
support 2-letter hostname, for when using TLD alone
This commit is contained in:
parent
9dbb00819f
commit
c28568f9b0
3 changed files with 6 additions and 6 deletions
|
@ -85,7 +85,7 @@ return {
|
|||
|
||||
// read-only
|
||||
systemSettings: {
|
||||
compiledMagic: 'iolkecdtfsiy',
|
||||
compiledMagic: 'umxqgjonkvtf',
|
||||
selfieMagic: 'spqmeuaftfra'
|
||||
},
|
||||
|
||||
|
|
|
@ -158,11 +158,11 @@ var onSystemSettingsReady = function(fetched) {
|
|||
mustSaveSystemSettings = true;
|
||||
}
|
||||
if ( fetched.selfieMagic !== µb.systemSettings.selfieMagic ) {
|
||||
fetched.selfie = null;
|
||||
µb.destroySelfie();
|
||||
mustSaveSystemSettings = true;
|
||||
}
|
||||
if ( mustSaveSystemSettings ) {
|
||||
fetched.selfie = null;
|
||||
µb.destroySelfie();
|
||||
vAPI.storage.set(µb.systemSettings, µb.noopFunc);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
Home: https://github.com/gorhill/uBlock
|
||||
*/
|
||||
|
||||
/* jshint bitwise: false, esnext: true */
|
||||
/* global µBlock */
|
||||
/* jshint bitwise: false, esnext: true, boss: true */
|
||||
/* global punycode, µBlock */
|
||||
|
||||
// Older Safari throws an exception for const when it's used with 'use strict'.
|
||||
// 'use strict';
|
||||
|
@ -88,7 +88,7 @@ const AllowAnyTypeAnyParty = AllowAction | AnyType | AnyParty;
|
|||
const AllowAnyType = AllowAction | AnyType;
|
||||
const AllowAnyParty = AllowAction | AnyParty;
|
||||
|
||||
var reHostnameRule = /^[0-9a-z][0-9a-z.-]+[0-9a-z]$/;
|
||||
var reHostnameRule = /^[0-9a-z][0-9a-z.-]*[0-9a-z]$/;
|
||||
var reHostnameToken = /^[0-9a-z]+/g;
|
||||
var reGoodToken = /[%0-9a-z]{2,}/g;
|
||||
var reURLPostHostnameAnchors = /[\/?#]/;
|
||||
|
|
Loading…
Reference in a new issue