Are you sure you don't mean $(wconsole).onload(function(){...}
In any case failure is guaranteed since a reload smashes everything, including any scripts (but perhaps if Grease Monkey
has persistent scripts) and so any functions that were defined become redefined. Unless the reload redefines, anew, the functions that are needed, the game is lost.
Example:
javascript:
void(window.open("data:text/html,
<html>
<a href=\"javascript:alert('Here today ...');location=location.href;alert('gone ...');\">
reload </a> shows only 1 alert <br/>
(2nd may appear but disappears automatically once window has refreshed)<br/><br/>
as goes `alert` so do other `window` functions like `onload`<br/><br/><br/><br/>
<a href=\"javascript:alert('Now you see ...');self.close();alert('NOT!?');\">
choked or croaked?</a> only 1 alert is seen<br/>
</html>"))
Testing with:
window.navigator.userAgent =
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:11.0) Gecko/20100101 Firefox/11.0
ref:
Open a new browser window on close of current window if user confirms to close current window
Bookmark:
window.onload not firing when window is already open