Skip to content

Commit

Permalink
Merge pull request #4 from yukihirai0505/patch-1
Browse files Browse the repository at this point in the history
Code quality improvements for scripteditor.js @yukihirai0505
  • Loading branch information
LesterCovax authored Dec 26, 2017
2 parents 8893319 + 5295779 commit c56800d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripteditor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var queryString = Math.random();

function getData() {
var queryString = Math.random();
var ss = SpreadsheetApp.getActiveSpreadsheet();

//
Expand Down Expand Up @@ -94,12 +95,11 @@ function getRate(currencyId) {
}

function getWebRate(currencyId) {

//Example Output:
// '=IMPORTXML("https://coinmarketcap.com/currencies/zeeyx?3908288283","//span[@id=\'quote_price\']")';

var coinScrape1 = '=IMPORTXML("https://coinmarketcap.com/currencies/';
var coinScrape2 = '","//span[@id=\'quote_price\']")';

return coinScrape1 + currencyId + '?' + queryString + coinScrape2;
}
}

0 comments on commit c56800d

Please sign in to comment.