MCPcopy Create free account
hub / github.com/hoothin/UserScripts / getSizeIndex

Function getSizeIndex

Picviewer CE+/dist.user.js:11795–11800  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11793 // size helpers
11794
11795 function getSizeIndex() {
11796 // find index of widest matching media query
11797 return sizes.map(function (size) {
11798 return size.mq && window.matchMedia('(min-width: ' + size.mq + ')').matches;
11799 }).indexOf(true);
11800 }
11801
11802 function setSizeIndex() {
11803 sizeIndex = getSizeIndex();

Callers 2

setSizeIndexFunction · 0.70
resizeHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected