Skip to content

Commit

Permalink
Merge pull request #2248 from mneunomne/master
Browse files Browse the repository at this point in the history
Minor changes
  • Loading branch information
mneunomne authored Dec 30, 2022
2 parents 557c490 + 0bdecae commit c63c8e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/js/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ const bootstrapPhaseAdn = function (response) {
// check last time ran
let now = Date.now()
// run if its first time running or if the last time it ran was more than 1 sec ago
if (lastRunBootstrapPhaseAdn === null || (lastRunBootstrapPhaseAdn && now - lastRunBootstrapPhaseAdn > intervalTime)) {
if (vAPI && lastRunBootstrapPhaseAdn === null || (lastRunBootstrapPhaseAdn && now - lastRunBootstrapPhaseAdn > intervalTime)) {
// avoid it running too many times;
if (bootstrapPhaseAdnCounter >= maxTimesRunBootstrapPhaseAdn) {
bootstrapAdnTimer.clear();
Expand All @@ -1314,7 +1314,7 @@ const bootstrapPhaseAdn = function (response) {

// avoid exception
if (typeof vAPI.domFilterer == 'undefined' || vAPI.domFilterer == null) {
console.error("[ADN] vAPI.domFilterer undefined")
console.warn("[ADN] vAPI.domFilterer undefined")
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/traffic.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const onBeforeSendHeaders = function (details) {
// ADN: remove outgoing cookies, reset user-agent, strip referer
const beforeAdVisit = function (details, headers, prefs, ad, respectDNT) {

const referer = ad.pageUrl, refererIdx = -1, dbug = 0;
var referer = ad.pageUrl, refererIdx = -1, dbug = 0;
let uirIdx = -1;

ad.requestId = details.requestId; // needed?
Expand Down

0 comments on commit c63c8e4

Please sign in to comment.