File tree Expand file tree Collapse file tree 2 files changed +4
-164
lines changed
Expand file tree Collapse file tree 2 files changed +4
-164
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 152152 callback ( ) ;
153153 }
154154
155- /**
156- * converts a string to json
157- *
158- * @param string cookie
159- * @return Object
160- */
161- function _jsonDecode ( json_string )
162- {
163- return JSON . parse ( json_string ) ;
164- }
165-
166155 function _decode ( header ) {
167- return _jsonDecode ( Base64 . decode ( header ) ) ;
156+ return JSON . parse ( atob ( header ) ) ;
168157 }
169158
170159 function _process ( details ) {
171- var headers = details . responseHeaders ,
172- match = false ,
173- header = '' ;
160+ var headers = details . responseHeaders ;
174161
175162 for ( var i = 0 ; i < headers . length ; i ++ ) {
176163 if ( HEADER_NAMES . indexOf ( headers [ i ] . name . toLowerCase ( ) ) !== - 1 ) {
177- header = headers [ i ] . value ;
178- match = true ;
179- break ;
164+ _logData ( _decode ( headers [ i ] . value ) ) ;
165+ return ;
180166 }
181167 }
182-
183- if ( ! match ) {
184- return ;
185- }
186-
187- var data = _decode ( header ) ;
188-
189- _logData ( data ) ;
190168 }
191169
192170 function _handleHeaderUpdate ( request , sender , sendResponse ) {
You can’t perform that action at this time.
0 commit comments