MCPcopy
hub / github.com/ollm/OpenComic / getSizes

Function getSizes

scripts/cache.js:94–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92const sizesCache = {};
93
94function getSizes()
95{
96 const devicePixelRatio = window.devicePixelRatio;
97 if(sizesCache[devicePixelRatio]) return sizesCache[devicePixelRatio];
98
99 return sizesCache[devicePixelRatio] = {
100 list: [
101 100,
102 150,
103 200,
104 250,
105 300,
106 ],
107 image: {
108 100: Math.round(devicePixelRatio * 100),
109 150: Math.round(devicePixelRatio * 150),
110 200: Math.round(devicePixelRatio * 200),
111 250: Math.round(devicePixelRatio * 250),
112 300: Math.round(devicePixelRatio * 300),
113 },
114 poster: {
115 100: Math.round(devicePixelRatio * 96),
116 150: Math.round(devicePixelRatio * 146),
117 200: Math.round(devicePixelRatio * 196),
118 250: Math.round(devicePixelRatio * 246),
119 300: Math.round(devicePixelRatio * 296),
120 },
121 };
122}
123
124function getRatios()
125{

Callers 2

returnThumbnailsImagesFunction · 0.70
deleteInCacheFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected