PageSourceSearch

https://www.runningtothekitchen.com/wp-content/plugins/allspice/dist/asx-bootstrap.js?ver=1.6.01.1.1790892850

js runningtothekitchen.com collected 2026-10-03 20:19:45 UTC 6,031 bytes, 148 lines download raw bytes

1(function () {
2    if (window.__ALLSPICE_BOOTSTRAP_INSTALLED) return;
3    window.__ALLSPICE_BOOTSTRAP_INSTALLED = true;
4    
5    function cfg() {
6        return window.__ALLSPICE_BOOTSTRAP_CFG || null;
7    }
8    
9    function hasAllspiceSlots(root) {
10        try {
11            var el = (root && root.querySelector)
12            ? root.querySelector(
13                                 '[data-allspice-mode="premade"][data-allspice-button], ' +
14                                 '[data-allspice-id], ' +
15                                 '[data-allspice-action], ' +
16                                 '[class*="allspice-id--"], ' +
17                                 '.asx-floatwrap'
18                                 )
19            : null;
20            return !!el;
21        } catch (e) {
22            return false;
23        }
24    }
25    
26    function ensurePageJs(src) {
27        if (!src) return;
28        try {
29            if (document.getElementById("allspice-widget-page-js")) return;
30            if (document.querySelector('script[src="' + src.replace(/"/g, '\\"') + '"]')) return;
31            var s = document.createElement("script");
32            s.id = "allspice-widget-page-js";
33            s.src = src;
34            s.async = true;
35            try { s.setAttribute("nowprocket", ""); } catch (e) {}
36            (document.head || document.documentElement).appendChild(s);
37        } catch (e) {}
38    }
39    
40    function publishCachesOnce() {
41        var c = cfg();
42        if (!c || window.__ALLSPICE_BOOTSTRAP_CACHES_PUBLISHED) return;
43        window.__ALLSPICE_BOOTSTRAP_CACHES_PUBLISHED = true;
44        try {
45            if (typeof c.debug !== "undefined") window.__ALLSPICE_DEBUG = !!c.debug;
46            if (c.version) window.__ALLSPICE_VERSION = c.version;
47            if (c.page_base) window.__ALLSPICE_PAGE_BASE = c.page_base;
48            if (c.page_chunk_base) window.__ALLSPICE_PAGE_CHUNK_BASE = c.page_chunk_base;
49            if (c.page_src) window.__ALLSPICE_PAGE_SRC = c.page_src;
50            if (c.css_url) window.__ALLSPICE_CSS_URL = c.css_url;
51            if (c.umd_url) window.__ALLSPICE_UMD_URL = c.umd_url;
52        } catch (e) {}
53        try {
54            if (c.buttons_cache && !window.__ALLSPICE_BUTTONS_CACHE) {
55                window.__ALLSPICE_BUTTONS_CACHE = c.buttons_cache;
56                window.__ALLSPICE_CACHE_READY = window.__ALLSPICE_CACHE_READY || {};
57                window.__ALLSPICE_CACHE_READY.buttons = true;
58                try {
59                    document.dispatchEvent(new CustomEvent("allspice:cacheReady", {
60                        detail: { kind: "buttons" }
61                    }));
62                } catch (e1) {}
63            }
64        } catch (e2) {}
65        try {
66            if (c.theme_policy && !window.__ALLSPICE_THEME_POLICY_CACHE) {
67                window.__ALLSPICE_THEME_POLICY_CACHE = c.theme_policy;
68                window.__ALLSPICE_CACHE_READY = window.__ALLSPICE_CACHE_READY || {};
69                window.__ALLSPICE_CACHE_READY.theme_policy = true;
70                try {
71                    document.dispatchEvent(new CustomEvent("allspice:cacheReady", {
72                        detail: { kind: "theme_policy" }
73                    }));
74                } catch (e3) {}
75            }
76        } catch (e4) {}
77        try {
78            if (c.recipe_ctx && !window.__ALLSPICE_RECIPE_CTX) {
79                window.__ALLSPICE_RECIPE_CTX = c.recipe_ctx;
80                window.__ALLSPICE_CACHE_READY = window.__ALLSPICE_CACHE_READY || {};
81                window.__ALLSPICE_CACHE_READY.recipe_ctx = true;
82                try {
83                    document.dispatchEvent(new CustomEvent("allspice:cacheReady", {
84                        detail: { kind: "recipe_ctx" }
85                    }));
86                } catch (e5) {}
87            }
88        } catch (e6) {}
89    }
90    
91    function hasAllspiceHashHook(root) {
92        try {
93            var hash = String(window.location.hash || "");
94            if (hash.indexOf("#allspice-search") === 0 || hash.indexOf("#allspice-guided-cooking") === 0 || hash.indexOf("#allspice-recipe") === 0 || hash.indexOf("#allspice-groceries") === 0) {
95                return true;
96            }
97            var el = (root && root.querySelector)
98                ? root.querySelector(
99                    'a[href^="#allspice-search"], ' +
100                    'a[href*="#allspice-search"], ' +
101                    'a[href^="#allspice-guided-cooking"], ' +
102                    'a[href*="#allspice-guided-cooking"], ' +
103                    'a[href^="#allspice-recipe"], ' +
104                    'a[href*="#allspice-recipe"], ' +
105                    'a[href^="#allspice-groceries"], ' +
106                    'a[href*="#allspice-groceries"]'
107                )
108                : null;
109            return !!el;
110        } catch (e) {
111            return false;
112        }
113    }
114    
115    function startIfNeeded() {
116        var c = cfg();
117        if (!c) return;
118        var shouldStart = hasAllspiceSlots(document) || hasAllspiceHashHook(document);
119        if (!shouldStart) return;
120        publishCachesOnce();
121        // ensurePageJs(c.page_src);
122    }
123    
124    try { startIfNeeded(); } catch (e) {}
125    try {
126        if (document.readyState === "loading") {
127            document.addEventListener("DOMContentLoaded", startIfNeeded, { once: true });
128        }
129    } catch (e) {}
130    try {
131        var obs = new MutationObserver(function (mutList) {
132            for (var i = 0; i < mutList.length; i++) {
133                var m = mutList[i];
134                if (m.type === "childList" && m.addedNodes && m.addedNodes.length) {
135                    if (hasAllspiceSlots(document) || hasAllspiceHashHook(document)) {
136                        startIfNeeded();
137                        try { obs.disconnect(); } catch (e) {}
138                        break;
139                    }
140                }
141            }
142        });
143        obs.observe(document.documentElement || document.body, {
144            childList: true,
145            subtree: true
146        });
147    } catch (e) {}
148})();

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.