You can try using the onunload event to hide the link when the window is closed only, 'hr1' is your link id on the opener page :
On your popped up page
function CloseOpener(){
window.opener.document.getElementById('hr1').style.display='none';
}
And then on the same popped up page:
<body onunload="CloseOpener();"> </body>
Or using a separate button on the same page to trigger the closing:
<input id="Button1" type="button" value="button" onclick="CloseOpener();"/>
I have tested this and it works on my installed browsers but still there are some considerations to make while using this event, you can have an insight on it here: onunload not working in Chrome and safari