Add share on clicking title
This commit is contained in:
parent
06e57e5b8b
commit
a653e92e03
3 changed files with 13 additions and 1 deletions
2
sw.js
2
sw.js
|
@ -1,4 +1,4 @@
|
||||||
const VERSION = 'v22'
|
const VERSION = 'v23'
|
||||||
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
|
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
|
||||||
const API_TRAINS = `${API_ORIGIN}v3/trains`
|
const API_TRAINS = `${API_ORIGIN}v3/trains`
|
||||||
const API_STATIONS = `${API_ORIGIN}v3/stations`
|
const API_STATIONS = `${API_ORIGIN}v3/stations`
|
||||||
|
|
|
@ -209,6 +209,12 @@ window.addEventListener('load', function (e) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (navigator.canShare && navigator.canShare({ url: '' })) {
|
||||||
|
document.getElementById('title').addEventListener('click', function () {
|
||||||
|
navigator.share({ url: '' });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
refresh()
|
refresh()
|
||||||
|
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
|
|
|
@ -518,6 +518,12 @@ window.addEventListener('load', function (e) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (navigator.canShare && navigator.canShare({ url: '' })) {
|
||||||
|
document.getElementById('title').addEventListener('click', function () {
|
||||||
|
navigator.share({ url: '' });
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
var content = document.getElementsByClassName('content')[0]
|
var content = document.getElementsByClassName('content')[0]
|
||||||
content.focus()
|
content.focus()
|
||||||
content.addEventListener('keydown', function (e) {
|
content.addEventListener('keydown', function (e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue