Closed simonrenoult closed 10 years ago
I am pretty sure there's a window.close()
call on Diaspora's bookmarklet page. The window.close()
function is only allowed if the window was opened by a script, but not necessarily the same script or even in the same server. From MDN, "Scripts may not close windows that were not opened by script."
So, my sharing button code has a window.open()
call, that allows Diaspora's bookmarklet to close itself, and I think that's it.
Hi,
I would like to know how the Diaspora sharer > Sharing buttons works, especially this snippet :
Basically, I'm working on my own sharer but I can't figure out how a popup can close itself. The workflow is supposed to be like this I guess :
Steps 1 to 6 are straight forward but I can't figure out how to process 7, since the script in the popup has not created the popup, it won't be allowed to close it (as stated in the documentation).
How and where did you do that ? Any help would be greatly appreciated!