How to get Popup and onClick work together on Google Chrome Extension

Firstly, if you try to use a popup in your manifest.json and find out that your chrome broweraction onclick listener doesn't seems to work. You are in the right place then. And if you read properly on Google Chrome Extension API page, the following onclick will not work properly with popup if you have define it on your manifest.json file.