I'm trying to write a chrome extension to help get myself back to work (and hopefully friends too). For now, the goal is when users go to Facebook, they're redirected to a webpage that I'll make which will have a message "get back to work".
I've managed as far as setting it up, just can't manage to find the js code to redirect.
manifest.json
{
"manifest_version": 2,
"name": "Get Back to Work",
"description": "GET BACK TO WORK!",
"version": "0.1",
"content_scripts": [
{
"matches": [
"*://facebook.com/*", "*://www.facebook.com/*"
],
"js": ["content.js"]
}
],
"browser_action": {
"default_icon": "icon.png"
}
}
content.js:
alert("this works");
//code here
Any suggestions?