aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--background.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/background.js b/background.js
index 7a884a1..7553a30 100644
--- a/background.js
+++ b/background.js
@@ -35,7 +35,12 @@ browser.runtime.onMessage.addListener(function(message) {
});
-// function insert_css (hostname) {
+// Build a list of wildcard domains from the given hostname.
+//
+// Example:
+//
+// wildcard_domains('en.wikipedia.org');
+// => [ '*', '*.org', '*.wikipedia.org', 'en.wikipedia.org' ]
function wildcard_domains (hostname) {
var domain_parts = hostname.split('.');
var domains = [];