This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request('https://api.github.com/repos/ngudbhav/TriCo-electron-app/releases/latest', {headers: {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 '}}, function(error, html, body){ | |
if(!error){ | |
var v = app.getVersion().replace(' ', ''); | |
var latestV = JSON.parse(body).tag_name.replace('v', ''); | |
var changeLog = JSON.parse(body).body.replace('<strong>Changelog</strong>', 'Update available. Here are the changes:\n'); | |
if(latestV!=v){ | |
dialog.showMessageBox( | |
{ | |
type: 'info', | |
buttons:['Open Browser to download link', 'Close'], |