From ce08c9687fbce194705a77e44d8a4c58ce74c1b4 Mon Sep 17 00:00:00 2001
From: extabr <104433129+extabr@users.noreply.github.com>
Date: Mon, 1 Aug 2022 18:05:47 +0800
Subject: [PATCH] fix popup (#72)
* options => popup
* update
* update
---
src/public/manifest.json | 8 ++++----
src/public/options.html | 15 ---------------
src/public/popup.html | 8 +++++---
src/src/{options.tsx => popup.tsx} | 12 ++++++------
src/webpack/webpack.common.js | 2 +-
5 files changed, 16 insertions(+), 29 deletions(-)
delete mode 100644 src/public/options.html
rename src/src/{options.tsx => popup.tsx} (84%)
diff --git a/src/public/manifest.json b/src/public/manifest.json
index 8356f8f..50c7874 100644
--- a/src/public/manifest.json
+++ b/src/public/manifest.json
@@ -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",
diff --git a/src/public/options.html b/src/public/options.html
deleted file mode 100644
index 2e2e7f7..0000000
--- a/src/public/options.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- ICNAMING
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/public/popup.html b/src/public/popup.html
index d5dfbff..f2256dc 100644
--- a/src/public/popup.html
+++ b/src/public/popup.html
@@ -1,13 +1,15 @@
-
+
-
ICNAMING
+
+
+
+
-
diff --git a/src/src/options.tsx b/src/src/popup.tsx
similarity index 84%
rename from src/src/options.tsx
rename to src/src/popup.tsx
index de16f80..5ae52c7 100644
--- a/src/src/options.tsx
+++ b/src/src/popup.tsx
@@ -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"
}
@@ -25,17 +25,17 @@ const Options = () => {
The gate of decentralized web
This extension opens websites on the blockchain
);
};
-
ReactDOM.render(
-
+
,
- document.getElementById("root")
+ document.getElementById("root"),
);
+
diff --git a/src/webpack/webpack.common.js b/src/webpack/webpack.common.js
index fa98013..2d4d333 100644
--- a/src/webpack/webpack.common.js
+++ b/src/webpack/webpack.common.js
@@ -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'),
},