Skip to content
Permalink
Browse files

firefox compatibility v0.3.0

  • Loading branch information...
loon3 committed Jun 29, 2019
1 parent af00950 commit 2d32c8216e4f845c2e9b53c5a62c2bfd9453f453
@@ -1,3 +1,15 @@
function getBrowser() {
if (typeof chrome !== "undefined") {
if (typeof browser !== "undefined") {
return browser;
} else {
return chrome;
}
}
}

var thisBrowser = getBrowser()

var bitcoinjs = require('bitcoinjs-lib')
var bitcoinMessage = require('bitcoinjs-message')

@@ -165,7 +165,7 @@ function pageCollectInventoryXchain(address, data){

collectionEntry = ""
collectionEntry += "<div class='col-sm-6 col-md-4 col-lg-3 col-xl-2 collection-item-asset' style='padding: 20px 0 16px 0' data-assetname='"+cardName+"' data-assetimage='"+cardImage+"' data-divisible='"+cardDivisible+"' data-quantity='"+cardQty+"' data-description='"+cardDescription+"' data-alias='"+cardAlias+"'>"
collectionEntry += "<div align='center' style='margin: auto;'><div class='lozad collection-asset-images' data-background-image='"+cardImage+"' style='display: inline-block; width: 120px; height: 120px; background-size: contain; background-repeat: no-repeat; background-position: center bottom; margin-bottom: 8px;'></div>"
collectionEntry += "<div align='center' style='margin: auto;'><div class='lozad collection-asset-images' data-background-image='"+cardImage+"' style='width: 120px; height: 120px; background-size: contain; background-repeat: no-repeat; background-position: center bottom; margin-bottom: 8px;'></div>"
collectionEntry += "<div class='inventory-asset-name' style='font-weight: bold; padding: 0 8px 0 8px;'>"+display_name+"</div>"
collectionEntry += "<div class='inventory-asset-qty' style='font-size: 11pt; color: #FFEB70;'>x"+cardQty+"</div>"
collectionEntry += "</div></div>"
@@ -49,7 +49,7 @@ function decryptPassphrase(passphrase_encrypted, password)
function checkPassphrase()
{

chrome.storage.local.get(['passphrase'], function(result) {
thisBrowser.storage.local.get(['passphrase'], function(result) {

if(!result.passphrase){

@@ -114,7 +114,7 @@ function checkPassphrase()
var password_check = dialogItself.getModalBody().find("#password-second").val();
if(password.length > 0 && password == password_check){
var passphrase_encrypted = encryptPassphrase(mnemonic, password)
chrome.storage.local.set({passphrase: passphrase_encrypted}, function() {
thisBrowser.storage.local.set({passphrase: passphrase_encrypted.toString()}, function() {
initInventory(mnemonic)
dialogItself.close()
});
@@ -160,14 +160,14 @@ function unlockInventory(){
var password = dialogItself.getModalBody().find('input').val()

if(password.length > 0){
chrome.storage.local.get(['passphrase'], function(result) {
thisBrowser.storage.local.get(['passphrase'], function(result) {
if(result.passphrase){
var passphrase = localStorage.getItem("mnemonic")

var passphrase_decrypted = decryptPassphrase(result.passphrase, password)

if(passphrase_decrypted.status == "success"){
chrome.storage.local.get(['address'], function(result) {
thisBrowser.storage.local.get(['address'], function(result) {
//console.log(result)
if(!result.address){
initInventory(passphrase_decrypted.passphrase)
@@ -241,7 +241,7 @@ function initInventory(passphrase, address){
}
})

chrome.storage.local.set({'address': address}, function() {
thisBrowser.storage.local.set({'address': address}, function() {

$(".jumbotron-tab-container").addClass("hide")
$(".jumbotron-tab-container-content").addClass("hide")
@@ -5,6 +5,7 @@

$( document ).ready(function() {


$(".jumbotron-tab-container").addClass("hide")

checkPassphrase()
@@ -326,6 +327,8 @@ console.log(feetype)

})



function gotoTab(tabTitle){
$("#leftbar-container").html("")
$("#buttonsplash").addClass("hide")
@@ -27,5 +27,5 @@
"manifest_version": 2,
"name": "Freeport",
"short_name": "freeport",
"version": "0.2.9"
"version": "0.3.0"
}
@@ -36,3 +36,5 @@ v0.2.7 - UX improvement, update Twitter link method
v0.2.8 - Fix lock divisible asset bug

v0.2.9 - Add priority and economy fee estimates

v0.3.0 - Firefox compatibility

0 comments on commit 2d32c82

Please sign in to comment.
You can’t perform that action at this time.