Fix whitespace
This commit is contained in:
parent
6d20a59aba
commit
a49ca59d34
|
@ -1,31 +1,31 @@
|
|||
const Banner = {
|
||||
data: function() { return {
|
||||
url: "https://neckbeard.xyz",
|
||||
imageUrl: "/static/banner.png",
|
||||
imageSrc: "/static/banner.png",
|
||||
timer: ''
|
||||
} },
|
||||
created() {
|
||||
this.updateBanner()
|
||||
this.timer = setInterval(this.updateBanner, 300000)
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
updateBanner() {
|
||||
const componentThis = this
|
||||
const req = new XMLHttpRequest()
|
||||
req.addEventListener("load", function () {
|
||||
const json = JSON.parse(this.responseText)
|
||||
componentThis.url = json.bannerUrl
|
||||
console.log("new banner: "+componentThis.url)
|
||||
componentThis.imageSrc = componentThis.imageUrl + '?bustcache='+(new Date()).getTime()
|
||||
})
|
||||
req.open("GET", "/static/config.json")
|
||||
req.send()
|
||||
}
|
||||
data: function() { return {
|
||||
url: "https://neckbeard.xyz",
|
||||
imageUrl: "/static/banner.png",
|
||||
imageSrc: "/static/banner.png",
|
||||
timer: ''
|
||||
} },
|
||||
created() {
|
||||
this.updateBanner()
|
||||
this.timer = setInterval(this.updateBanner, 300000)
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
updateBanner() {
|
||||
const componentThis = this
|
||||
const req = new XMLHttpRequest()
|
||||
req.addEventListener("load", function() {
|
||||
const json = JSON.parse(this.responseText)
|
||||
componentThis.url = json.bannerUrl
|
||||
console.log("new banner: "+componentThis.url)
|
||||
componentThis.imageSrc = componentThis.imageUrl + '?bustcache='+(new Date()).getTime()
|
||||
})
|
||||
req.open("GET", "/static/config.json")
|
||||
req.send()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Banner
|
||||
|
|
Loading…
Reference in New Issue