Discuss Scratch

EpicTofu
Scratcher
2 posts

Chrome Extension help

Hello, I've just recently started developing extensions for chrome so I'm quite new to this, I have a fair bit of knowledge on HTML and CSS. So I was wondering, how do you import an image onto an extension and attatch a link to it, I've looked everywhere, I just want a simple line(s) of code,I don't want anything fancy I just want an image with a link attached to it so when I click the image it will lead me to a website.

Here's my code

//popup.html
<!doctype html>
<html>

<Style>
body {
min-width: 420px;
max-width: 100%;
position: relative;
vertical-align:middle;
}
h1 {
text-align: center;
font-family: verdana;
}
</Style>
<head>
<title>Free Money</title>
<script src=“popup.js”></script>
</head>
<body>
<h1> The Official Free Money Chrome Extension </h1>
<br />
<img src=“C:\EpicTofu\Projects\Web development\Chrome Extenstions\img.png” style=“height:200px;width:100px;float:left”>
</body>
</html>


//Manifest.JSON
{
“manifest_version”: 2,

“name”: “Chrome Extension”,
“description”: ;3;“,
”version“: ”0.0.2“,

”browser_action“: {
”default_icon“: ”icon.png“,
”default_popup“: ”popup.html“
},
”permissions“: [
”activeTab"
]
}
DrKat1337
New Scratcher
22 posts

Chrome Extension help

EpicTofu wrote:

Hello, I've just recently started developing extensions for chrome so I'm quite new to this, I have a fair bit of knowledge on HTML and CSS. So I was wondering, how do you import an image onto an extension and attatch a link to it, I've looked everywhere, I just want a simple line(s) of code,I don't want anything fancy I just want an image with a link attached to it so when I click the image it will lead me to a website.

Here's my code
<!--popup.html-->
<!doctype html>
<html>
	<Style>
		body {
			min-width: 420px;
			max-width: 100%;
			position: relative;
			vertical-align:middle;
		}
		h1 {
			text-align: center;
			font-family: verdana;
		}
	</Style>
  <head>
    <title>Free Money</title>
    <script src="popup.js"></script>
  </head>
  <body>
	<h1> The Official Free Money Chrome Extension </h1>
	<br />
	<img src="C:\EpicTofu\Projects\Web development\Chrome Extenstions\img.png" style="height:200px;width:100px;float:left">
  </body>
</html>
//Manifest.JSON
{
  "manifest_version": 2,
  "name": "Chrome Extension",
  "description": ;3;",
  "version": "0.0.2",
  
  "browser_action": {
    "default_icon": "icon.png",
    "default_popup": "popup.html"
  },
  "permissions": [
    "activeTab"
  ] 
}
Ftft

Powered by DjangoBB