The method to change the view has been changed (a little bit) and the script is loaded whenever the view is called, before this, the routine call to clear function (clear).
This function must be set by the views is called and after the called, it is set to empty function