Skip to content

Instantly share code, notes, and snippets.

@fosslien
Created August 8, 2017 22:30
Show Gist options
  • Save fosslien/24cfea32f5b67a4f21349df80ac47e47 to your computer and use it in GitHub Desktop.
Save fosslien/24cfea32f5b67a4f21349df80ac47e47 to your computer and use it in GitHub Desktop.
button index.js
var maxim = document.getElementById("maxim");
var submit = document.getElementById("submit");
var time_line = [];
var d = new Date();
var today_key = d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
function submitClick() {
read_data(today_key);
}
function read_data(key_val){
var time_line_Ref = firebase.database().ref('Data/'+key_val);
var d = new Date();
time_line_Ref.push(d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()+":"+d.getMilliseconds());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment