File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { pickRandom } from '@secret-agent/commons/utils';
1717import pkg from './package.json' ;
1818import headerProfiles from './data/headers.json' ;
1919import userAgentOptions from './data/user-agent-options.json' ;
20+ import config from './data/config.json' ;
2021
2122const windowFramingData = new DataLoader ( `${ __dirname } /data` , 'window-framing' ) ;
2223const windowChromeData = new DataLoader ( `${ __dirname } /data` , 'window-chrome' ) ;
@@ -27,7 +28,7 @@ const domDiffsData = new DomDiffLoader(`${__dirname}/data`);
2728@BrowserEmulatorClassDecorator
2829export default class Chrome80 {
2930 public static id = pkg . name ;
30- public static roundRobinPercent = 0 ; // TODO; Import from json
31+ public static roundRobinPercent : number = ( config as any ) . marketshare ;
3132
3233 public static engine = {
3334 ...pkg . engine ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { pickRandom } from '@secret-agent/commons/utils';
1717import pkg from './package.json' ;
1818import headerProfiles from './data/headers.json' ;
1919import userAgentOptions from './data/user-agent-options.json' ;
20+ import config from './data/config.json' ;
2021
2122const windowFramingData = new DataLoader ( `${ __dirname } /data` , 'window-framing' ) ;
2223const windowChromeData = new DataLoader ( `${ __dirname } /data` , 'window-chrome' ) ;
@@ -27,7 +28,7 @@ const domDiffsData = new DomDiffLoader(`${__dirname}/data`);
2728@BrowserEmulatorClassDecorator
2829export default class Chrome83 {
2930 public static id = pkg . name ;
30- public static roundRobinPercent = 0 ; // TODO: Import from json
31+ public static roundRobinPercent : number = ( config as any ) . marketshare ;
3132
3233 public static engine = {
3334 ...pkg . engine ,
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import IUserProfile from '@secret-agent/core-interfaces/IUserProfile';
2727import pkg from './package.json' ;
2828import headerProfiles from './data/headers.json' ;
2929import userAgentOptions from './data/user-agent-options.json' ;
30+ import config from './data/config.json' ;
3031
3132const windowFramingData = new DataLoader ( `${ __dirname } /data` , 'window-framing' ) ;
3233const windowNavigatorData = new DataLoader ( `${ __dirname } /data` , 'window-navigator' ) ;
@@ -37,7 +38,7 @@ const cookieCallbackName = 'SecretAgentSetCookie';
3738@BrowserEmulatorClassDecorator
3839export default class Safari13 {
3940 public static id = pkg . name ;
40- public static roundRobinPercent = 0 ; // TODO: Import from json
41+ public static roundRobinPercent : number = ( config as any ) . marketshare ;
4142
4243 public static engine = {
4344 ...pkg . engine ,
@@ -46,7 +47,7 @@ export default class Safari13 {
4647
4748 public readonly networkInterceptorDelegate : INetworkInterceptorDelegate ;
4849
49- public canPolyfill : boolean = false ;
50+ public canPolyfill = false ;
5051
5152 public set locale ( value : string ) {
5253 this . _locale = value ;
You can’t perform that action at this time.
0 commit comments