-
Notifications
You must be signed in to change notification settings - Fork 0
/
main1.js
46 lines (36 loc) · 1.45 KB
/
main1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const url1 = document.getElementById('misaUrl1');
const url2 = document.getElementById('misaUrl2');
const url3 = document.getElementById('misaUrl3');
const Donaciones = document.getElementById('Donaciones');
const Santeria = document.getElementById('Santeria');
const Confesiones = document.getElementById('Confesiones');
const Domingo = document.getElementById('Domingo');
const LunesSabado = document.getElementById('LunesSabado');
var setSanteria = fireBase.database().ref('Santeria');
var setConfesiones = fireBase.database().ref('Confesiones');
var setDonaciones = fireBase.database().ref('Donaciones');
var setUrl = firebase.database().ref('url');
var setDomingo = firebase.database().ref('Domingo');
var setLunesSabado = firebase.database().ref('LunesSabado');
setLunesSabado.on('value', function(snapshot){
LunesSabado.innerHTML = '<b>De Lunes a Sabado:</b> ' + snapshot.val();
});
setDomingo.on('value', function(snapshot){
Domingo.innerHTML = '<b>Domingo:</b> ' + snapshot.val();
});
setConfesiones.on('value', function(snapshot){
Confesiones.innerHTML = snapshot.val();
});
setSanteria.on('value', function(snapshot){
Santeria.innerHTML = snapshot.val();
});
setDonaciones.on('value', function(snapshot){
console.log(snapshot.val());
Donaciones.innerHTML = snapshot.val();
});
setUrl.on('value', function (snapshot) {
console.log(snapshot.val());
url1.href = snapshot.val();
url2.href = snapshot.val();
url3.href = snapshot.val();
});