Thanks.hooks.php says
/** * Handler for FlowAddModules. Inserts javascript to enhance thank * links from static urls to in-page dialogs along with reloading * the previously thanked state.
but in gerrit 146169 the function was changed to onBeforePageDisplay() and it runs on the generic BeforePageDisplay hook. So fix the comment to describe how it currently works (easy).
If the code is intended to hook into FlowAddModules then add that as a @todo in the comment and keep this bug open. FlowAddModules might be slightly more performant (it wouldn't run on every page load) but presumably there's a reason @EBernhardson made the change :)