Created
          December 7, 2018 01:48 
        
      - 
      
- 
        Save hbt/d0017975ea1616d608b5428e7578951f to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // async windowCloseOtherWindows(_message, _sender, _sendResponse) { | |
| // const ctab = await chrome.tabs.get(_sender.tab.id) | |
| // var cwinId = ctab.windowId | |
| // var ws = await chrome.windows.getAll() | |
| // for(let w of ws) { | |
| // if(w.id === cwinId) { | |
| // continue; | |
| // } | |
| // const pinnedTabs = await chrome.tabs.query({ | |
| // pinned: true, | |
| // windowId: w.id | |
| // }) | |
| // if(pinnedTabs.length === 0) { | |
| // await chrome.windows.remove(w.id) | |
| // } | |
| // } | |
| // } | |
| (async () => { | |
| // var ws = await chrome.windows.getAll() | |
| // chrome.windows.getAll() | |
| // var tabs = await chrome.tabs.query({pinned: false}) | |
| // chrome.windows.getAll({}, function(ws) { | |
| // console.log(ws) | |
| // }) | |
| // console.log(ws, tabs) | |
| })(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment