I\'m new to chrome extensions.
I would like to create a simple chrome extension that popup an alert with the title of the current html page.
when I\'m performing: ale
Content scripts are the easiest way to go:
Expand your manifest file with this code:
...
"content_scripts": [
{
"matches": ["http://urlhere/*"],
"js": ["contentscript.js"]
}
],
...
Content script (automatically executed on each page as mentioned at matches
at the manifest file):
alert(document.title)
The advantage of using content scripts over chrome.extension.*
methods is that your extension doesn't require scary permissions, such as tabs
.