(1) Stupid question
After fixing your bug with those additional brackets, did you reload the page without caching?
Does the error "Uncaught ReferenceError: AppGiniTableViewBackgroundChanger" still occur after reloading the page in the browser without cache?
(2) Another question
If javascript cannot find the function named
AppGiniTableViewBackgroundChanger
and if there is no other error messsage, maybe your code in header-extras.php was not included. So, are you sure both file are in hooks-subdirectory:
- hooks/header-extras.php
- hooks/TEST-tv.js