Skip to content

Instantly share code, notes, and snippets.

@forresty
Created September 12, 2010 16:17
Show Gist options
  • Save forresty/576214 to your computer and use it in GitHub Desktop.
Save forresty/576214 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script>
function checkForHttpAccessToGoogleReader(tabId, changeInfo, tab) {
var httpUrl = 'http://www.google.com/reader';
var httpsUrl = 'https://www.google.com/reader';
if (0 === tab.url.indexOf(httpUrl)) {
chrome.tabs.update(tab.id, {url: tab.url.replace(httpUrl, httpsUrl)});
}
};
chrome.tabs.onUpdated.addListener(checkForHttpAccessToGoogleReader);
</script>
</head>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment