File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 14
14
iframeId : 'ALOODO_FAKE_TRACKER_BLOCK_ME'
15
15
} ;
16
16
this . _var = {
17
- version : '1.0.1 ' ,
17
+ version : '1.1.0 ' ,
18
18
event : { load : [ ] ,
19
- detected : [ ] }
19
+ detected : [ ] ,
20
+ blocked : [ ]
21
+ }
20
22
} ;
21
23
if ( options !== undefined ) {
22
24
this . setOption ( options ) ;
34
36
which = 'load' ;
35
37
} else if ( ev . data === 'tracking detected' ) {
36
38
which = 'detected' ;
39
+ } else if ( ev . data === 'cookie blocked' ) {
40
+ which = 'blocked' ;
37
41
} else {
38
42
return ;
39
43
}
122
126
Aloodo . prototype . onDetected = function ( fn ) {
123
127
return this . on ( 'detected' , fn ) ;
124
128
} ;
129
+ Aloodo . prototype . onBlocked = function ( fn ) {
130
+ return this . on ( 'blocked' , fn ) ;
131
+ } ;
125
132
126
133
window . Aloodo = Aloodo ;
127
134
Original file line number Diff line number Diff line change 68
68
var newcookie = out . join ( ' ' ) ;
69
69
setCookie ( 'site' , newcookie ) ;
70
70
localStorage . setItem ( 'site' , newcookie ) ;
71
+ var maybeCookie = getCookie ( 'site' ) ;
72
+ if ( maybeCookie != newcookie ) {
73
+ parent . postMessage ( 'cookie blocked' , '*' ) ;
74
+ }
71
75
}
72
76
73
77
function doTrack ( ) {
You can’t perform that action at this time.
0 commit comments