- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
--- a/src/Foo.js
+++ b/src/Foo.js
@@ -1,21 +1,61 @@
var Foo = (function () {
function Foo(productId, productSettings, overrides) {
var backup, loc = document.location, home;
- this._sdkSettings = Program.Utils.deepCopy(Take5.settings);
+ this._sdkSettings = JSON.parse(JSON.stringify(TGH5.settings));
if(overrides) {
- this._sdkSettings = Program.Utils.copyProperties(overrides, this._sdkSettings);
+ if('debug' in overrides) {
+ this._sdkSettings.debug = overrides.debug;
+ }
+ if('inDemoMode' in overrides) {
+ this._sdkSettings.inDemoMode = overrides.inDemoMode;
+ }
+ if('sdkHome' in overrides) {
+ this._sdkSettings.sdkHome = overrides.sdkHome;
+ }
+ if('eixtUrl' in overrides) {
+ this._sdkSettings.exitUrl = overrides.exitUrl;
+ }
+ if('ads' in overrides) {
+ if('preRoll' in overrides.ads) {
+ this._sdkSettings.ads.preRoll = overrides.ads.preRoll;
+ }
+ if('inGame' in overrides.ads) {
+ this._sdkSettings.ads.inGame = overrides.ads.inGame;
+ }
+ if('postRoll' in overrides.ads) {
+ this._sdkSettings.ads.postRoll = overrides.ads.postRoll;
+ }
+ }
+ if('reporting' in overrides) {
+ if(overrides.reporting instanceof Object) {
+ if('analyticsId' in overrides.reporting) {
+ this._sdkSettings.reporting.analyticsId = overrides.reporting.analyticsId;
+ }
+ if('site' in overrides.reporting) {
+ this._sdkSettings.reporting.site = overrides.reporting.site;
+ }
+ if('virtualPageRoot' in overrides.reporting) {
+ this._sdkSettings.reporting.virtualPageRoot = overrides.reporting.virtualPageRoot;
+ }
+ if('initParams' in overrides.reporting) {
+ this._sdkSettings.reporting.initParams = overrides.reporting.initParams;
+ }
+ } else {
+ this._sdkSettings.reporting = overrides.reporting;
+ }
+ }
}
Мистер Хэнки 02.06.2013 19:52 # +2
guest8 11.07.2020 03:52 # −999