PageSourceSearch

https://www.befrugal.com/js/ToolbarDownload.js?v=FGhUGX7Qr7r6tpIiLoTptW31FYZLaoE1MKV2Tj3kbZk

js befrugal.com collected 2026-09-24 09:19:07 UTC 49,811 bytes, 810 lines download raw bytes

1var extensionVisibilityListenerInited = false;
2function ToolbarInit() {
3    let tdcArray = document.querySelectorAll('#ToolbarDownloadConfig');
4    for (let tdConfigNum = 0; tdConfigNum < tdcArray.length; tdConfigNum++) {
5        let tdc = tdcArray[tdConfigNum];
6        if (!tdc.value || tdc.value.length == 0) continue;
7
8        let config = JSON.parse(tdc.value);
9
10        let newMode = true; //open in new tab not window
11        let ChromeExtIsInstalled = false;
12        var isExtendedSearchStep = false;
13        let tracking = config.TrackExtension;
14        let serveButton = config.ServeButton;
15        let serveSearch = config.ServeSearch;
16        let skipTour = config.SkipTour;
17        let audioTimesPlayed = 0;
18        let audioMaxPlays = 2;
19        let isFirefox = false;
20        let chromeSound1 = "//icdn.bfrl.us/toolbar/sound/almost-done1.mp3";
21        if ('edge_chromium' === config.BrowserTypeVersion) {
22            chromeSound1 = '';
23        }
24        let downloadPath = config.DownloadPath;
25
26        var playAudioEnded = function () {
27            if (audioTimesPlayed >= audioMaxPlays) {
28                audioTimesPlayed = 0;
29                return;
30            }
31            audioTimesPlayed++;
32            this.currentTime = 0;
33            this.play();
34        };
35        if (config.MedianetTracking) {
36            document.addEventListener('applyToolbarConversion', function () {
37                var script = document.createElement('script');
38                script.setAttribute('type', 'text/javascript');
39                script.setAttribute('src', "https://c.pmsrv.co/v2/conversion/src?a=365db8f2-f5e3-4520-aacb-92e7d5677b68&event=extension2");
40                document.head.appendChild(script);
41            });
42        }
43
44        if (config.DiabloTracking) {
45            document.addEventListener('applyToolbarConversion', function () {
46                var diabloPix = document.createElement('image');
47                diabloPix.setAttribute('src', "https://r4wj.com/pixel/8073/" + config.OptionalData + "/");
48                document.body.appendChild(diabloPix);
49            });
50        }
51        if (config.DownloadPath.length > 0) {
52            document.addEventListener("DOMContentLoaded", function (event) {
53                if (!serveButton && window.navigator && window.navigator.userAgent) {
54                    var match = window.navigator.userAgent.match(/Firefox\/([0-9]+)\./);
55                    var ver = match ? parseInt(match[1]) : 0;
56
57                    if (match && ver < 68) {
58                        let audioAlmostDone = document.getElementById("audioAlmostDone");
59                        if (audioAlmostDone) {
60                            audioAlmostDone.src = "//icdn.bfrl.us/toolbar/sound/allow-add.mp3";
61                        }
62                        isFirefox = true;
63                    }
64                    else if (match) {
65                        let audioAlmostDone = document.getElementById("audioAlmostDone");
66                        if (audioAlmostDone) {
67                            audioAlmostDone.src = "//icdn.bfrl.us/toolbar/sound/continue-add.mp3";
68                        }
69                        isFirefox = true;
70                    }
71                    else if (serveSearch) {
72                        let audioAlmostDone = document.getElementById("iframeAudio");
73                        if (audioAlmostDone) {
74                            audioAlmostDone.src = "//icdn.bfrl.us/toolbar/sound/click-to-get-started2.mp3?v=2";
75                        }
76                    }
77
78                    let almostDone = document.getElementById("audioAlmostDone");
79                    if (almostDone) {
80                        //prevent multitple copies of this control stacking event
81                        almostDone.removeEventListener('ended', playAudioEnded);
82                        almostDone.addEventListener('ended', playAudioEnded);
83                    }
84                }
85            });
86        }
87        if (config.DownloadButtons.length > 0) {
88            let isClassicFlow = false;
89            let isRetry = false;
90            var downloadExtensionClick = function (event) {
91                event.stopImmediatePropagation();
92                btnInstallJs(this, isRetry, isClassicFlow);
93                return false;
94            };
95            $(document).off('click', config.DownloadButtons.join(','));
96            $(document).on('click', config.DownloadButtons.join(','), downloadExtensionClick);
97        }
98
99        let hideLock = false;
100        let hideUnlock;
101        $("#btnRetry,#RestartOnClick").on('click', function () {
102            let isClassicFlow = false;
103            let isRetry = true;
104            hideLock = true;
105            btnInstallJs(this, isRetry, isClassicFlow);
106            return false;
107        });
108
109        $("#FFAlmostDone #bfrl_closeButton").on('click', function () {
110            hideLock = false;
111            hideFirefoxInstructions();
112            hideLock = true;
113        });
114
115        function showFirefoxInstructions() {
116            window.bfcurrentPopup = $('#pnlInstructionFF');
117            window.bfcurrentPopup.toggle();
118            $('#dvModalDarken').show();
119        }
120
121        function hideFirefoxInstructions() {
122            if (!hideLock) {
123                $('#dvModalDarken').hide();
124                if (window.bfcurrentPopup) {
125                    window.bfcurrentPopup.hide();
126                }
127            }
128            else {
129                clearTimeout(hideUnlock);
130                hideUnlock = setTimeout(function () {
131                    hideLock = false;
132                    hideFirefoxInstructions();
133                }, 12000);
134            }
135        }
136
137        function bf_chrome_Message(msg) {
138            var uri = downloadPath;
139            var lastindex = uri.lastIndexOf('/');
140            if (lastindex != -1) {
141                var extensionID = uri.substring(lastindex + 1);
142                chrome.runtime.sendMessage(extensionID, { Message: msg });
143            }
144        }
145        async function CreateAccountHandler(email, zip, subscribe, callback) {
146            await fetch('/ServicePages/BefrugalSiteWs/?handler=CreateToolbarAccountMethod', {
147                method: 'POST',
148                headers: {
149                    'Content-Type': 'application/x-www-form-urlencoded',
150                    accept: 'application/json',
151                    RequestVerificationToken: $('input[name="__RequestVerificationToken"]').val(),
152                },
153                body: new URLSearchParams({ 'email': email, 'zip': zip, 'chksubscriber': subscribe }).toString(),
154            }).then(callback);
155        }
156        function btnLogInRedirect(destination) {
157            var emailregex = new RegExp(config.EmailRegEx, "i");
158            var zipregex = /^\d\d\d\d\d$/i;
159            var emailtxt = $('#TxtEmailClientID');
160            var ziptxt = $('#TxtZipClientID');
161            var chkSubscribe = $('#ChkSubscriberClientID');
162            var chkEula = $('#ChkAgreeClientID');
163            if (!!emailtxt) {
164                emailtxt.value = emailtxt.value.trim();
165            }
166            var emailvalid = !emailtxt || emailtxt.value.match(emailregex);
167            var zipvalid = !ziptxt || ziptxt.value.match(zipregex);
168            var eulaValid = chkEula == null || chkEula.checked;
169            var cookieValid = config.AllowCookies;
170
171            //If the user's zip code is invalid, just ignore it.
172            if (!zipvalid) ziptxt = null;
173
174            if (!eulaValid || !emailvalid || !cookieValid) {
175                var alerttxt = config.PleaseCorrectFollowingItems;
176                if (!eulaValid) alerttxt += config.PleaseReadAndAgreeToEULA;
177                if (!emailvalid) alerttxt += config.PleaseEnterValidEmail;
178                if (!cookieValid) alerttxt += config.PleaseAcceptCookies;
179                alert(alerttxt);
180                if (!!emailtxt) emailtxt.focus();
181                return false;
182            } else {
183                CreateAccountHandler(emailtxt ? emailtxt.value : null, ziptxt ? ziptxt.value : null, chkSubscribe ? chkSubscribe.checked : false, function () { bf_safariLastStep(); });
184                document.location.href = destination;
185            }
186            return false;
187        }
188        async function GetIsButtonInstalled(callback) {
189            let url = '/ServicePages/BefrugalSiteWs/?handler=IsButtonInstalled';
190            let resp = await fetch(url, {
191                headers: {
192                    'Content-Type': 'application/json',
193                    Accept: 'application/json',
194                }
195            });
196            if (resp.ok) {
197                var b = await resp.json();
198                callback(b);
199            }
200            else {
201                callback(false);
202            }
203        }
204        async function GetIsToolbarInstalled(callback) {
205            let url = '/ServicePages/BefrugalSiteWs/?handler=IsToolbarInstalled';
206            let resp = await fetch(url, {
207                headers: {
208                    "Content-Type": "application/json",
209                    Accept: 'application/json',
210                }
211            });
212            if (resp.ok) {
213                var b = await resp.json();
214                callback(b);
215            }
216            else {
217                callback(false);
218            }
219        }
220        async function GetIsSearchExtensionInstalled(callback) {
221            let url = '/ServicePages/BefrugalSiteWs/?handler=IsExtendedSearchInstalled';
222            let resp = await fetch(url, {
223                headers: {
224                    "Content-Type": "application/json",
225                    Accept: 'application/json',
226                }
227            });
228            if (resp.ok) {
229                var b = await resp.json();
230                callback(b);
231            }
232            else {
233                callback(false);
234            }
235        }
236
237        if (!extensionVisibilityListenerInited && document.getElementById("groceryPop")) {
238            extensionVisibilityListenerInited = true;
239            var visibilityRemoveUnwanted = function (e) {
240                if (document.visibilityState === 'visible') {
241                    GetIsToolbarInstalled(function (tbInstalled) {
242                        $("#groceryPop").closest(".bf-basicmodal").hide();
243                        if (tbInstalled) {
244                            document.removeEventListener("visibilitychange", visibilityRemoveUnwanted);
245                        }
246                    });
247                }
248            };
249            document.addEventListener("visibilitychange", visibilityRemoveUnwanted);
250        }
251
252        function quickInstall(classicFlow, guestinstall, isRetry) {
253            let unkownToChrome = false;
254            localStorage['skipTour'] = skipTour;
255            localStorage["isClassicFlow"] = config.ServeSearch;
256            localStorage["ButtonLpDownloadFlow"] = (serveButton ? "true" : "false");
257
258            if (config.BrowserTypeVersion === "firefox") {
259                if (serveButton) {
260                    GetIsButtonInstalled(function (result) {
261                        if (result) {
262                            document.location.href = '/toolbar/InstallationComplete/';
263                        }
264                        else {
265                            localStorage["tempFlow"] = "buttonsite";
266                            bf_installFirefoxExtension();
267                        }
268                    });
269                }
270                else {
271                    localStorage["tempFlow"] = "buttonsite";
272                    bf_installFirefoxExtension();
273                    let almostDone = document.getElementById("audioAlmostDone");
274                    if (almostDone) {
275                        audioTimesPlayed = 0;
276                        almostDone.currentTime = 0;
277                        var playProm = almostDone.play();
278                        if (playProm) {
279                            playProm.catch(function (error) { });
280                        }
281                    }
282                }
283            }
284            else {
285                if ((!newMode && serveButton) || (classicFlow && !serveButton)) {
286                    bf_installChromeExtension();
287                }
288                else if (serveButton) {
289                    GetIsButtonInstalled(function (result) {
290                        if (result) {
291                            document.location.href = '/toolbar/InstallationComplete/';
292                        }
293                        else {
294                            localStorage["tempFlow"] = "buttonsite";
295                            window.open(downloadPath, (config.ClickTarget || "_blank"));
296                        }
297                    });
298                }
299                else {
300                    window.open(downloadPath);
301                }
302                unkownToChrome = (config.BrowserTypeVersion !== "chrome") ? true : false;
303            }
304
305            if (guestinstall && config.BrowserTypeVersion === "firefox" && !unkownToChrome) {
306                if (bf_mediaplayer_hide) bf_mediaplayer_hide();
307                if (!isRetry) {
308                    showFirefoxInstructions();
309                }
310            }
311        }
312
313        function btnInstallJs(sender, isRetry, isClassicFlow) {
314            // Hack - Don't fail on missing sender
315            if (!sender) sender = {};
316            if (ChromeExtIsInstalled) {
317                bf_chrome_Message('WELCOME');
318                return false;
319            }
320            if (config.CreateGuestAccount) {
321                //Don't bother creating an account; the toolbar will create a guest account if one doesn't exist
322                quickInstall(isClassicFlow, true, isRetry);
323                applyTrafficConversion();
324                return false;
325            }
326
327            var bf_safariLastStep = function () {
328                //In Safari, must set location after account is created; Safari will not execute webservice calls after changing document.location.href
329                //(whereas other browsers will not change document.location.href after account is created).
330                if (config.BrowserTypeVersion === "safari") {
331                    sender.disabled = false;
332                    document.location.href = downloadPath;
333                }
334            };
335
336            if (!isRetry) sender.disabled = true;
337            var emailregex = new RegExp(config.EmailRegEx, "i");
338            var zipregex = /^\d\d\d\d\d$/i;
339            var emailtxt = document.getElementById('TxtEmailClientID');
340            var ziptxt = document.getElementById('TxtZipClientID');
341            var chkSubscribe = document.getElementById('ChkSubscriberClientID');
342            var chkEula = document.getElementById('ChkAgreeClientID');
343            if (!!emailtxt) {
344                emailtxt.value = emailtxt.value.trim();
345            }
346            var emailvalid = !emailtxt || emailtxt.value.match(emailregex);
347            var zipvalid = !ziptxt || ziptxt.value.match(zipregex);
348            var eulaValid = chkEula == null || chkEula.checked;
349            var cookieValid = config.AllowCookies;
350
351            //If the user's zip code is invalid, just ignore it.
352            if (!zipvalid) ziptxt = null;
353
354            if (!eulaValid || !emailvalid || !cookieValid) {
355                sender.disabled = false;
356                var alerttxt = config.PleaseCorrectFollowingItems;
357                if (!eulaValid) alerttxt += config.PleaseReadAndAgreeToEULA;
358                if (!emailvalid) alerttxt += config.PleaseEnterValidEmail;
359                if (!cookieValid) alerttxt += config.PleaseAcceptCookies;
360                alert(alerttxt);
361                if (!!emailtxt) emailtxt.focus();
362                return false;
363            } else {
364                sender.disabled = false;
365
366                //isRetry indicates that the user clicked a "retry download" button, having previously clicked the download button (but possibly canceled the download itself).
367                //If isRetry, the only thing we need to do retry the safari download (the other downloads were already retried in the conditional above.
368                if (!isRetry) {
369                    //IOS/Chrome  doesn't have instruction popups.
370                    if (config.BrowserTypeVersion === "firefox") {
371                        if (bf_mediaplayer_hide) bf_mediaplayer_hide();
372                        showFirefoxInstructions();
373                    }
374                    CreateAccountHandler(emailtxt ? emailtxt.value : '', ziptxt ? ziptxt.value : '', chkSubscribe ? chkSubscribe.checked : false, function () {
375                        applyTrafficConversion();
376                        bf_safariLastStep();
377                        quickInstall(isClassicFlow);
378                    });
379                    bf_trackDownloadRequest();
380                } else {
381                    bf_safariLastStep();
382                    quickInstall(isClassicFlow);
383                }
384            }
385            return false;
386        }
387
388        function bf_trackDownloadRequest() {
389            ga('send', 'pageview', '/toolbar/download/' + config.BrowserTypeVersion + '/ButtonClick');
390        }
391
392        function applyTrafficConversion() {
393            if (!tracking || !serveButton) return;
394
395            try {
396                var image3 = new Image(1, 1);
397                image3.src = 'https://sp.analytics.yahoo.com/spp.pl?a=100043951255&.yp=33596&js=no';
398            } catch (er) { }
399
400            try {
401                var image4 = new Image(1, 1);
402                image4.src = 'https://conversion.adshop.infolinks.com/conversion/?pixel=1&aid=487699';
403            } catch (er) { }
404        }
405
406        try {
407            window.addEventListener("message", function (event) {
408                if (event.source != window || !event.data.type) return;
409                if (event.data.type == "INSTALL_NOTIFY") {
410                    ChromeExtIsInstalled = true;
411                }
412                if (event.data.type == "HIDE_INSTRUCTION") {
413                    console.log("Hide");
414                    ChromeExtIsInstalled = true;
415                    hideFirefoxInstructions();
416                }
417            }, false);
418            bf_chrome_Message('HELLO');
419        } catch (e) { }
420
421        var setCursorFocus = function () {
422            var txtEmail = $('#TxtEmailClientID');
423            if (txtEmail) {
424                txtEmail.focus();
425            }
426        };
427        window.addEventListener("load", setCursorFocus);
428
429        document.addEventListener('applySearchConversion', function () {
430            
vendor: 169 bytes, lines 430-433
430window.dataLayer = window.dataLayer || [];
431            function gtag() { dataLayer.push(arguments); }
432            gtag('js', new Date());
433            gtag('config', '
433AW-1037238101
vendor: 17 bytes, lines 433-434
433');
434            
434gtag('event', 'conversion', { 'send_to': 'AW-1037238101/CO9CCOeKq5QBENX-y-4D' });
435
436            //stop audio
437            if (isFirefox) {
438                let almostDone = document.getElementById("audioAlmostDone");
439                if (almostDone) {
440                    almostDone.pause();
441                }
442            }
443        });
444
445        (function (w, d, t, r, u) { var f, n, i; w[u] = w[u] || [], f = function () { var o = { ti: "5214380" }; o.q = w[u], w[u] = new UET(o), w[u].push("pageLoad") }, n = d.createElement(t), n.src = r, n.async = 1, n.onload = n.onreadystatechange = function () { var s = this.readyState; s && s !== "loaded" && s !== "complete" || (f(), n.onload = n.onreadystatechange = null) }, i = d.getElementsByTagName(t)[0], i.parentNode.insertBefore(n, i) })(window, document, "script", "//bat.bing.com/bat.js", "uetq");
446
447        //verizon
448        (function (w, d, t, r, u) { w[u] = w[u] || []; w[u].push({ 'projectId': '10000', 'properties': { 'pixelId': '33596' } }); var s = d.createElement(t); s.src = r; s.async = true; s.onload = s.onreadystatechange = function () { var y, rs = this.readyState, c = w[u]; if (rs && rs != "complete" && rs != "loaded") { return } try { y = YAHOO.ywa.I13N.fireBeacon; w[u] = []; w[u].push = function (p) { y([p]) }; y(c) } catch (e) { } }; var scr = d.getElementsByTagName(t)[0], par = scr.parentNode; par.insertBefore(s, scr) })(window, document, "script", "https://s.yimg.com/wi/ytc.js", "dotq");
449
450        var _$_e4cf = ["\x6C\x6F\x61\x64", "\x63\x6C\x69\x63\x6B", "\x66\x6F\x63\x75\x73", "\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72", "\x62\x6F\x64\x79", "\x55\x73\x65\x72\x20\x63\x61\x6E\x63\x65\x6C\x6C\x65\x64\x20\x69\x6E\x73\x74\x61\x6C\x6C", "\x63\x61\x6E\x63\x65\x6C\x6C\x65\x64", "\x61\x75\x64\x69\x6F\x41\x6C\x6D\x6F\x73\x74\x44\x6F\x6E\x65", "\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64", "\x70\x61\x75\x73\x65", "\x6F\x6E\x62\x6C\x75\x72", "\x70\x72\x65\x76\x69\x6F\x75\x73\x42\x6C\x75\x72", "\x74\x69\x6D\x65\x53\x74\x61\x6D\x70", "\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79\x63\x68\x61\x6E\x67\x65", "\x68\x69\x64\x64\x65\x6E", "\x69\x73\x49\x6E\x73\x74\x61\x6C\x6C\x69\x6E\x67", "\x6F\x6E\x66\x6F\x63\x75\x73", "\x70\x72\x65\x76\x69\x6F\x75\x73\x46\x6F\x63\x75\x73", "\x6D\x6F\x75\x73\x65\x65\x6E\x74\x65\x72", "\x6C\x6F\x63\x61\x74\x69\x6F\x6E", "\x69\x66\x72\x61\x6D\x65\x41\x75\x64\x69\x6F", "\x73\x72\x63", "", "\x63\x75\x72\x72\x65\x6E\x74\x54\x69\x6D\x65", "\x70\x6C\x61\x79", "\x73\x63\x72\x65\x65\x6E\x58", "\x77\x69\x64\x74\x68", "\x73\x63\x72\x65\x65\x6E", "\x69\x6E\x6E\x65\x72\x57\x69\x64\x74\x68", "\x69\x6E\x6E\x65\x72\x48\x65\x69\x67\x68\x74", "\x72\x6F\x75\x6E\x64", "\x73\x63\x72\x65\x65\x6E\x59", "\x68\x65\x69\x67\x68\x74", "\x6F\x76\x65\x72\x6C\x61\x79\x43\x6F\x6E\x74\x65\x6E\x74", "\x64\x69\x73\x70\x6C\x61\x79", "\x73\x74\x79\x6C\x65", "\x62\x6C\x6F\x63\x6B", "\x6D\x79\x70\x6F\x70\x75\x70", "\x77\x69\x64\x74\x68\x3D", "\x2C\x20\x68\x65\x69\x67\x68\x74\x3D", "\x2C\x20\x6C\x65\x66\x74\x3D", "\x2C\x20\x74\x6F\x70\x3D", "\x6F\x70\x65\x6E", "\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x41\x72\x65\x61\x49\x6E\x64\x69\x63\x61\x74\x6F\x72", "\x63\x6C\x6F\x73\x65\x64", "\x74\x6F\x70", "\x6C\x65\x66\x74", "\x70\x78", "\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x41\x72\x72\x6F\x77", "\x31\x30\x30\x70\x78", "\x37\x35\x70\x78", "\x73\x63\x72\x6F\x6C\x6C\x54\x6F", "\x63\x6C\x6F\x73\x65", "\x68\x72\x65\x66", "\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x62\x65\x66\x72\x75\x67\x61\x6C\x2E\x63\x6F\x6D\x2F\x74\x6F\x6F\x6C\x62\x61\x72\x2F\x49\x6E\x73\x74\x61\x6C\x6C\x61\x74\x69\x6F\x6E\x43\x6F\x6D\x70\x6C\x65\x74\x65\x2E\x61\x73\x70\x78", "\x6E\x6F\x6E\x65", "\x64\x69\x76\x45\x78\x74\x65\x6E\x64\x65\x64\x53\x65\x61\x72\x63\x68\x49\x6E\x73\x74\x61\x6C\x6C\x61\x74\x69\x6F\x6E\x53\x74\x65\x70\x42\x6F\x78", "\x23\x69\x6E\x73\x74\x61\x6C\x6C\x61\x74\x69\x6F\x6E\x4F\x76\x65\x72\x6C\x61\x79", "\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72\x41\x6C\x6C", "\x6C\x65\x6E\x67\x74\x68", "\x2F\x74\x6F\x6F\x6C\x62\x61\x72\x2F\x77\x65\x6C\x63\x6F\x6D\x65\x2F", "\x72\x65\x70\x6C\x61\x63\x65", "\x47\x45\x54", "\x2F\x74\x6F\x6F\x6C\x62\x61\x72\x2F\x69\x6E\x73\x
45074\x61\x6C\x6C\x2F\x3F\x63\x72\x65\x61\x74\x65\x54\x61\x62\x3D\x74\x72\x75\x65", "\x73\x65\x6E\x64"]; var mywindow; var addonInstallCancelled = false; var sendMessageOnce = false; var cancelInterval; window[_$_e4cf[3]](_$_e4cf[0], function (_0x6048) { document[_$_e4cf[4]][_$_e4cf[3]](_$_e4cf[1], function () { if (mywindow) { mywindow[_$_e4cf[2]]() } }) }); function bf_chromeInstall_failure(_0x606C) { if (isFirefox) { hideFirefoxInstructions() }; if (_0x606C == _$_e4cf[5]) { addonInstallCancelled = false; ins[_$_e4cf[6]] = true }; let _0x605A = document[_$_e4cf[8]](_$_e4cf[7]); if (_0x605A) { _0x605A[_$_e4cf[9]]() } } var initialized = false; var ins = ins || { cancelled: true }; var userCancelledCount = 0; function bf_installFirefoxExtension() { userCancelledCount = 0; ins[_$_e4cf[6]] = false; if (!initialized && !serveButton && serveSearch) { firefoxInit() } else { setTimeout(hideFirefoxInstructions, 12000) }; installFirefoxExtension() } function firefoxInit() { initialized = true; let _0x605A = document[_$_e4cf[8]](_$_e4cf[7]); document[_$_e4cf[4]][_$_e4cf[10]] = function (_0x61F8) { ins[_$_e4cf[11]] = _0x61F8[_$_e4cf[12]] }; document[_$_e4cf[3]](_$_e4cf[13], function () { if (!document[_$_e4cf[14]] && !ins[_$_e4cf[6]] && ins[_$_e4cf[15]]) { if (serveButton) { GetIsButtonInstalled(function (_0x620A) { if (!_0x620A) { installFirefoxExtension() } }) } else { GetIsToolbarInstalled(function (_0x620A) { if (!_0x620A) { installFirefoxExtension() } }) } } }, false); document[_$_e4cf[4]][_$_e4cf[16]] = function (_0x61F8) { ins[_$_e4cf[17]] = (_0x61F8[_$_e4cf[12]] - ins[_$_e4cf[11]]) }; document[_$_e4cf[4]][_$_e4cf[3]](_$_e4cf[18], function (_0x61F8) { if (!ins[_$_e4cf[6]] && ins[_$_e4cf[15]] && (_0x61F8[_$_e4cf[12]] - ins[_$_e4cf[11]]) < 500 && ins[_$_e4cf[17]] < 200) { ins[_$_e4cf[15]] = false; setTimeout(function () { if (!ins[_$_e4cf[6]]) { if (userCancelledCount < 5) { installFirefoxExtension() } else { installFirefoxExtension(); bf_chromeInstall_failure(_$_e4cf[5]) } } }, 1000) } }) } function installFirefoxExtension() { if (serveButton) { window[_$_e4cf[19]] = downloadPath; ins[_$_e4cf[15]] = true; userCancelledCount = userCancelledCount + 1 } else { GetIsToolbarInstalled(function (_0x620A) { if (!_0x620A) { window[_$_e4cf[19]] = downloadPath; ins[_$_e4cf[15]] = true; userCancelledCount = userCancelledCount + 1 } }) } } function bf_installChromeExtension() {
451            try {
452                if (!serveButton) { let _0x607E = document[_$_e4cf[8]](_$_e4cf[20]); if (_0x607E) { _0x607E[_$_e4cf[21]] = _$_e4cf[22] }; let _0x605A = document[_$_e4cf[8]](_$_e4cf[7]); if (_0x605A) { _0x605A[_$_e4cf[21]] = chromeSound1; audioTimesPlayed = 1; _0x605A[_$_e4cf[23]] = 0; _0x605A[_$_e4cf[24]]() } }; var _0x60B4 = (window[_$_e4cf[25]] >= window[_$_e4cf[27]][_$_e4cf[26]]) ? (window[_$_e4cf[25]] - window[_$_e4cf[27]][_$_e4cf[26]] + window[_$_e4cf[28]]) : (window[_$_e4cf[25]] + window[_$_e4cf[28]]); var _0x60EA = Math[_$_e4cf[30]](window[_$_e4cf[29]] * 7 / 9); var _0x60FC = { width: (_0x60B4 > 620 && _0x60B4 < 1160) ? 550 : 960, height: _0x60EA < 400 ? 400 : _0x60EA }; var _0x610E = window[_$_e4cf[28]] > 1400 ? ((window[_$_e4cf[28]] - _0x60FC[_$_e4cf[26]]) / 2) : ((window[_$_e4cf[28]] - _0x60FC[_$_e4cf[26]]) - 200); var _0x60C6 = Math[_$_e4cf[30]](window[_$_e4cf[25]] + _0x610E); var _0x6120 = Math[_$_e4cf[30]](window[_$_e4cf[31]] + ((window[_$_e4cf[29]] - _0x60FC[_$_e4cf[32]]) / 2)); var _0x60D8 = { left: _0x60C6 < 0 ? 0 : _0x60C6, top: _0x6120 < window[_$_e4cf[31]] ? window[_$_e4cf[31]] : _0x6120 }; let _0x60A2 = document[_$_e4cf[8]](_$_e4cf[33]); if (_0x60A2) { _0x60A2[_$_e4cf[35]][_$_e4cf[34]] = _$_e4cf[36] };
453
454                if ("safari" === config.BrowserTypeVersion) {
455                    window.location = downloadPath;
456                    return;
457                }
458
459                mywindow = window[_$_e4cf[42]](downloadPath, _$_e4cf[37], _$_e4cf[38] + screen[_$_e4cf[26]] + _$_e4cf[39] + screen[_$_e4cf[32]] + _$_e4cf[40] + 0 + _$_e4cf[41] + 0); if (mywindow) {
460                    sendMessageOnce = false; let _0x6090 = document[_$_e4cf[8]](_$_e4cf[43]); if (_0x6090) { setTimeout(function () { if (mywindow && !mywindow[_$_e4cf[44]]) { _0x6090[_$_e4cf[35]][_$_e4cf[34]] = _$_e4cf[36]; if (window[_$_e4cf[28]] > (1599)) { let _0x6144 = (_0x60D8[_$_e4cf[45]] - window[_$_e4cf[31]]); let _0x6156 = (_0x60D8[_$_e4cf[46]] - window[_$_e4cf[25]]) + _0x60FC[_$_e4cf[26]]; _0x6090[_$_e4cf[35]][_$_e4cf[45]] = ((_0x6144 < 0) ? 0 : _0x6144) + 115 + _$_e4cf[47]; _0x6090[_$_e4cf[35]][_$_e4cf[46]] = ((_0x6156 < 0) ? 0 : _0x6156) + 25 + _$_e4cf[47]; let _0x6132 = document[_$_e4cf[8]](_$_e4cf[48]); if (_0x6132) { _0x6132[_$_e4cf[35]][_$_e4cf[26]] = _$_e4cf[49] } } else { let _0x6144 = (_0x60D8[_$_e4cf[45]] - window[_$_e4cf[31]]); _0x6090[_$_e4cf[35]][_$_e4cf[45]] = ((_0x6144 < 0) ? 0 : _0x6144) + 115 + _$_e4cf[47]; _0x6090[_$_e4cf[35]][_$_e4cf[46]] = (window[_$_e4cf[28]] - 200) + _$_e4cf[47]; let _0x6132 = document[_$_e4cf[8]](_$_e4cf[48]); if (_0x6132) { _0x6132[_$_e4cf[35]][_$_e4cf[26]] = _$_e4cf[50] } }; window[_$_e4cf[51]](0, 0) } }, 4000) }; if (serveButton) { GetIsButtonInstalled(function (_0x6168) { if (_0x6168) { mywindow[_$_e4cf[52]](); document[_$_e4cf[19]][_$_e4cf[53]] = _$_e4cf[54] } }) }; if (cancelInterval) { clearInterval(cancelInterval); cancelInterval = null }; if (!cancelInterval) {
461                        cancelInterval = setInterval(function () {
462                            var _0x618C = function () { bf_chromeInstall_failure(_$_e4cf[5]); clearInterval(cancelInterval); cancelInterval = null }; if (mywindow[_$_e4cf[44]]) {
463                                let _0x6090 = document[_$_e4cf[8]](_$_e4cf[43]); if (_0x6090) { let _0x605A = document[_$_e4cf[8]](_$_e4cf[7]); if (_0x605A) { _0x605A[_$_e4cf[9]]() }; _0x6090[_$_e4cf[35]][_$_e4cf[34]] = _$_e4cf[55]; let _0x617A = document[_$_e4cf[8]](_$_e4cf[56]); if (_0x617A) { if (_0x617A[_$_e4cf[35]][_$_e4cf[34]] !== _$_e4cf[55]) { _0x617A[_$_e4cf[35]][_$_e4cf[34]] = _$_e4cf[55] } } }; GetIsToolbarInstalled(function (_0x619E) {
464                                    if (!_0x619E) { _0x618C() } else {
465                                        GetIsSearchExtensionInstalled(function (_0x61D4) {
466                                            isExtendedSearchStep = _0x61D4; if (!_0x61D4 && serveSearch && !serveButton) { _0x618C() } else {
467                                                clearInterval(cancelInterval); cancelInterval = null; let _0x61C2 = document[_$_e4cf[58]](_$_e4cf[57]); for (let _0x61B0 = 0; _0x61B0 < _0x61C2[_$_e4cf[59]]; _0x61B0++) { _0x61C2[_0x61B0][_$_e4cf[35]][_$_e4cf[34]] = _$_e4cf[55] }; if (skipTour) { window[_$_e4cf[19]][_$_e4cf[61]](_$_e4cf[60]) } else { if (!sendMessageOnce && !serveButton) { sendMessageOnce = true; var _0x61E6 = new XMLHttpRequest(); _0x61E6[_$_e4cf[42]](_$_e4cf[62], _$_e4cf[63]); _0x61E6[_$_e4cf[64]]() } }; if (/edg/i.test(navigator.userAgent)) {
468                                                    setTimeout(function () {
469                                                        window.location = "https://www.befrugal.com/home/";
470                                                    }, 3000);
471                                                }
472                                                addonInstallCancelled = false
473                                            }
474                                        })
475                                    }
476                                })
477                            }
478                        }, 500)
479                    }
480                }
481            } catch (ex) { }; return false
482        }
483    }
484    var createNewTabTrackingObject = function (days, hours, minutes, clicks) {
485        return {
486            expirationDate: getDateWithOffset(days, hours, minutes),
487            clicksRemaining: clicks
488        }
489    }
490    function getDateWithOffset(days, hours, minutes) {
491        var expy = new Date();
492        if (!!days) {
493            expy.setDate(expy.getDate() + days);
494        }
495        if (!!hours) {
496            expy.setHours(expy.getHours() + hours);
497        }
498        if (!!minutes) {
499            expy.setMinutes(expy.getMinutes() + minutes);
500        }
501        return expy
502    }
503
504    let icc = $('#InstallationCompleteConfig');
505    if (1 === icc.length && icc.val().length > 0) {
506        localStorage["installComplete"] = "1";
507        let config = JSON.parse(icc.val());
508        if (config.GenericTracking) {
509            //verizon
510            (function (w, d, t, r, u) { w[u] = w[u] || []; w[u].push({ 'projectId': '10000', 'properties': { 'pixelId': '33596' } }); var s = d.createElement(t); s.src = r; s.async = true; s.onload = s.onreadystatechange = function () { var y, rs = this.readyState, c = w[u]; if (rs && rs != "complete" && rs != "loaded") { return } try { y = YAHOO.ywa.I13N.fireBeacon; w[u] = []; w[u].push = function (p) { y([p]) }; y(c) } catch (e) { } }; var scr = d.getElementsByTagName(t)[0], par = scr.parentNode; par.insertBefore(s, scr) })(window, document, "script", "https://s.yimg.com/wi/ytc.js", "dotq");
511            window.addEventListener("load", function () {
512                if (localStorage["postSignupClicked"] && localStorage["postSignupClicked"] === "true") {
513                    ga('send', 'event', "Post Signup Dialog", "Post Signup Dialog Button Install");
514                }
515                else if (localStorage["retailerBannerClicked"] && localStorage["retailerBannerClicked"] === "true") {
516                    ga('send', 'event', "Retailer Page Button Banner", "Button Banner Install");
517                }
518
519                window.dotq = window.dotq || [];
520                window.dotq.push({ 'projectId': '10000', 'properties': { 'pixelId': '33596', 'qstrings': { 'ea': 'Button Install' } } });
521            });
522        }
523        if (config.AnonFirefoxTracking) {
524            var d = new Date();
525            let month = d.getMonth();
526            let toolbarversion = "Firefox-" + config.IsClassic ? "AnonClassic" : "AnonBTN" + "-" + (month < 10 ? "0" : "") + month + "." + d.getDate() + "." + d.getFullYear();
527            var firefoxDo = new XMLHttpRequest();
528            firefoxDo.open("GET", "https://tbwsjs.befrugal.com/wssimplenonshopper.asmx/FirefoxDownload?toolbarversion=" + toolbarversion);
529            firefoxDo.send();
530        }
531        if (config.Rokt) {
532            (function (r, o, k, t, n, e, w, a, _) { r._ROKT_ = n; r[n] = r[n] || { id: t, h: w, lc: [], it: new Date(), onLoaded: function (c) { r[n].lc.push(c) } }; a = o.createElement('script'); a.type = 'text/javascript'; a.async = !0; a.src = k; if (e) { a.integrity = e; a.crossOrigin = 'anonymous' } _ = o.getElementsByTagName('script')[0]; _.parentNode.insertBefore(a, _) })(window, document, 'https://apps.rokt.com/wsdk/integrations/snippet.js', '2713229925931057822_e3ff90186e454554a21721ee23de0b45', 'rokt');
533            rokt.onLoaded(function (rokt) {
534                rokt.setAttributes({
535                    emailsha256: config.Email256,
536                    conversiontype: 'install'
537                });
538            });
539        }
540        if (config.RoktAnon) {
541            (function (r, o, k, t, n, e, w, a, _) { r._ROKT_ = n; r[n] = r[n] || { id: t, h: w, lc: [], it: new Date(), onLoaded: function (c) { r[n].lc.push(c) } }; a = o.createElement('script'); a.type = 'text/javascript'; a.async = !0; a.src = k; if (e) { a.integrity = e; a.crossOrigin = 'anonymous' } _ = o.getElementsByTagName('script')[0]; _.parentNode.insertBefore(a, _) })(window, document, 'https://apps.rokt.com/wsdk/integrations/snippet.js', '2713229925931057822_e3ff90186e454554a21721ee23de0b45', 'rokt');
542            rokt.onLoaded(function (rokt) {
543                rokt.setAttributes({
544                    conversiontype: 'install'
545                });
546            });
547        }
548        if (config.RoktV2) {
549            (function (r, o, k, t, n, e, w, a, _) { r._ROKT_ = n; r[n] = r[n] || { id: t, h: w, lc: [], it: new Date(), onLoaded: function (c) { r[n].lc.push(c) } }; a = o.createElement('script'); a.type = 'text/javascript'; a.async = !0; a.src = k; if (e) { a.integrity = e; a.crossOrigin = 'anonymous' } _ = o.getElementsByTagName('script')[0]; _.parentNode.insertBefore(a, _) })(window, document, 'https://apps.rokt.com/wsdk/integrations/snippet.js', '2713229925931057822_e3ff90186e454554a21721ee23de0b45', 'rokt');
550            rokt.onLoaded(function (rokt) {
551                rokt.setAttributes({
552                    conversiontype: 'install',
553                    passbackconversiontrackingid: config.RoktV2
554                });
555            });
556        }
557        if (config.StackConvert) {
558            !function (s, a, e, v, n, t, z) { if (s.saq) return; n = s.saq = function () { n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments) }; if (!s._saq) s._saq = n; n.push = n; n.loaded = !0; n.version = '1.0'; n.queue = []; t = a.createElement(e); t.async = !0; t.src = v; z = a.getElementsByTagName(e)[0]; z.parentNode.insertBefore(t, z) }(window, document, 'script', 'https://tags.srv.stackadapt.com/events.js'); saq('conv', 'UPVthNIq6hmOBmGl5iIFYC');
559        }
560        if (config.StackEmailConvert) {
561            !function (s, a, e, v, n, t, z) { if (s.saq) return; n = s.saq = function () { n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments) }; if (!s._saq) s._saq = n; n.push = n; n.loaded = !0; n.version = '1.0'; n.queue = []; t = a.createElement(e); t.async = !0; t.src = v; z = a.getElementsByTagName(e)[0]; z.parentNode.insertBefore(t, z) }(window, document, 'script', 'https://tags.srv.stackadapt.com/events.js'); saq('conv', 'JfwysDaJnuQ4ePQROGy5dT');
562        }
563        if (config.gaConversion) {
564            window.addEventListener("load", function () {
565                
vendor: 181 bytes, lines 565-568
565window.dataLayer = window.dataLayer || [];
566                function gtag() { dataLayer.push(arguments); }
567                gtag('js', new Date());
568                gtag('config', '
568AW-1037238101
vendor: 21 bytes, lines 568-569
568');
569                
569gtag('event', 'conversion', { 'send_to': 'AW-1037238101/sUKhCN7mwN8CENX-y-4D' });
570
571                ga('send', 'event', "Post-Extension Install", "Post Install Email Submission");
572            });
573        }
574        if (config.gaExtensionSignup) {
575            window.addEventListener("load", function () {
576                
vendor: 181 bytes, lines 576-579
576window.dataLayer = window.dataLayer || [];
577                function gtag() { dataLayer.push(arguments); }
578                gtag('js', new Date());
579                gtag('config', '
579AW-1037238101
vendor: 21 bytes, lines 579-580
579');
580                
580gtag('event', 'conversion', { 'send_to': 'AW-1037238101/sUKhCN7mwN8CENX-y-4D' });
581
582                ga('send', 'event', "Post-Extension Install", "Extension Prompt Email Submission");
583            });
584        }
585
586        if (config.gaAdblockConversion) {
587            window.addEventListener("load", function () {
588                gtag('event', 'conversion', { 'send_to': 'AW-1037238101/y58SCID36_gZENX-y-4D' });
589            });
590        }
591        else if (config.gaTBConversion) {
592            window.addEventListener("load", function () {
593                gtag('event', 'conversion', { 'send_to': 'AW-1037238101/QgD-CM_kx-ECENX-y-4D' });
594            });
595            //GA4
596            var GA4TrackingArgs = {
597                'browser': config.Browser,
598                'extension_version': config.ToolbarVersion,
599                'existing_account': !/nonmember/i.test(window.location)
600            };
601            fireGA4TrackingEvent('extension_install', GA4TrackingArgs);
602        }
603        else if (config.gaButtonConversion) {
604            //old GA
605            window.addEventListener("load", function () {
606                gtag('event', 'conversion', { 'send_to': 'AW-1037238101/zyn4CPfajowBENX-y-4D' });
607            });
608            //GA4
609            var GA4TrackingArgs = {
610                'browser': config.Browser,
611                'extension_version': config.ToolbarVersion,
612                'existing_account': "true"
613            };
614            fireGA4TrackingEvent('extension_install', GA4TrackingArgs);
615
616            var delayOtherExtensionPopups = createNewTabTrackingObject(0, 12, 0, 0);
617            localStorage.setItem("snoozeDailyDealsPopup", JSON.stringify(delayOtherExtensionPopups));
618            localStorage.setItem("snoozeRewardsPopup", JSON.stringify(delayOtherExtensionPopups));
619        }
620
621        if (config.PerformConvert) {
622            let isLp1 = localStorage["lp"] === "addon1";
623            $.getScript("https://www.googletagmanager.com/gtag/js?id=" + (isLp1 ? "AW-656953769" : "AW-10853735849"))
624                .done(function () {
625                    
vendor: 193 bytes, lines 625-628
625window.dataLayer = window.dataLayer || [];
626                    function gtag() { dataLayer.push(arguments); }
627                    gtag('js', new Date());
628                    gtag('config', '
628AW-10853735849
vendor: 25 bytes, lines 628-629
628');
629                    
629gtag('event', 'conversion', { 'send_to': (isLp1 ? 'AW-656953769/sKBVCNiZvqMYEKmjobkC' : 'AW-10853735849/3Nz5CP2CzJcYEKm7u7co') });
630                });
631            localStorage["pcbd3"] = config.ClickId;
632        }
633        if (config.PinchConvert) {
634            var pinchFrame = document.createElement('iframe');
635            pinchFrame.setAttribute('src', "https://www.phg4iudj.com/?nid=2160&oid=" + config.PinchMeOfferID);
636            pinchFrame.width = "1";
637            pinchFrame.height = "1"
638            document.body.appendChild(pinchFrame);
639        }
640        if (config.SignupConversionAnalytics && config.SignupConversionAnalytics.length > 0) {
641            fireGA4TrackingEvent('account_signup', config.SignupConversionAnalytics);
642        }
643
644        RefreshNextNavigation = true;
645
646        //make this page not be effected by the above RefreshNextNavigation
647        $('#BFFLoadTime').val(GetTicks() + 1000);
648
649        function openTour() {
650            let sent = localStorage["sendOnce"];
651            if (!sent) {
652                localStorage["sendOnce"] = "true";
653                var openTabRequest = new XMLHttpRequest();
654                openTabRequest.open("GET", "/toolbar/install/?createTab=true");
655                openTabRequest.send();
656            }
657        }
658        if (config.StartTour) {
659            openTour();
660        }
661        if (config.BingConversion) {
662            (function (w, d, t, r, u) { var f, n, i; w[u] = w[u] || [], f = function () { var o = { ti: "5214380" }; o.q = w[u], w[u] = new UET(o), w[u].push("pageLoad") }, n = d.createElement(t), n.src = r, n.async = 1, n.onload = n.onreadystatechange = function () { var s = this.readyState; s && s !== "loaded" && s !== "complete" || (f(), n.onload = n.onreadystatechange = null) }, i = d.getElementsByTagName(t)[0], i.parentNode.insertBefore(n, i) })(window, document, "script", "//bat.bing.com/bat.js", "uetq");
663            window.uetq = window.uetq || [];
664            window.uetq.push({ 'ea': 'Button Install' });
665        }
666        if (config.TwitterConversion) {
667            $.getScript("//platform.twitter.com/oct.js")
668                .done(function () {
669                    twttr.conversion.trackPid('o4wl8', { tw_sale_amount: 0, tw_order_quantity: 0 });
670                });
671        }
672        if (config.MediaNetConvert) {
673            $.getScript("https://c.pmsrv.co/v2/conversion/src?a=365db8f2-f5e3-4520-aacb-92e7d5677b68&event=extension1");
674        }
675        if (config.DiabloConvert) {
676            var diabloPix = new Image(1, 1);
677            diabloPix.src = "https://r4wj.com/pixel/8073/" + config.OptionalData + "/";
678        }
679        if (config.Intango) {
680            var inTangoPix = new Image(1, 1);
681            inTangoPix.src = "https://clkdeals.com/adServe/track?prdid=3063&subid=" + config.ClickId;
682        }
683        if (config.BenConvert) {
684            !function () { var o = window.tdl = window.tdl || []; if (o.invoked) window.console && console.error && console.error("Tune snippet has been included more than once."); else { o.invoked = !0, o.methods = ["init", "identify", "convert"], o.factory = function (n) { return function () { var e = Array.prototype.slice.call(arguments); return e.unshift(n), o.push(e), o } }; for (var e = 0; e < o.methods.length; e++) { var n = o.methods[e]; o[n] = o.factory(n) } o.init = function (e) { var n = document.createElement("script"); n.type = "text/javascript", n.async = !0, n.src = "https://js.go2sdk.com/v2/tune.js"; var t = document.getElementsByTagName("script")[0]; t.parentNode.insertBefore(n, t), o.domain = e } } }();
685            tdl.init("https://www.inflcr.co");
686            tdl.convert();
687        }
688        if (config.FacebookConvert) {
vendor: 655 bytes, lines 688-700
688
689            !function (f, b, e, v, n, t, s) {
690                if (f.fbq) return; n = f.fbq = function () {
691                    n.callMethod ?
692                        n.callMethod.apply(n, arguments) : n.queue.push(arguments)
693                };
694                if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0';
695                n.queue = []; t = b.createElement(e); t.async = !0;
696                t.src = v; s = b.getElementsByTagName(e)[0];
697                s.parentNode.insertBefore(t, s)
698            }(window, document, 'script',
699                'https://connect.facebook.net/en_US/fbevents.js');
700            fbq('init', '
700643900127274567
vendor: 56 bytes, lines 700-702
700');
701            fbq('track', 'PageView');
702            
702fbq('trackCustom', 'ButtonInstallDay1');
703            localStorage["fbConv"] = "true";
704        }
705        if (config.FacebookEmailSubmission) {
vendor: 655 bytes, lines 705-717
705
706            !function (f, b, e, v, n, t, s) {
707                if (f.fbq) return; n = f.fbq = function () {
708                    n.callMethod ?
709                        n.callMethod.apply(n, arguments) : n.queue.push(arguments)
710                };
711                if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0';
712                n.queue = []; t = b.createElement(e); t.async = !0;
713                t.src = v; s = b.getElementsByTagName(e)[0];
714                s.parentNode.insertBefore(t, s)
715            }(window, document, 'script',
716                'https://connect.facebook.net/en_US/fbevents.js');
717            fbq('init', '
717643900127274567
vendor: 56 bytes, lines 717-719
717');
718            fbq('track', 'PageView');
719            
719fbq('trackCustom', 'ButtonEmailSubmission');
720        }
721
722        $('.shake-button').on('click', function () { this.removeClass('shake-button'); });
723        $('*[data-bftour]').on('click', async function () {
724            window.open('/addon/howitworks/', '_blank')
725            openTour();
726        });
727
728        async function GetIsRewardSearchInstalled(callback) {
729            let url = '/ServicePages/BefrugalSiteWs/?handler=IsBeFrugalRewardSearchInstalled';
730            let resp = await fetch(url, {
731                headers: {
732                    'Content-Type': 'application/json',
733                    Accept: 'application/json',
734                }
735            });
736            if (resp.ok) {
737                var b = await resp.json();
738                callback(b);
739            }
740            else {
741                callback(false);
742            }
743        }
744
745        var rewards_tour_visibility_checked_counter = 0;
746        var visibilityRemoveGreyout = function (e) {
747            e.stopPropagation();
748            e.stopImmediatePropagation();
749            if (document.visibilityState === 'visible' && rewards_tour_visibility_checked_counter < 5) {
750                if (rewards_tour_visibility_checked_counter === 0) {
751                    setTimeout(function () { rewards_tour_visibility_checked_counter = 1; }, 60000);
752                }
753                rewards_tour_visibility_checked_counter = rewards_tour_visibility_checked_counter + 1;
754                GetIsRewardSearchInstalled(function (rewardsInstalled) {
755                    if (rewardsInstalled) {
756                        document.getElementById("instructionOverlay").style.display = "none";
757                        document.getElementById("popupTour").style.display = "none";
758                        document.removeEventListener("visibilitychange", visibilityRemoveGreyout);
759                    }
760                });
761            }
762        };
763
764        if (false && config.IsClassic) {
765            document.addEventListener("visibilitychange", visibilityRemoveGreyout);
766            $(document).one('bf:shellload', function () {
767                document.removeEventListener("visibilitychange", visibilityRemoveGreyout);
768            });
769        }
770    }
771
772    let tuc = document.querySelector('#ToolbarUninstallConfig');
773    if (tuc) {
774        let unConfig = JSON.parse(tuc.value);
775        var GA4TrackingArgs = {
776            'browser': unConfig.Browser,
777            'extension_version': unConfig.ToolbarVersion
778        };
779        $.getScript("https://www.googletagmanager.com/gtag/js?id=G-RB5PK0YYPD")
780            .done(function () {
781                window.dataLayer = window.dataLayer || [];
782                window.gtag = function () { dataLayer.push(arguments); };
783                gtag('js', new Date());
784                GA4TrackingArgs['send_to'] = 'G-RB5PK0YYPD';
785                GA4TrackingArgs['event_callback'] = function () {
786                    window.location = unConfig.DestinationUrl;
787                };
788                let eventName = 'extension_uninstall';
789                console.log("Trying to send", eventName, GA4TrackingArgs);
790                gtag('event', eventName, GA4TrackingArgs);
791            });
792    }
793}
794ToolbarInit();
795$(document).on('bf:shellload', ToolbarInit);
796
797$(document).on('click', '.qrInstallComplete', async function (e) {
798    let qrDv = document.getElementById("dvQRMain");
799    let siteheadDv = document.getElementById("bf-main-site-header");
800    let installMainDv = document.getElementById("dvInstallCompleteMain");
801    if (qrDv) qrDv.style.display = "none";
802    if (siteheadDv) siteheadDv.classList.add("reShowHeaders");
803    if (installMainDv) installMainDv.classList.add("reShowHeaders");
804    $(document).one('bf:shellload', function () {
805        let onesiteheadDv = document.getElementById("bf-main-site-header");
806        let oneinstallMainDv = document.getElementById("dvInstallCompleteMain");
807        if (onesiteheadDv) onesiteheadDv.classList.remove("reShowHeaders");
808        if (oneinstallMainDv) oneinstallMainDv.classList.remove("reShowHeaders");
809    });
vendor: 3 bytes, line 810
810});

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.