File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ var gmail = Gmail();
98
98
- ` poll `
99
99
- ` new_email `
100
100
- ` refresh `
101
- - gmail.observe ** .off()**
101
+ - gmail.observe ** .off(action )**
102
102
103
103
104
104
### DOM
Original file line number Diff line number Diff line change @@ -687,11 +687,17 @@ var Gmail = function() {
687
687
}
688
688
689
689
690
- api . observe . off = function ( ) {
691
- var win = top . document . getElementById ( "js_frame" ) . contentDocument . defaultView ;
692
- win . XMLHttpRequest . prototype . open = api . tracker . xhr_open ;
693
- win . XMLHttpRequest . prototype . send = api . tracker . xhr_send ;
694
- api . tracker . xhr_init = false
690
+ api . observe . off = function ( action ) {
691
+ if ( action ) {
692
+ if ( action in self . tracker . watchdog ) {
693
+ delete self . tracker . watchdog [ action ] ;
694
+ }
695
+ } else {
696
+ var win = top . document . getElementById ( "js_frame" ) . contentDocument . defaultView ;
697
+ win . XMLHttpRequest . prototype . open = api . tracker . xhr_open ;
698
+ win . XMLHttpRequest . prototype . send = api . tracker . xhr_send ;
699
+ api . tracker . xhr_init = false
700
+ }
695
701
}
696
702
697
703
You can’t perform that action at this time.
0 commit comments