using esbuild now because it's easier to target specific files
This commit is contained in:
4
Shared (Extension)/Resources/.gitignore
vendored
4
Shared (Extension)/Resources/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
node_modules/
|
||||
*.build.js*
|
||||
.parcel-cache/
|
||||
dist/
|
||||
@@ -1,6 +1,7 @@
|
||||
import { generatePrivateKey } from "nostr-tools";
|
||||
|
||||
browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
console.log('generating a key!');
|
||||
console.log(generatePrivateKey());
|
||||
console.log("Received request: ", request);
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
let script = document.createElement('script');
|
||||
script.setAttribute('src', browser.runtime.getURL('nostr.js'));
|
||||
script.setAttribute('src', browser.runtime.getURL('nostr.build.js'));
|
||||
document.body.appendChild(script);
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
},
|
||||
|
||||
"background": {
|
||||
"service_worker": "dist/background.js"
|
||||
"service_worker": "background.build.js",
|
||||
"type": "module"
|
||||
},
|
||||
|
||||
"content_scripts": [{
|
||||
"js": [ "dist/content.js" ],
|
||||
"js": [ "content.build.js" ],
|
||||
"matches": [ "<all_urls>" ]
|
||||
}],
|
||||
|
||||
@@ -39,7 +40,7 @@
|
||||
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": ["dist/nostr.js"],
|
||||
"resources": ["nostr.build.js", "popup.build.js"],
|
||||
"matches": ["<all_urls>"]
|
||||
}
|
||||
]
|
||||
|
||||
2638
Shared (Extension)/Resources/package-lock.json
generated
2638
Shared (Extension)/Resources/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "nostore",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"source": [
|
||||
"background.js",
|
||||
"content.js",
|
||||
"nostr.js",
|
||||
"popup.js"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "parcel build",
|
||||
"watch": "parcel watch",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"nostr-tools": "^1.1.1",
|
||||
"parcel": "^2.8.2"
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ body {
|
||||
padding: 10px;
|
||||
|
||||
font-family: system-ui;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
@@ -6,11 +6,17 @@
|
||||
</head>
|
||||
<body>
|
||||
<form id="priv-key-form">
|
||||
<label for="profile">Profile</label>
|
||||
<select id="profile">
|
||||
<option value="Default">Default</option>
|
||||
<option value="Next">Next</option>
|
||||
</select>
|
||||
<br/>
|
||||
<label for="priv-key">Private Key</label>
|
||||
<input type="password" id="priv-key" name="priv-key" />
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
|
||||
<script src="popup.js"></script>
|
||||
<script src="popup.build.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user