added detach listeners if extension switchOff or addEventListeners if extension switchOn