I am developing a google chrome extension.I want the extension to record whenever a webiste is loaded or the URL in the tab changed.
I have written the following javascript code to show a dialog box whenever a tab is updated but for some reason It gives Uncaught Syntaxerror:Unexpected Identifier.
Here is the code
<html>
<head>
<script>
chrome.tabs.onUpdated.addListener(function(integer tabId, object changeInfo, Tab tab)
{
//if(tab.url!="")
alert(tab.url);
});
</script>
</head>
<body>
</body>
</html>
Please help.I am really not able to find a solution.
Javascript is not strictly typed, so try remove the
integer,objectandTab:That should do the trick.