javascript - Chrome extension to reload page on load error -
because it isn't possible utilize greasemonkey this, want write chrome extension reload page if failed load.
i know how write chrome extension, i've injected scripts , figured out how communicate pages, have basic knowledge of how tabs work , how build manifest.
what events looking , how can create work both , post requests?
use chrome.webnavigation.onerroroccurred
or chrome.webrequest.onerroroccurred
observe navigation errors. these apis cannot used in content script, have add together background page or event page extension.
i recommend utilize webnavigation
api because these can used event pages (unlike webrequest
api). here example, utilize chrome.tabs.reload
instead of chrome.tabs.update
want.
javascript google-chrome google-chrome-extension
No comments:
Post a Comment