Hello, you have come here looking for the meaning of the word
User:Lionel.rowe/vector-skin-desktop-only.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word
User:Lionel.rowe/vector-skin-desktop-only.js, but we will also tell you about its etymology, its characteristics and you will know how to say
User:Lionel.rowe/vector-skin-desktop-only.js in singular and plural. Everything you need to know about the word
User:Lionel.rowe/vector-skin-desktop-only.js you have here. The definition of the word
User:Lionel.rowe/vector-skin-desktop-only.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition of
User:Lionel.rowe/vector-skin-desktop-only.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
{
const kv = (key, value) => {
return {
key,
value,
*() {
yield key
yield value
}
}
}
const param = kv('useskin', 'vector')
const isMobile = () => window.navigator.userAgent.includes('Mobi')
const isSameOrigin = href =>
new URL(href).origin === window.location.origin
const appendSkinParam = href => {
const url = new URL(href)
url.searchParams.set(...param)
return url.href
}
const selector = 'a'
if (!isMobile()) {
const url = new URL(window.location.href)
if (url.searchParams.has(param.key)) {
url.searchParams.delete(param.key)
window.history.replaceState({}, document.title, url.href)
} else {
window.history.replaceState({}, document.title, appendSkinParam(window.location.href))
window.location.reload()
}
document.body.addEventListener('click', e => {
const link = e.target.closest(selector)
if (link) {
if (isSameOrigin(link.href) && new URL(link.href).pathname !== window.location.pathname) {
e.preventDefault()
const href = appendSkinParam(link.href)
if (e.ctrlKey) {
window.open(href, '_blank')
} else {
window.location = href
}
}
}
})
}
}