1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-05 18:49:39 +02:00

support 2-letter hostname, for when using TLD alone

This commit is contained in:
gorhill 2015-03-01 17:25:48 -05:00
parent 9dbb00819f
commit c28568f9b0
3 changed files with 6 additions and 6 deletions

View File

@ -85,7 +85,7 @@ return {
// read-only
systemSettings: {
compiledMagic: 'iolkecdtfsiy',
compiledMagic: 'umxqgjonkvtf',
selfieMagic: 'spqmeuaftfra'
},

View File

@ -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);
}
};

View File

@ -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 = /[\/?#]/;