I've created a bookmarklet some time ago and now i am trying to add the ability to login.
The way i do it. is if the user currently isn't logged in and clicked on the bookmarklet a popup window opens with the url of my login page.
my idea was once a user logged in i will echo a javascript script tags. within the script there is a call to function that is defined in the bookmarklet.
I echo this in the popup once a user is logged.
if(logged){
echo '
<script type="text/javascript">
window.opener.updateLoginBookMarklet(true);
window.close();
</script>
';
exit;
}
This is the function that's defined in the bookmarklet:
window.updateLoginBookMarklet = function(status){
LoggedIn = status;
}
however its seems that i get Error: Permission denied to access property "updateLoginBookMarklet"
It might be due to cross domain issue i am not sure.
anyone has a clue ? is there a way around it ?