File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -158,11 +158,12 @@ function beforeRequestHandler(details) {
158158 // specific IP address has been visiting one specific website.
159159 // We don't want that.
160160 var typeToEval = type ;
161+ var typeToRecord = type ;
161162 if ( type === 'stylesheet' ) {
162163 if ( uriTools . domainFromHostname ( hostname ) === pageStats . pageDomain ) {
163164 typeToEval = 'main_frame' ;
164165 } else {
165- typeToEval = 'other' ;
166+ typeToEval = typeToRecord = 'other' ;
166167 }
167168 }
168169
@@ -180,8 +181,9 @@ function beforeRequestHandler(details) {
180181 pageStats . perLoadAllowedRequestCount =
181182 pageStats . perLoadBlockedRequestCount = 0 ;
182183 }
184+
183185 // Log request
184- pageStats . recordRequest ( type , url , block ) ;
186+ pageStats . recordRequest ( typeToRecord , url , block ) ;
185187
186188 // rhill 2013-10-20:
187189 // https://github.com/gorhill/httpswitchboard/issues/19
@@ -204,7 +206,7 @@ function beforeRequestHandler(details) {
204206 }
205207
206208 // Collect global stats
207- httpsb . requestStats . record ( type , block ) ;
209+ httpsb . requestStats . record ( typeToRecord , block ) ;
208210
209211 // quickProfiler.stop('beforeRequestHandler | evaluate&record');
210212
You can’t perform that action at this time.
0 commit comments