Skip to content

Commit

Permalink
Cleaned comments and fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xangelix committed Jan 3, 2018
1 parent fe168b6 commit 2329b8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion background.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Tells chrome to execute content.js when the extension button is pressed

chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.executeScript(null, {file: "content.js"});
});
6 changes: 3 additions & 3 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var HttpClient = function() {
};
};

// Collection of Website Information by Class
// Collection of website information by class
var names = document.getElementsByClassName('coin ng-binding');
var amounts = document.getElementsByClassName('total f-right ng-binding');
var btcs = document.getElementsByClassName('equalValue f-right ng-binding');
Expand Down Expand Up @@ -52,12 +52,12 @@ function parseP(coinName, coinValue) {
//console.log('DEBUG: Coin Value: ' + parseFloat(coinValue));
var index = indexFinder(coinName);
//console.log('DEBUG: Coin Amounts: ' + parseFloat(amounts[index].innerHTML));
var output = parseFloat(coinValue) * parseFloat(btcs[index].innerHTML);
var output = parseFloat(coinValue) * parseFloat(btcs[index + 1].innerHTML);
output = " - $" + output.toFixed(2);
//console.log('TOTAL: ' + output);
// To-do: Add tradingview graphs to changed elements
// Final posting of data
amounts[index].innerHTML += output;
amounts[index + 1].innerHTML += output;
}

//Indexing agent for matching asynchronous replies to page
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,

"name": "Binance Valuations",
"version": "0.1.5",
"version": "0.1.6",
"description": "Finds values of individual wallets inside binance!",

"browser_action": { "default_icon": "icon.png" },
Expand Down

0 comments on commit 2329b8e

Please sign in to comment.