티스토리 뷰

공부

[Chrome] active tab execute command

승가비 2020. 5. 14. 02:23
728x90
chrome.tabs.getSelected(null, function(tab) {
  var code = 'window.location.reload();';
  chrome.tabs.executeScript(tab.id, {code: code});
});

https://stackoverflow.com/questions/8342756/chrome-extension-api-for-refreshing-the-page

 

chrome extension API for refreshing the page

Is there an API to programmatically refresh the current tab from inside a browser action button? I have background page configured, which attaches a listener via: chrome.browserAction.onClicked.

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[JS] uniqBy array by Lodash  (0) 2020.05.17
[Spark] submit conf by tuning  (0) 2020.05.14
[JS] scroll go to edge  (0) 2020.05.14
[HBase] Time to Live (TTL)  (0) 2020.05.14
[Hive] current_timestamp - INTERVAL '6' HOUR  (0) 2020.05.14
댓글