Favicon Switcher - Flatpikr
This commit is contained in:
parent
272de57267
commit
400278071e
@ -5,6 +5,8 @@ Mises à jour :
|
|||||||
- jQuery v3.6.0
|
- jQuery v3.6.0
|
||||||
- Lity v2.4.1
|
- Lity v2.4.1
|
||||||
- Lightbox v2.10.1
|
- Lightbox v2.10.1
|
||||||
|
- Faltpickr v4.6.9
|
||||||
|
- FavIcon Switcher v1.2.2
|
||||||
- Corrections :
|
- Corrections :
|
||||||
- Configuration, restauration d'une archive du site :
|
- Configuration, restauration d'une archive du site :
|
||||||
- la validation du formulaire sans avoir sélectionné de fichier de sauvegarde provoque le crash du site.
|
- la validation du formulaire sans avoir sélectionné de fichier de sauvegarde provoque le crash du site.
|
||||||
|
19
core/vendor/favicon-switcher/favicon-switcher.js
vendored
19
core/vendor/favicon-switcher/favicon-switcher.js
vendored
@ -1,3 +1,4 @@
|
|||||||
|
// FavIcon Switcher V1.2.2
|
||||||
;(function(mod){
|
;(function(mod){
|
||||||
function collectLinks() {
|
function collectLinks() {
|
||||||
return Array.prototype.slice.apply(
|
return Array.prototype.slice.apply(
|
||||||
@ -25,14 +26,22 @@
|
|||||||
document.head.appendChild(current)
|
document.head.appendChild(current)
|
||||||
|
|
||||||
function faviconApplyLoop() {
|
function faviconApplyLoop() {
|
||||||
|
var matched
|
||||||
|
|
||||||
links.forEach(function(link) {
|
links.forEach(function(link) {
|
||||||
if (window.matchMedia(link.media).matches) {
|
if (window.matchMedia(link.media).matches) {
|
||||||
if (link.media !== prevMatch) {
|
matched = link
|
||||||
prevMatch = link.media
|
|
||||||
applyLink(link, current)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (! matched) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (matched.media !== prevMatch) {
|
||||||
|
prevMatch = matched.media
|
||||||
|
applyLink(matched, current)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var intervalId = setInterval(faviconApplyLoop, delay || 300)
|
var intervalId = setInterval(faviconApplyLoop, delay || 300)
|
||||||
@ -54,3 +63,5 @@
|
|||||||
|
|
||||||
initSwitcher()
|
initSwitcher()
|
||||||
})()
|
})()
|
||||||
|
|
||||||
|
|
5
core/vendor/flatpickr/flatpickr.min.js
vendored
5
core/vendor/flatpickr/flatpickr.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user