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

initial extension commit, checks url and changes popup text if visiting https://www.google.com

parent 11f66c9f
No related merge requests found
body {
font-family: "Segoe UI", "Lucida Grande", Tahoma, sans-serif;
font-size: 100%;
}
#status {
/* avoid an excessively wide status text */
white-space: pre;
text-overflow: ellipsis;
overflow: hidden;
max-width: 400px;
}
extension/images/icon.png

1001 B

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!");}
});
{
"manifest_version": 2,
"name": "Hello World!",
"version": "1.0",
"description": "My first Chrome extension.",
"icons": {"16":"images/icon.png"},
"browser_action": {
"default_icon": "images/icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab",
"https://ajax.googleapis.com/"
],
"homepage_url": "http://cluster.earlham.edu/~cjearley13/craig1617/user.html"
}
<!doctype html>
<html>
<head>
<title>Getting Started Extension's Popup</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script src="js/check.js"></script>
</head>
<body>
<div id="status"></div>
<img id="image-result" hidden>
</body>
</html>
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