Skip to content

Commit 1127b18

Browse files
committed
be sure 3rd-party stylesheets are reported in matrix
1 parent 67ac5a7 commit 1127b18

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/traffic.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)