I have a unstable internet connection and would like to monitor the router log via a chrome extension. Since i am just starting with programming i decided to create a new tab browserAction calling a html page that simply contained a HTTP-EQUIV="REFRESH" pointing at my browser log. That way i wiggled out of the same origin policy. That since stopped working without a reason or error log entry i could start from. Could anybody give me some pointers as to how i could get this back working, improve this and or tell me how weird/wrong my approach is? :)
manifest.json:
{
"name": "Logview",
"version": "0.1",
"manifest_version": 2,
"description": "Logview Extension",
"browser_action": {
"default_icon": "icon.png",
"default_title": "Logview Extension"
},
"background": {
"page": "background.html"
},
"permissions": [
"tabs"
]
}
background.html
<html>
<head>
<script>
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.create({url: "redirect.html"});
});
</script>
</head>
</html>
redirect.html
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://user:pass@192.168.1.1/logview.cmd">
</head>
Please be gentle, its my first post here and i researched a ton of stuff before posting. The meta refresh was the only thing i could come up with that went around same origin hazards or public apis that i cannot use in the event of the router being down. All obvious errors were made out of inexperience rather than negligence. I just hit a wall with it just not doing anything anymore.
All the best, morph
edit: changed the title to ...new tab (was ...pop-up)