refreshAllTabs should always try to refresh the main page
This commit is contained in:
		
							parent
							
								
									2fe4c0793c
								
							
						
					
					
						commit
						e41dda1b68
					
				| 
						 | 
				
			
			@ -291,7 +291,8 @@ function importFromString(jsonString) {
 | 
			
		|||
  function refreshTab(tab, ownTab, resolve) {
 | 
			
		||||
    const tabId = tab.id;
 | 
			
		||||
    chrome.webNavigation.getAllFrames({tabId}, frames => {
 | 
			
		||||
      (frames || []).forEach(({frameId}) =>
 | 
			
		||||
      frames = frames && frames[0] ? frames : [{frameId: 0}];
 | 
			
		||||
      frames.forEach(({frameId}) =>
 | 
			
		||||
        getStylesSafe({matchUrl: tab.url, enabled: true, asHash: true}).then(styles => {
 | 
			
		||||
          const message = {method: 'styleReplaceAll', tabId, frameId, styles};
 | 
			
		||||
          if (tab.id === ownTab.id) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -118,7 +118,8 @@ var hotkeys = (() => {
 | 
			
		|||
 | 
			
		||||
  function refreshTab(tab) {
 | 
			
		||||
    const tabId = tab.id;
 | 
			
		||||
    chrome.webNavigation.getAllFrames({tabId}, frames => !frames && ignoreChromeError() ||
 | 
			
		||||
    chrome.webNavigation.getAllFrames({tabId}, frames => {
 | 
			
		||||
      frames = frames && frames[0] ? frames : [{frameId: 0}];
 | 
			
		||||
      frames.forEach(({frameId}) =>
 | 
			
		||||
        getStylesSafe({matchUrl: tab.url, enabled: true, asHash: true}).then(styles => {
 | 
			
		||||
          const message = {method: 'styleReplaceAll', tabId, frameId, styles};
 | 
			
		||||
| 
						 | 
				
			
			@ -126,7 +127,9 @@ var hotkeys = (() => {
 | 
			
		|||
          if (frameId === 0) {
 | 
			
		||||
            setTimeout(BG.updateIcon, 0, tab, styles);
 | 
			
		||||
          }
 | 
			
		||||
        })));
 | 
			
		||||
        }));
 | 
			
		||||
      ignoreChromeError();
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function initHotkeyInfo() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user