Better belongsto check when different subdomain

This commit is contained in:
Ruud
2012-02-05 15:05:33 +01:00
parent b9e1a2ff3e
commit db73447b1a
@@ -32,8 +32,9 @@ class UserscriptBase(Plugin):
def belongsTo(self, url):
host = urlparse(url).hostname
if host.startswith('www.'):
host = host[4:]
host_split = host.split('.')
if len(host_split) > 2:
host = host[len(host_split[0]):]
for include in self.includes:
if host in include: