I'm building my first Chrome extension and I'm just trying to make it load a simple web page (ideally this web page would allow cookies. So, I'm thinking iframe is the best method)
For simplicity, let's say I wanted to load YouTube. Right now, I have a simple manifest.json that calls up my popup.html file. The code for the manifest is listed here:
{
"manifest_version": 2,
"name": "Getting started example",
"description": "This extension shows a Google Image search result for the current page",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab",
"https://ajax.googleapis.com/"
]
}
Here is the contents of my popup.html file:
<!doctype html>
<!--
This page is shown when the extension button is clicked, because the
"browser_action" field in manifest.json contains the "default_popup" key with
value "popup.html".
-->
<html><head>
<title>YouTube</title>
<link rel="stylesheet" href="styles.css">
</head>
<body id="body" style="height: 526px;">
<div id="toolbar" style="display: block;"><span id="options" class="icon"></span><span id="popup" class="icon"></span></div>
<iframe id="youtube" partition="persist:messenger4" height="500px" width="400px" frameborder="0" src="http://www.youtube.com"></iframe>
</body></html>
The problem is that this just opens up a white page (fit to the width and height I specified, but doesn't actually load the web page.
Can anybody give me some input as to what I'm doing wrong?