11 lines
312 B
JavaScript
11 lines
312 B
JavaScript
function refreshCSS() {
|
|
let links = document.getElementsByTagName('link')
|
|
Array.from(links).forEach(l=>{
|
|
if (l.rel == 'stylesheet' && !l.hasAttribute('x-no-reload')) {
|
|
let cache = Math.floor(Math.random()*100000)
|
|
l.href = l.href.replace(/\?.*/, '') + `?cache=${cache}`
|
|
console.log(l.href)
|
|
}
|
|
})
|
|
}
|