Add files via upload

This commit is contained in:
Manas Khurana 2017-04-08 04:10:14 +05:30 committed by GitHub
parent 022687f7ef
commit cef3affbd1
2 changed files with 12 additions and 1 deletions

View File

@ -476,6 +476,9 @@ position:absolute;
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
} }
#vids {
text-align:center;
}
a {text-decoration:none;} a {text-decoration:none;}
@media only screen and (max-width: 800px), screen and (orientation: portrait){ @media only screen and (max-width: 800px), screen and (orientation: portrait){
#instruct { #instruct {
@ -705,7 +708,7 @@ Select and copy the URL of this page below and use it to share this page anywher
<td><span id="pubDate">Loading...</span></td> <td><span id="pubDate">Loading...</span></td>
</tr> </tr>
</table> </table>
<p>Last <input type="text" id="vids" placeholder="1-25" value="5"> videos</p> <p>Last <input type="text" id="vids" placeholder="1-25" value="5"> videos</p><button class="extrabutton" onclick="upCharts();" id="upCharts">Update</button>
<div class="myChart-wrapper"> <div class="myChart-wrapper">
<canvas width="400" height="200" id="myChart2"></canvas> <canvas width="400" height="200" id="myChart2"></canvas>
</div> </div>

View File

@ -358,6 +358,14 @@ function extrabutton() {
} }
} }
function upCharts() {
vids = $("#vids").value;
for(var i=0;i<vids;i++){
myLineChart2.data.labels[i]='';
myLineChart2.data.datasets[0].data[i]=views[i];
}
}
//images are loaded after the whole page is loaded (since it has a big download size and sends multiple requests). //images are loaded after the whole page is loaded (since it has a big download size and sends multiple requests).
var images = document.getElementsByTagName("img"); var images = document.getElementsByTagName("img");
for(var pl=0;pl<images.length;pl++){ for(var pl=0;pl<images.length;pl++){