Skip to content

Commit 0e804fa

Browse files
authored
Beta-Testing with vs. without filters on load.
1 parent 3857a47 commit 0e804fa

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎demo/v2-demo/scripts/function_mapping.js‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,20 @@ function IsMock(funcName) {
7070

7171
function mapFunc(func) {
7272
const funcName = getFuncName(func);
73-
return IsMock(funcName) ? mockDict[funcName] : func;
73+
if (IsMock(funcName)) {
74+
if (funcName == '_Embed_BasicEmbed') {
75+
let rand = Math.floor(Math.random() * 10);
76+
if (rand <= 5) {
77+
return mockDict[funcName];
78+
}
79+
else {
80+
return _Mock_Embed_BasicEmbed_ViewMode_With_Filters;
81+
}
82+
}
83+
return mockDict[funcName];
84+
}
85+
86+
return func;
7487
}
7588

7689
function getFuncName(func) {
@@ -83,4 +96,4 @@ function getFuncName(func) {
8396
}
8497

8598
return funcName;
86-
}
99+
}

0 commit comments

Comments
 (0)