Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
PhyrexTsai committed Jun 5, 2018
1 parent 54545b3 commit b68fd68
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/JSON/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Portal Network",
"description": "Portal Network Browser Extension",
"version": "0.2.0",
"version": "0.3.4",
"browser_action": {
"default_icon": "res/128x128.png",
"default_popup": "popup.html"
Expand All @@ -21,7 +21,7 @@
"*://*.eth/",
"*://*.etc/"
],
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"content_security_policy": "script-src 'self'; object-src 'self'",
"web_accessible_resources": [
"*"
]
Expand Down
6 changes: 3 additions & 3 deletions src/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ <h3>Follow Us</h3>
<a href="https://t.me/portalnetworkhq" target="_blank">Telegram</a>
</p>
<p>
<a href="https://twitter.com/PortalNetworkHQ" target="_blank">Twitter</a>
<a href="https://twitter.com/itisportal" target="_blank">Twitter</a>
</p>
<p>
<a href="https://www.facebook.com/portalofficial" target="_blank">Facebook</a>
<a href="https://www.facebook.com/portalnetworkofficial" target="_blank">Facebook</a>
</p>
<p>
<a href="http://blog.portal.network" target="_blank">Blog</a>
<a href="https://medium.com/portalnetworkofficial" target="_blank">Blog</a>
</p>
<p>
<a href="mailto:support@portal.network" target="_blank">support@portal.network</a>
Expand Down
4 changes: 2 additions & 2 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ extension.webRequest.onBeforeRequest.addListener(details => {
}, 60000);

resolver.resolve(name).then(ipfsHash => {
let url = "https://gateway.ipfs.io/ipfs/" + ipfsHash
let url = "https://ipfs.infura.io/ipfs/" + ipfsHash
return fetch(url, {method: "HEAD"})
.then(response => response.status)
.then(statusCode => {
if (statusCode !== 200) return "Local"
extension.tabs.update(tab.id, {url: url})
})
.catch(err => {
url = "https://gateway.ipfs.io/ipfs/" + ipfsHash
url = "https://ipfs.infura.io/ipfs/" + ipfsHash
extension.tabs.update(tab.id, {url: url})
return err
})
Expand Down
6 changes: 3 additions & 3 deletions src/js/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ function ens(name) {
buf = multihash.fromHexString(hex)
resolve(multihash.toB58String(multihash.encode(buf, 'sha2-256')))
} else {
reject('fisk')
reject(null)
}
})
})
}
function ecns(name) {
let web3 = new Web3(new Web3.providers.HttpProvider("https://mewapi.epool.io/"))
let web3 = new Web3(new Web3.providers.HttpProvider("https://etc-geth.0xinfra.com"))
let hash = namehash.hash(name)
Registrar = new web3.eth.Contract(abi.registrar, REGISTRAR_ECNS_MAIN_NET)
return new Promise((resolve, reject) => {
Expand All @@ -47,7 +47,7 @@ function ecns(name) {
buf = multihash.fromHexString(hex)
resolve(multihash.toB58String(multihash.encode(buf, 'sha2-256')))
} else {
reject('fisk')
reject(null)
}
})
})
Expand Down

0 comments on commit b68fd68

Please sign in to comment.