I have made a Chrome extension that opens Windows calculator when I click on the browser action button. Now, I'm trying to start the extension on web page by click using JavaScript code.
<!doctype html>
<html>
<head><title>activity</title></head>
<body>
<button id="clickactivity" onclick="startextension()">click</button>
<script>
function startextension(){
//run/start the extension
}
</script>
</body>
</html>
This is my background.js code:
chrome.browserAction.onClicked.addListener(function(){
chrome.extension.connectNative('com.rivhit.calc_test');
});
Is there any way to do it?