But yes the AddExtension method takes two required parameters and one optional. The name of the extension, a function that will be invoked on initialization/updates refered to as paint in the QV world. The last bool value defines if the extension should re-paint on updates.
The meaning of the assignment "_this = this", is to keep the pointer to the application QlikView and save a copy. Other frameworks like jQuery, JSON, ..., also use the "this" pointer, and if we carry script.js file, we would lose the reference to our QlikView application and could not read the data, call methods or change the properties of the QV API.