mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-08 23:39:46 +01:00
post-hover.js: enable only if the device supports hovering
This commit is contained in:
parent
6b3e578013
commit
dffc22ddf3
@ -13,6 +13,12 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Unknown media types always return false, so old browsers (css media 3 or prior to css media) which do support
|
||||
* any-hover or css media queries may return false negatives.
|
||||
* Handle it by checking if the query is explicitly NOT supported.
|
||||
*/
|
||||
if (!window.matchMedia('(any-hover: none)').matches) {
|
||||
onReady(function() {
|
||||
let dontFetchAgain = [];
|
||||
initHover = function() {
|
||||
@ -175,3 +181,4 @@ onReady(function() {
|
||||
$(post).find('div.body a:not([rel="nofollow"])').each(initHover);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user