-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.js
More file actions
37 lines (33 loc) · 766 Bytes
/
index.js
File metadata and controls
37 lines (33 loc) · 766 Bytes
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
function Matches(){
this.getMatches = function (text) {
}
}
new Vue({
'el': '#app',
template: '#template',
data: {
verse: '',
placeholder: 'Paste or type the verses you want to read'
},
methods: {
go() {
// console.log('matches', matches);
let verses = this.verse.split(';')
verses.map((verse) => {
const trimmedVerse = verse.trim();
if (trimmedVerse.length) {
this.openUrl(
this.matches(trimmedVerse)
)
}
})
},
openUrl(url) {
var win = window.open(url, '_blank');
win.focus();
},
matches(texto) {
return 'https://www.bibliaonline.com.br/nvi/' + texto.replace(' ', '/').replace('.', '/').toLowerCase()
}
}
})