MCPcopy Create free account
hub / github.com/error311/FileRise / isHoverPreviewDisabled

Function isHoverPreviewDisabled

public/js/fileListView.js:1051–1080  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1049}
1050
1051function isHoverPreviewDisabled() {
1052 if (window.disableHoverPreview === true) return true;
1053
1054 // Keep disabled on touch-only/coarse-only devices, but allow hybrid devices
1055 // (for example iPad + trackpad/mouse) that expose any hover-capable pointer.
1056 try {
1057 if (window.matchMedia) {
1058 const hasHoverPointer =
1059 window.matchMedia('(any-hover: hover)').matches ||
1060 window.matchMedia('(hover: hover)').matches ||
1061 window.matchMedia('(any-pointer: fine)').matches ||
1062 window.matchMedia('(pointer: fine)').matches;
1063 const touchOnlyLikely =
1064 (
1065 window.matchMedia('(pointer: coarse)').matches ||
1066 window.matchMedia('(any-pointer: coarse)').matches ||
1067 window.matchMedia('(hover: none)').matches ||
1068 window.matchMedia('(any-hover: none)').matches
1069 ) &&
1070 !hasHoverPointer;
1071 if (touchOnlyLikely) return true;
1072 }
1073 } catch (e) {}
1074
1075 try {
1076 return localStorage.getItem("disableHoverPreview") === "true";
1077 } catch (e) {
1078 return false;
1079 }
1080}
1081
1082function normalizeHoverPreviewDelayMs(value) {
1083 const parsed = parseInt(value, 10);

Callers 2

fillHoverPreviewForRowFunction · 0.85
renderFileTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected