diff options
Diffstat (limited to 'background.js')
| -rw-r--r-- | background.js | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/background.js b/background.js index 7510556..c898d8c 100644 --- a/background.js +++ b/background.js @@ -23,9 +23,13 @@ if (chrome) {  browser.runtime.onMessage.addListener(function(message) {  	browser.webNavigation.onCompleted.addListener(function(details) { -		browser.tabs.insertCSS( -			details.tabId, -			{ file: '/css/' + message.domain + '.css' } -		); +		var url = new URL(details.url); + +		if (url.hostname === message.domain) { +			browser.tabs.insertCSS( +				details.tabId, +				{ file: '/css/' + message.domain + '.css' } +			); +		}  	});  }); | 
