popup.js
/**
 * Refresh the active Tab and logs the refresh interval
 */
Refresh the active Tab and logs the refresh interval
Refresh the active Tab and logs the refresh interval
function refreshTab() {
    if (lastRefreshDate) {
        let refreshInterval = new Date() - lastRefreshDate;
        console.log(refreshInterval);
    }
    lastRefreshDate = new Date();
    chrome.tabs.query({active: true, currentWindow: true}, function (tabs) {
        chrome.tabs.reload(tabs[0].id);
    });
}
function refreshTab ( ) { if ( lastRefreshDate ) { let refreshInterval = new Date ( ) - lastRefreshDate ; console . log ( refreshInterval ) ; } lastRefreshDate = new Date ( ) ; chrome . tabs . query ( { active : true , currentWindow : true } , function ( tabs ) { chrome . tabs . reload ( tabs [ 0 ] . id ) ; } ) ; }
Refresh the active Tab and logs the refresh interval
Refresh the active Tab and logs the refresh interval
// Logging the Refresh Interval in ms