PageSourceSearch

https://www.brownies.com/includes/javascript/GA4Extensions.js

js brownies.com collected 2026-09-25 23:41:09 UTC 2,532 bytes, 100 lines download raw bytes

1function getItemCategory(itemNo) {
2    var itemCategory = "";
3
4    if (itemNo.length >= 3) {
5        const position3 = itemNo[2].toUpperCase();
6
7        switch (position3) {
8            case "1":
9                itemCategory = "Brownie";
10                break;
11            case "2":
12                itemCategory = "Sprite";
13                break;
14            case "3":
15                itemCategory = "Combo/Tower";
16                break;
17            case "4":
18                itemCategory = "Morsel";
19                break;
20            case "5":
21                itemCategory = "Sugar Free";
22                break;
23            case "6":
24                itemCategory = "Gluten Free";
25                break;
26            case "7":
27                itemCategory = "Cookies";
28                break;
29            case "8":
30                itemCategory = "Blondies/Bars";
31                break;
32            default:
33                itemCategory = position3;
34                break;
35        }
36    }
37
38    return itemCategory;
39}
40
41function getItemBandVersion(itemNo) {
42    var bandVersion = "";
43
44    if (itemNo.length >= 2) {
45        var position2 = itemNo[1].toUpperCase();
46
47        if (position2 === "R") {
48            var sixthChar = itemNo.length > 5 ? itemNo[5] : "";
49            var seventhChar = itemNo.length > 6 ? itemNo[6] : "";
50            bandVersion = sixthChar + seventhChar;
51        } else {
52            bandVersion = position2;
53        }
54    }
55
56    return bandVersion;
57}
58
59function getItemType(itemNo) {
60    var itemType = "";
61
62    try {
63        if (itemNo.length >= 2) {
64            const position2 = itemNo[1].toUpperCase();
65            const lastChar = itemNo[itemNo.length - 1].toUpperCase();
66
67            if (position2 === "P" && lastChar === "X") {
68                itemType = "Photo";
69            } else if (lastChar === "X") {
70                itemType = "Custom";
71            } else {
72                itemType = "Standard";
73            }
74        }
75    } catch (e) {
76        console.error(e);
77    }
78
79    return itemType;
80}
81
82function getItemCYOType(itemNo) {
83    var itemType = "";
84
85    try {
86        if (itemNo.length >= 2) {
87            var lastChar = itemNo[itemNo.length - 1].toUpperCase();
88
89            if (lastChar === "Y") {
90                itemType = "CYO";
91            } else {
92                itemType = "Standard";
93            }
94        }
95    } catch (e) {
96        console.error(e);
97    }
98
99    return itemType;
100}

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.