Skip to content

Commit 09fdb70

Browse files
committed
fix typo
1 parent 70a0ebe commit 09fdb70

17 files changed

+185
-185
lines changed

platform/common/vapi-background.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/******************************************************************************/
2626

2727
import webext from './webext.js';
28-
import { adnLog } from './console.js';
28+
import { adnlog } from './console.js';
2929
import { makeCloneable } from './adn/adn-utils.js';
3030

3131
/******************************************************************************/
@@ -1182,7 +1182,7 @@ vAPI.messaging = {
11821182
}
11831183

11841184
// Auxiliary process to main process: no handler
1185-
adnLog(
1185+
adnlog(
11861186
`vAPI.messaging.onPortMessage > unhandled request: ${JSON.stringify(request.msg)}`,
11871187
request
11881188
);

src/js/assets.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import µb from './background.js';
3030
// adn
3131
import adnauseam from './adn/core.js'
3232
import dnt from './adn/dnt.js'
33-
import { adnLog } from './console.js';
33+
import { adnlog } from './console.js';
3434

3535
/******************************************************************************/
3636

@@ -122,7 +122,7 @@ const resourceIsStale = (networkDetails, cacheDetails) => {
122122
if ( typeof cacheDetails.resourceTime !== 'number' ) { return false; }
123123
if ( cacheDetails.resourceTime === 0 ) { return false; }
124124
if ( networkDetails.resourceTime < cacheDetails.resourceTime ) {
125-
adnLog(`Skip ${networkDetails.url}\n\tolder than ${cacheDetails.remoteURL}`);
125+
adnlog(`Skip ${networkDetails.url}\n\tolder than ${cacheDetails.remoteURL}`);
126126
return true;
127127
}
128128
return false;
@@ -540,7 +540,7 @@ function getAssetSourceRegistry() {
540540
if ( bin instanceof Object ) {
541541
if ( bin.assetSourceRegistry instanceof Object ) {
542542
assetSourceRegistry = bin.assetSourceRegistry;
543-
adnLog('Loaded assetSourceRegistry');
543+
adnlog('Loaded assetSourceRegistry');
544544
return assetSourceRegistry;
545545
}
546546
}
@@ -552,7 +552,7 @@ function getAssetSourceRegistry() {
552552
: assets.fetchText(µb.assetsJsonPath);
553553
}).then(details => {
554554
updateAssetSourceRegistry(details.content, true);
555-
adnLog('Loaded assetSourceRegistry');
555+
adnlog('Loaded assetSourceRegistry');
556556
return assetSourceRegistry;
557557
});
558558
});
@@ -694,7 +694,7 @@ function getAssetCacheRegistry() {
694694
if ( Object.keys(assetCacheRegistry).length !== 0 ) {
695695
return console.error('getAssetCacheRegistry(): assetCacheRegistry reassigned!');
696696
}
697-
adnLog('Loaded assetCacheRegistry');
697+
adnlog('Loaded assetCacheRegistry');
698698
assetCacheRegistry = bin.assetCacheRegistry;
699699
}).then(( ) =>
700700
assetCacheRegistry
@@ -805,7 +805,7 @@ async function assetCacheRemove(pattern, options = {}) {
805805
const keys = await cacheStorage.keys(re);
806806
for ( const key of keys ) {
807807
removedContent.push(key);
808-
adnLog(`Removing stray ${key}`);
808+
adnlog(`Removing stray ${key}`);
809809
}
810810
}
811811
if ( removedContent.length !== 0 ) {
@@ -1253,7 +1253,7 @@ async function diffUpdater() {
12531253
}
12541254
}
12551255
if ( toHardUpdate.length === 0 ) { return; }
1256-
adnLog('Diff updater: cycle start');
1256+
adnlog('Diff updater: cycle start');
12571257
return new Promise(resolve => {
12581258
let pendingOps = 0;
12591259
const bc = new globalThis.BroadcastChannel('diffUpdater');
@@ -1262,7 +1262,7 @@ async function diffUpdater() {
12621262
bc.close();
12631263
resolve();
12641264
if ( typeof error !== 'string' ) { return; }
1265-
adnLog(`Diff updater: terminate because ${error}`);
1265+
adnlog(`Diff updater: terminate because ${error}`);
12661266
};
12671267
const checkAndCorrectDiffPath = data => {
12681268
if ( typeof data.text !== 'string' ) { return; }
@@ -1275,7 +1275,7 @@ async function diffUpdater() {
12751275
bc.onmessage = ev => {
12761276
const data = ev.data || {};
12771277
if ( data.what === 'ready' ) {
1278-
adnLog('Diff updater: hard updating', toHardUpdate.map(v => v.assetKey).join());
1278+
adnlog('Diff updater: hard updating', toHardUpdate.map(v => v.assetKey).join());
12791279
while ( toHardUpdate.length !== 0 ) {
12801280
const assetDetails = toHardUpdate.shift();
12811281
assetDetails.fetch = true;
@@ -1289,7 +1289,7 @@ async function diffUpdater() {
12891289
return;
12901290
}
12911291
if ( data.status === 'needtext' ) {
1292-
adnLog('Diff updater: need text for', data.assetKey);
1292+
adnlog('Diff updater: need text for', data.assetKey);
12931293
assetCacheRead(data.assetKey).then(result => {
12941294
// https://bugzilla.mozilla.org/show_bug.cgi?id=1929326#c9
12951295
// Must never be set to undefined!
@@ -1301,7 +1301,7 @@ async function diffUpdater() {
13011301
return;
13021302
}
13031303
if ( data.status === 'updated' ) {
1304-
adnLog(`Diff updater: successfully patched ${data.assetKey} using ${data.patchURL} (${data.patchSize})`);
1304+
adnlog(`Diff updater: successfully patched ${data.assetKey} using ${data.patchURL} (${data.patchSize})`);
13051305
const metadata = extractMetadataFromList(data.text, [
13061306
'Last-Modified',
13071307
'Expires',
@@ -1316,44 +1316,44 @@ async function diffUpdater() {
13161316
assetCacheSetDetails(data.assetKey, metadata);
13171317
updaterUpdated.push(data.assetKey);
13181318
} else if ( data.error ) {
1319-
adnLog(`Diff updater: failed to update ${data.assetKey} using ${data.patchPath}\n\treason: ${data.error}`);
1319+
adnlog(`Diff updater: failed to update ${data.assetKey} using ${data.patchPath}\n\treason: ${data.error}`);
13201320
} else if ( data.status === 'nopatch-yet' || data.status === 'nodiff' ) {
1321-
adnLog(`Diff updater: skip update of ${data.assetKey} using ${data.patchPath}\n\treason: ${data.status}`);
1321+
adnlog(`Diff updater: skip update of ${data.assetKey} using ${data.patchPath}\n\treason: ${data.status}`);
13221322
assetCacheSetDetails(data.assetKey, { writeTime: data.writeTime });
13231323
broadcast({
13241324
what: 'assetUpdated',
13251325
key: data.assetKey,
13261326
cached: true,
13271327
});
13281328
} else {
1329-
adnLog(`Diff updater: ${data.assetKey} / ${data.patchPath} / ${data.status}`);
1329+
adnlog(`Diff updater: ${data.assetKey} / ${data.patchPath} / ${data.status}`);
13301330
}
13311331
pendingOps -= 1;
13321332
if ( pendingOps === 0 && toSoftUpdate.length !== 0 ) {
1333-
adnLog('Diff updater: soft updating', toSoftUpdate.map(v => v.assetKey).join());
1333+
adnlog('Diff updater: soft updating', toSoftUpdate.map(v => v.assetKey).join());
13341334
while ( toSoftUpdate.length !== 0 ) {
13351335
bc.postMessage(toSoftUpdate.shift());
13361336
pendingOps += 1;
13371337
}
13381338
}
13391339
if ( pendingOps !== 0 ) { return; }
1340-
adnLog('Diff updater: cycle complete');
1340+
adnlog('Diff updater: cycle complete');
13411341
terminate();
13421342
};
13431343
const worker = new Worker('js/diff-updater.js');
13441344
}).catch(reason => {
1345-
adnLog(`Diff updater: ${reason}`);
1345+
adnlog(`Diff updater: ${reason}`);
13461346
});
13471347
}
13481348

13491349
function updateFirst() {
1350-
adnLog('Updater: cycle start');
1351-
adnLog('Updater: prefer', updaterAuto ? 'CDNs' : 'origin');
1350+
adnlog('Updater: cycle start');
1351+
adnlog('Updater: prefer', updaterAuto ? 'CDNs' : 'origin');
13521352
updaterStatus = 'updating';
13531353
updaterFetched.clear();
13541354
updaterUpdated.length = 0;
13551355
diffUpdater().catch(reason => {
1356-
adnLog(reason);
1356+
adnlog(reason);
13571357
}).finally(( ) => {
13581358
updateNext();
13591359
});
@@ -1427,10 +1427,10 @@ async function updateNext() {
14271427
remoteServerFriendly = false;
14281428

14291429
if ( result.error ) {
1430-
adnLog(`Full updater: failed to update ${assetKey}`);
1430+
adnlog(`Full updater: failed to update ${assetKey}`);
14311431
fireNotification('asset-update-failed', { assetKey: result.assetKey });
14321432
} else {
1433-
adnLog(`Full updater: successfully updated ${assetKey}`);
1433+
adnlog(`Full updater: successfully updated ${assetKey}`);
14341434
updaterUpdated.push(result.assetKey);
14351435
if ( result.assetKey === 'assets.json' && result.content !== '' ) {
14361436
updateAssetSourceRegistry(result.content);
@@ -1449,9 +1449,9 @@ function updateDone() {
14491449
updaterStatus = undefined;
14501450
updaterAuto = false;
14511451
updaterAssetDelay = updaterAssetDelayDefault;
1452-
adnLog('Updater: cycle end');
1452+
adnlog('Updater: cycle end');
14531453
if ( assetKeys.length ) {
1454-
adnLog(`Updater: ${assetKeys.join()} were updated`);
1454+
adnlog(`Updater: ${assetKeys.join()} were updated`);
14551455
}
14561456
fireNotification('after-assets-updated', { assetKeys });
14571457
}

src/js/background.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
import { internalLinkDomainsDefault } from './adn/adn-utils.js'; // adn
3131
import { FilteringContext } from './filtering-context.js';
3232
import logger from './logger.js';
33-
import { adnLogSet } from './console.js';
33+
import { adnlogSet } from './console.js';
3434

3535
/******************************************************************************/
3636

@@ -158,7 +158,7 @@ if (vAPI.webextFlavor.soup.has('devbuild')) {
158158
userSettingsDefault.devMode = true;
159159
hiddenSettingsDefault.consoleLogLevel = 'info';
160160
hiddenSettingsDefault.cacheStorageAPI = 'unset';
161-
adnLogSet(true);
161+
adnlogSet(true);
162162
}
163163

164164
/* Adn https://github.com/dhowe/AdNauseam/issues/2040 */

0 commit comments

Comments
 (0)