Last active
December 18, 2017 15:16
-
-
Save adtjha/a90ad2cbf5bc9b4b8c0c5fbd7f954d16 to your computer and use it in GitHub Desktop.
Revisions
-
adtjha revised this gist
Dec 18, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ for (var i = 0; i < array; i++) { //Current Price Of every Stock. if (currentPrice > lowerLimit && currentPrice < upperLimit) { document.querySelector('.dataTable').children[1].children[i].style.background = 'black'; document.querySelector('.dataTable').children[1].children[i].style.color = 'white'; } } -
adtjha created this gist
Dec 15, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ //Works only on "http://money.rediff.com/companies/most-traded/nse" //Used for filtering stocks according to the current price. var array = document.querySelector('.dataTable').children[1].children.length; //All the stocks displayed on the webpage. var lowerLimit = 100; var upperLimit = 200; for (var i = 0; i < array; i++) { var currentPrice = parseFloat(document.querySelector('.dataTable').children[1].children[i].children[1].innerText); //Current Price Of every Stock. if (currentPrice > lowerLimit && currentPrice < upperLimit) { document.querySelector('.dataTable').children[1].children[i].style.background = 'orangered'; document.querySelector('.dataTable').children[1].children[i].style.color = 'white'; } }