Here is what I have now in a background script:
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
if (tab.url.indexOf("developer.apple.com/reference") != -1 && tab.url.indexOf("?language=objc") == -1) {
var objcURL = tab.url + "?language=objc";
history.back();
}
});
I am entering the if
block properly, but history.back()
doesn't appear to do anything. I've tried history.go(-1)
, and I am positive that I have "history" set in the permissions of my manifest
Is this not possible to do from a background script in a chrome extension?