mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-07-22 20:26:50 +00:00
version 2 - beta
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
async function connection(hostname) {
|
||||
const isConnected = await chrome.storage.local.get([hostname]);
|
||||
let connected = false
|
||||
@@ -48,6 +49,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
||||
}
|
||||
});
|
||||
} else if (type === 'REQUEST_CONNECTION') {
|
||||
console.log('REQUEST_CONNECTION')
|
||||
const hostname = window.location.hostname
|
||||
chrome.runtime.sendMessage({ action: "connection", payload: {
|
||||
hostname
|
||||
@@ -122,7 +124,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
||||
}
|
||||
});
|
||||
} else if(type === 'REQUEST_LTC_BALANCE'){
|
||||
|
||||
|
||||
|
||||
const hostname = window.location.hostname
|
||||
const res = await connection(hostname)
|
||||
@@ -137,6 +139,7 @@ document.addEventListener('qortalExtensionRequests', async (event) => {
|
||||
chrome.runtime.sendMessage({ action: "ltcBalance", payload: {
|
||||
hostname
|
||||
}, timeout }, (response) => {
|
||||
|
||||
if (response.error) {
|
||||
document.dispatchEvent(new CustomEvent('qortalExtensionResponses', {
|
||||
detail: { type: "LTC_BALANCE", data: {
|
||||
|
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"action": {
|
||||
},
|
||||
"permissions": [ "storage", "system.display", "activeTab", "tabs"
|
||||
"permissions": [ "storage", "system.display", "activeTab", "tabs", "notifications", "alarms"
|
||||
],
|
||||
|
||||
"content_scripts": [
|
||||
@@ -24,6 +24,6 @@
|
||||
}
|
||||
],
|
||||
"content_security_policy": {
|
||||
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'; connect-src 'self' https://api.qortal.org https://api2.qortal.org https://appnode.qortal.org https://apinode.qortalnodes.live https://apinode1.qortalnodes.live https://apinode2.qortalnodes.live https://apinode3.qortalnodes.live https://apinode4.qortalnodes.live;"
|
||||
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'; connect-src 'self' https://api.qortal.org https://api2.qortal.org https://appnode.qortal.org https://apinode.qortalnodes.live https://apinode1.qortalnodes.live https://apinode2.qortalnodes.live https://apinode3.qortalnodes.live https://apinode4.qortalnodes.live https://ext-node.qortal.link wss://appnode.qortal.org wss://ext-node.qortal.link ws://127.0.0.1:12391 http://127.0.0.1:12391 https://ext-node.qortal.link; "
|
||||
}
|
||||
}
|
||||
|
BIN
public/msg-not1.wav
Normal file
BIN
public/msg-not1.wav
Normal file
Binary file not shown.
Reference in New Issue
Block a user