index b1625eb..3da4217 100644
--- a/extension/manifest.json
+++ b/extension/manifest.json
@@ -12,6 +12,7 @@
         "js": [ "script.js" ],
         "matches": [
             "https://mail.google.com/mail/*",
+            "https://mail.google.com/a/*",
             "http://www.google.com/reader/*",
             "https://wave.google.com/wave/*",
             "http://www.netvibes.com/",
index 489eced..6fa4b16 100644
--- a/extension/script.js
+++ b/extension/script.js
@@ -57,6 +57,35 @@ function getSiteConfigs() { return [
     ]
 },
 
+{ // Hosted Gmail
+    "matches": [
+        new RegExp("^https://mail\\.google\\.com/a/(.*?)/")
+        ],
+    "poll": {
+        "frequency": 30000,
+        "method": "atom",
+        "atom_url": "https://mail.google.com/a/$1/feed/atom"
+        },
+    "icon": [
+        ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
+        ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
+        ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
+        ['#da3838', '#da3838', '#da3838', '#f28181', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f28181', '#da3838', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#da3838', '#da3838', '#ffb6b6', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffb6b6', '#da3838', '#da3838', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#f28181', '#e95a5a', '#da3838', '#ffb6b6', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffb6b6', '#da3838', '#e95a5a', '#f28181', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#ffffff', '#f28181', '#e95a5a', '#da3838', '#ffb6b6', '#ffffff', '#ffffff', '#ffb6b6', '#da3838', '#e95a5a', '#f28181', '#ffffff', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#ffffff', '#ffffff', '#f28181', '#e95a5a', '#da3838', '#ffb6b6', '#ffb6b6', '#da3838', '#e95a5a', '#f28181', '#ffffff', '#ffffff', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#ffffff', '#ffffff', '#ffb6b6', '#f28181', '#e95a5a', '#da3838', '#da3838', '#e95a5a', '#f28181', '#ffb6b6', '#ffffff', '#ffffff', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#ffffff', '#ffe2e2', '#f9a7a7', '#ffb6b6', '#f28181', '#e95a5a', '#e95a5a', '#f28181', '#ffb6b6', '#f9a7a7', '#ffe2e2', '#ffffff', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#ffe2e2', '#f9a7a7', '#ffe2e2', '#ffffff', '#ffffff', '#f28181', '#f28181', '#ffffff', '#ffffff', '#ffe2e2', '#f9a7a7', '#ffe2e2', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#f9a7a7', '#ffe2e2', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffe2e2', '#f9a7a7', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#ffe2e2', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffffff', '#ffe2e2', '#da3838', '#da3838'],
+        ['#da3838', '#da3838', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#f9a7a7', '#da3838', '#da3838'],
+        ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''],
+        ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
+    ]
+},
+
 { // Google Wave
     "matches": [
         "https://wave.google.com/wave"
@@ -249,7 +278,20 @@ function matchSite() {
     for (var i = 0; i < site_configs.length; i++) {
         var matches = site_configs[i]["matches"];
         for (var j = 0; j < matches.length; j++) {
-            if (document.location.href.search(matches[j]) >= 0) {
+            if (matches[j] instanceof RegExp) {
+                var g = matches[j].exec(document.location.href);
+                if (g) {
+                    var poll = site_configs[i]["poll"];
+                    var re = new RegExp(/\$(\d+)/);
+                    while (1) {
+                        var r = re.exec(poll.atom_url);
+                        if (!r)
+                            break;
+                        poll.atom_url = poll.atom_url.replace(re, g[r[1]]);
+                    }
+                    return site_configs[i];
+                }
+            } else if (matches[j] == document.location.href.substring(0, matches[j].length)) {
                 return site_configs[i];
             }
         }
