Browse Source

fix reload button (regression from 2256552899)

pull/2/head
Raymond Hill 6 years ago
parent
commit
fc0bb7a35c
No known key found for this signature in database GPG Key ID: 25E1490B761470C2
  1. 18
      src/js/logger-ui.js

18
src/js/logger-ui.js

@ -555,14 +555,16 @@ var pageSelectorChanged = function() {
/******************************************************************************/
var refreshTab = function() {
var tabClass = document.getElementById('pageSelector').value;
var matches = tabClass.match(/^tab_(.+)$/);
if ( matches === null ) { return; }
if ( matches[1] === 'bts' ) { return; }
var reloadTab = function(ev) {
let tabId = document.getElementById('pageSelector').value;
if ( /^\d+$/.test(tabId) === false ) { return; }
vAPI.messaging.send(
'logger-ui.js',
{ what: 'forceReloadTab', tabId: parseInt(matches[1], 10) }
'default',
{
what: 'forceReloadTab',
tabId: parseInt(tabId, 10),
bypassCache: ev && (ev.ctrlKey || ev.metaKey || ev.shiftKey)
}
);
};
@ -1078,7 +1080,7 @@ window.addEventListener('beforeunload', releaseView);
readLogBuffer();
uDom('#pageSelector').on('change', pageSelectorChanged);
uDom('#refresh').on('click', refreshTab);
uDom('#refresh').on('click', reloadTab);
uDom('#compactViewToggler').on('click', toggleCompactView);
uDom('#clean').on('click', cleanBuffer);
uDom('#clear').on('click', clearBuffer);

Loading…
Cancel
Save