PageSourceSearch

https://prettylittleshoppers.com/wp-content/plugins/grid-kit-premi…/layer/crp-module-layer.js?ver=7.0.6

js prettylittleshoppers.com collected 2026-10-04 13:24:46 UTC 1,965 bytes, 61 lines download raw bytes

1function gkitFloorToDivideBy(n,m) {
2    // find the quotient
3    var q = parseInt(n / m);
4
5    // 1st possible closest number
6    var n1 = m * q;
7    return n1;
8
9    // 2nd possible closest number
10    var n2 = (n * m) > 0 ?
11        (m * (q + 1)) : (m * (q - 1));
12
13    // if true, then n1 is the
14    // required closest number
15    if (Math.abs(n - n1) < Math.abs(n - n2))
16        return n1;
17
18    // else n2 is the required
19    // closest number
20    return n2;
21}
22
23function gkitLayoutStyleRatios(styleConf, plugin, wrapperWdith, winWidth) {
24  var ratios = styleConf.ratios.desktop;
25  if (winWidth > plugin.settings.screenSizes.kDesktopMaxWidth) { // large desktop
26      ratios = styleConf.ratios.desktop;
27  } else if (winWidth >= plugin.settings.screenSizes.kDesktopMinWidth) { //desktop
28      ratios = styleConf.ratios.desktop;
29  } else if (winWidth > plugin.settings.screenSizes.kMobileMaxWidth) { //tablet
30      ratios = styleConf.ratios.tablet;
31  } else {
32      ratios = styleConf.ratios.mobile;
33  }
34
35  return ratios;
36}
37
38function gkitLayoutStyleCols(styleConf, plugin, wrapperWdith, winWidth) {
39  var colCount = styleConf.columns.desktop;
40  if (winWidth > plugin.settings.screenSizes.kDesktopMaxWidth) { // large desktop
41      colCount = styleConf.columns.desktop;
42  } else if (winWidth >= plugin.settings.screenSizes.kDesktopMinWidth) { //desktop
43      colCount = styleConf.columns.desktop;
44  } else if (winWidth > plugin.settings.screenSizes.kMobileMaxWidth) { //tablet
45      colCount = styleConf.columns.tablet;
46  } else {
47      colCount = styleConf.columns.mobile;
48  }
49
50  return colCount;
51}
52
53function gkitLayoutTileStep(styleConf, plugin, wrapperWdith, winWidth) {
54  var colCount = gkitLayoutStyleCols(styleConf, plugin, wrapperWdith, winWidth);
55  var ratios = gkitLayoutStyleRatios(styleConf, plugin, wrapperWdith, winWidth);
56
57  wrapperWdith = gkitFloorToDivideBy(wrapperWdith, colCount);
58  var step = parseInt( wrapperWdith / colCount );
59  
60  return step;
61}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.