Reuse existing viewer window

Don't use the script as it is for the opposite of that.

Instead, turn on Preferences / Viewer / Behavior / Reuse existing viewer window and double-click as before.

(Or use the preview pane instead of the viewer, as that's designed to show the currently selected file in the lister.)