Closed zhanglianxin closed 6 years ago
I will fix it https://developers.google.com/web/updates/2017/12/chrome-loadtimes-deprecated#wasfetchedviaspdy
function wasFetchedViaSpdy() {
// SPDY is deprecated in favor of HTTP/2, but this implementation returns
// true for HTTP/2 or HTTP2+QUIC/39 as well.
if (window.PerformanceNavigationTiming) {
const ntEntry = performance.getEntriesByType('navigation')[0];
return ['h2', 'hq'].includes(ntEntry.nextHopProtocol);
}
}
[Deprecation] chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2. https://www.chromestatus.com/features/5637885046816768. SPDY @ chrome-extension://****/js/detector.js:393
Although it's a warning message, the extension doesn't work normally.
I found this page may be helpful (Chrome 64 to deprecate the chrome.loadTimes() API).