Skip to content

Commit 54307d1

Browse files
committed
story version now respects ad disabled flag
1 parent 7d97118 commit 54307d1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/locker.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ const locker = {
6464
default:
6565
// nothing
6666
}
67+
},
68+
69+
areAdsAllowed() {
70+
return true;
6771
}
6872
}
6973

lib/story.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
import * as zones from "./zones.js";
66

77
export async function render(locker) {
8+
// If ads are disabled bail
9+
if(!locker.areAdsAllowed()) {
10+
zones.log("none", "ads are disabled for this page");
11+
return;
12+
}
13+
814
// Locker configs
915
const subscriber = locker.user.isSubscriber();
1016
const market = locker.getConfig("marketInfo.domain");

0 commit comments

Comments
 (0)