Hello,
Being interested in the new safari extension's i'm trying to write my own little tool to help productivity. All i'm trying to do is get the current page URL and having a heck of a time.
THe plugin is running just fine but not outputting the right information. Here the plugin code:
The code seems to be outputting the URL of the plugin.
ANy idea? Thanks
Being interested in the new safari extension's i'm trying to write my own little tool to help productivity. All i'm trying to do is get the current page URL and having a heck of a time.
THe plugin is running just fine but not outputting the right information. Here the plugin code:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
<script type="text/javascript" charset="utf-8">
function performCommand(event)
{
if (event.command === "sayHello") {
alert(location.href);
}
}
// if event handlers are in the global HTML page,
// register with application:
safari.application.addEventListener("command", performCommand, true);
safari.application.addEventListener("validate", validateCommand, true);
</script>
</head>
<body>
</body>
</html>
The code seems to be outputting the URL of the plugin.
ANy idea? Thanks