Skip to content
Snippets Groups Projects
Commit b1f97a46 authored by Craig Earley's avatar Craig Earley
Browse files

abstracted the URL comparison

parent 859f186d
No related merge requests found
var stop_url = "https://www.google.com/";
chrome.tabs.query({'active': true, 'lastFocusedWindow': true}, function (tabs) {
var url = tabs[0].url;
if (url == "https://www.google.com/"){
document.writeln("Google!");
}
else {document.writeln("not google!");}
var url = tabs[0].url;
if (url == stop_url){
document.writeln("welcome to the stop url!");
}
else {document.writeln("not there yet, keep going");}
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment