Have a look at my code above, it should work (in the masterPage.js) even if it’s marked as an error in the editor.