Skip to content

Commit

Permalink
change spdy check rule
Browse files Browse the repository at this point in the history
fixed #94
  • Loading branch information
justjavac committed Jan 4, 2018
1 parent 4d1d811 commit 5a356ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@
return window.et_params;
},
'SPDY': function() {
return window.chrome.loadTimes().wasFetchedViaSpdy;
if (window.PerformanceNavigationTiming) {
const ntEntry = performance.getEntriesByType('navigation')[0];
return ['h2', 'hq'].includes(ntEntry.nextHopProtocol);
}
return false;
},
'LiveStreet': function() {
return window.LIVESTREET_SECURITY_KEY;
Expand Down

0 comments on commit 5a356ff

Please sign in to comment.