In your case you might use only this part of the code:
<override_macro name="macro_viewer_page_link">
<a style="display:none;" href="[n.macro_viewer_page_path/]" rel="nofollow">Edit this page</a>
<n.visible_for_admins selector="td.footer-right a" />
</override_macro>