Skip to content

Commit

Permalink
fix popup (#72)
Browse files Browse the repository at this point in the history
* options => popup

* update

* update
  • Loading branch information
extabr committed Aug 1, 2022
1 parent f3f6133 commit ce08c96
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 29 deletions.
8 changes: 4 additions & 4 deletions src/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"manifest_version": 2,
"name": "IC naming extensions",
"description": "Extensions to help you visit icnaming from you browser",
"version": "2.0.3",
"options_page": "options.html",
"browser_action": {
"default_icon": "icon.png"
"version": "2.0.4",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"background": {
"page": "background.html",
Expand Down
15 changes: 0 additions & 15 deletions src/public/options.html

This file was deleted.

8 changes: 5 additions & 3 deletions src/public/popup.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ICNAMING</title>
<script src="js/vendor.js"></script>
<link href="/icon.png" rel="apple-touch-icon" sizes="180x180">
<link href="/icon.png" rel="icon" sizes="32x32" type="image/png">
<link href="/icon.png" rel="icon" sizes="16x16" type="image/png">
</head>

<body>
<div id="root"></div>
<script src="js/popup.js"></script>
</body>
</html>

12 changes: 6 additions & 6 deletions src/src/options.tsx → src/src/popup.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from "react";
import ReactDOM from "react-dom";

const Options = () => {
const Popup = () => {
const wrapStyle = {
width:"425px",
BoxSizing: "border-box",
BoxSizing: "border-box",
margin:"0 auto",
padding: "1rem"
}
Expand All @@ -25,17 +25,17 @@ const Options = () => {
<strong>The gate of decentralized web</strong>
<div style={fontStyle}>This extension opens websites on the blockchain</div>
<div style={{textAlign: "right",marginTop: "1rem"}}>
<a style={fontStyle} href="https://app.icnaming.com/">Register a decentralized name of your own</a>
<a style={fontStyle} href="https://app.icnaming.com/" target="_blank">Register a decentralized name of your own</a>
</div>
</div>
</div>
</div>
);
};

ReactDOM.render(
<React.StrictMode>
<Options/>
<Popup/>
</React.StrictMode>,
document.getElementById("root")
document.getElementById("root"),
);

2 changes: 1 addition & 1 deletion src/webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
entry: {
// popup: path.join(srcDir, 'popup.tsx'),
redirect: path.join(srcDir, 'redirect.tsx'),
options: path.join(srcDir, 'options.tsx'),
popup: path.join(srcDir, 'popup.tsx'),
background: path.join(srcDir, 'background.ts'),
content_script: path.join(srcDir, 'content_script.tsx'),
},
Expand Down

0 comments on commit ce08c96

Please sign in to comment.