I’m trying to create a Chrome extension that will reload touch.facebook.com every 10 minutes (I keep it in a narrow window next to Hootsuite). Here is my manifest.json file:
{
"name": "Facebook Reloader",
"version": "0.1",
"description": "Reload facebook every 10 minutes.",
"content_scripts": [
{
"matches": ["*://touch.facebook.com/*"],
"js": ["myscript.js"],
"run_at": "document_start"
}
],
"permissions": [ "http://touch.facebook.com/*", "https://touch.facebook.com/*", "tabs" ]
}
I really only want this to refresh “*://touch.facebook.com/#!/home.php*” instead of “*://touch.facebook.com/*” however I can’t figure out a way to make the wildcards work this way. It’s either a problem with the “#!” or a security issue with how Chrome allows wildcards in the path. I’ve also tried the include feature along with the matches feature, but no luck.
Any ideas?
Thanks,
B.
The problem is that those are not real pages. Facebook loads page content dynamically through javascript, so page is actually never reloaded when you switch between menus.
Just inject your content script to
*://touch.facebook.com/*and then manually check url hash before refreshing. Something like: