diff --git a/_i18n/en/_posts/2017-01-31-TheDosandDonts.md b/_i18n/en/_posts/2017-01-31-TheDosandDonts.md
index ca7536c..c0ecd60 100644
--- a/_i18n/en/_posts/2017-01-31-TheDosandDonts.md
+++ b/_i18n/en/_posts/2017-01-31-TheDosandDonts.md
@@ -2,7 +2,7 @@
author: tungfa
layout: post
image: TheDosandDonts.jpg
-title: The Dos and Don'ts of Pushing Crypto: Evangelist John Bush
+title: "The Dos and Don'ts of Pushing Crypto: Evangelist John Bush"
---
While Bitcoin value and use continue to grow year after year, cryptocurrency is still a far cry from total main street adoption.
diff --git a/_i18n/en/_posts/2017-01-31-ryan-video.md b/_i18n/en/_posts/2017-01-31-ryan-video.md
index fff7d50..30797a2 100644
--- a/_i18n/en/_posts/2017-01-31-ryan-video.md
+++ b/_i18n/en/_posts/2017-01-31-ryan-video.md
@@ -2,6 +2,6 @@
author: tungfa
layout: post
image:
-title: Future of DASH Cryptocurrency : Ryan Taylor (Director of Finance)
+title: "Future of DASH Cryptocurrency : Ryan Taylor (Director of Finance)"
---
diff --git a/_i18n/en/_posts/2017-02-01-copay.md b/_i18n/en/_posts/2017-02-01-copay.md
index 54cc377..d49fcc5 100644
--- a/_i18n/en/_posts/2017-02-01-copay.md
+++ b/_i18n/en/_posts/2017-02-01-copay.md
@@ -2,7 +2,7 @@
author: tungfa
layout: post
image: CoPayWalletcopy.jpg
-title: Copay-Dash Wallet (Testnet Only / RC 0.1)
+title: "Copay-Dash Wallet (Testnet Only / RC 0.1)"
---
I’m happy to announce a “Release Candidate” version of Copay-Dash, a variant of the Copay wallet which was originally developed by Bitpay.
diff --git a/_i18n/pt/_posts/2017-02-01-copaypt.md b/_i18n/pt/_posts/2017-02-01-copaypt.md
index 45db634..fcbe7ba 100644
--- a/_i18n/pt/_posts/2017-02-01-copaypt.md
+++ b/_i18n/pt/_posts/2017-02-01-copaypt.md
@@ -2,7 +2,7 @@
author: tungfa
layout: post
image: CoPayWalletcopy.jpg
-title: Copay-Dash Wallet (Testnet só / RC 0.1)
+title: "Copay-Dash Wallet (Testnet só / RC 0.1)"
---
Estou feliz em anunciar uma versão “Release Candidate” da Copay-Dash, uma carteira Copay que foi desenvolvida pela Bitpay.
Além das características habituais de outras carteiras, este aplicativo com todas as características possui:
diff --git a/src/js/get-dash.js b/src/js/get-dash.js
index f96b71f..82e5e58 100644
--- a/src/js/get-dash.js
+++ b/src/js/get-dash.js
@@ -5,6 +5,11 @@
;(function ($) {
'use strict';
+ var _ = window._ || null,
+ walletsCollectionByOs = window.walletsCollectionByOs || undefined,
+ platform = window.platform || undefined
+ ;
+
$(document).ready(function () {
if (typeof(walletsCollectionByOs) !== 'undefined' && walletsCollectionByOs) {
initDownloadButton();
@@ -12,12 +17,12 @@
});
function getBestWalletMatch() {
- var _walletsCollection = _.flatten(walletsCollectionByOs.map(function (walletGroupCollection){
+ var _walletsCollection = _.flatten(walletsCollectionByOs.map(function (walletGroupCollection) {
return walletGroupCollection.items;
})),
- _family = platform.os.family,
+ _family = platform && platform.os && platform.os.family,
_vendor = 'dash_core',
- _product_id = null,
+ _productId = null,
_walletOs = 'win32',
_type = 'desktop',
detectedWallet = {}
@@ -40,47 +45,49 @@
_type = 'desktop';
break;
case /^ios/gi.test(_family):
- _walletOs = 'ios'
+ _walletOs = 'ios';
_vendor = '';
_type = '';
break;
case /(linux|centos|debian|fedora|freebsd|gentoo|haiku|kubuntu|openbsd|red hat|suse|ubuntu|cygwin)/gi.test(_family):
_walletOs = 'linux';
- _product_id = platform.os.architecture === 32 ? 'dash_core_linux_32' : 'dash_core_linux_64';
+ _productId = platform.os.architecture === 32 ? 'dash_core_linux_32' : 'dash_core_linux_64';
_vendor = 'dash_core';
_type = 'desktop';
break;
default:
+
// do nothing;
break;
}
- if ( _product_id ) {
- detectedWallet = _.find(_walletsCollection,{product_id:_product_id});
+ if (_productId) {
+ detectedWallet = _.find(_walletsCollection,{ product_id: _productId});
} else {
- detectedWallet = _.find(_walletsCollection,{os:_walletOs,vendor_id:_vendor,type:_type});
+ detectedWallet = _.find(_walletsCollection,{ os: _walletOs, vendor_id: _vendor, type: _type});
}
- console.info('detectedWallet: ' , detectedWallet, {os:_walletOs,vendor_id:_vendor,type:_type});
+ console.info('detectedWallet: ' , detectedWallet, { os: _walletOs, vendor_id: _vendor, type: _type});
return detectedWallet;
}
- function onDownloadClick (event) {
+ function onDownloadClick(event) {
var _dlButton = $(event.target),
- _linkTo = _dlButton.data('detectedWallet').links[0].url;
+ _linkTo = _dlButton.data('detectedWallet').links[0].url
;
- window.open(_linkTo,"_blank");
+
+ window.open(_linkTo,'_blank');
}
- function initDownloadButton(){
+ function initDownloadButton() {
var _downloadButton = $('#download-detected-platform-button'),
_detectedWallet = getBestWalletMatch(),
- _notDetectedMessage = $('#platform-not-detected');
+ _notDetectedMessage = $('#platform-not-detected')
;
if (_downloadButton && _downloadButton.length > 0) {
- if (_detectedWallet) {
- _downloadButton.html(_detectedWallet.links[0].label+': '+_detectedWallet.name)
+ if (_detectedWallet && platform) {
+ _downloadButton.html(_detectedWallet.links[0].label + ': ' + _detectedWallet.name)
.attr({
title: platform.os.toString()
})
diff --git a/src/js/platform.js b/src/js/platform.js
index f3a3f28..a151823 100644
--- a/src/js/platform.js
+++ b/src/js/platform.js
@@ -1,3 +1,5 @@
+/* eslint-disable */
+
/*!
* Platform.js
* Copyright 2014-2016 Benjamin Tan