PageSourceSearch

https://connectmebetter.com/assets/connectmebetter.com/wp-content/…/connect-me-better/js/custom-74aaf12835.js

js connectmebetter.com collected 2026-10-08 16:31:55 UTC 3,580 bytes, 99 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opener = _____WB$wombat$assign$function_____("opener");
10
11/**
12 * Dynamic query parameter appending for get deal button in https://connectmebetter.com/amazon/amazonbusiness/signup/
13 */
14
15const button = document.getElementById('get-deal-amazon-button');
16
17if (button) {
18    // Get the current URL
19    const currentUrl = new URL(window.location.href);
20
21    // Check if the URL has the 'agentcode' query parameter
22    const agentcode = currentUrl.searchParams.get('agentcode');
23
24    if (agentcode) {
25        // Append the 'agentcode' parameter to the button's URL
26        button.href = `${button.href}${agentcode}`;
27    }
28}
29
30let mobileButtonGetDeal = document.getElementById('get-deal-mobile-amazon-button');
31
32if (mobileButtonGetDeal) {
33    // Get the current URL
34    let appendUrl = new URL(window.location.href);
35
36    // Check if the URL has the 'agentcode' query parameter
37    let appendCode = appendUrl.searchParams.get('agentcode');
38
39    if (appendCode) {
40        // Append the 'agentcode' parameter to the button's URL
41        mobileButtonGetDeal.href = `${mobileButtonGetDeal.href}${appendCode}`;
42    }
43}
44
45
46/**
47 * Change amazon page url based on language selected
48 */
49let amazonButton = document.getElementById('amazon-click-here-btn');
50if (amazonButton) {
51    // Update the href based on the document's language
52    if (document.documentElement.lang === 'fr') {
53        amazonButton.href = 'https://business.amazon.ca/en/cp/amazon-business-in-person-registration';
54    } 
55    else {
56        amazonButton.href = 'https://business.amazon.com/en/cp/amazon-business-in-person-registration';
57    }
58}
59
60
61document.addEventListener('click', function(event) {
62    // Check if the clicked element is inside the '.gtranslate_wrapper a'
63    let target = event.target.closest('.gtranslate_wrapper a');
64    if (!target) return;
65
66    let amazonButton = document.getElementById('amazon-click-here-btn');
67    if (amazonButton) {
68        // Update the href based on the document's language
69        if (target.getAttribute('data-gt-lang') == 'fr') {
70            amazonButton.href = 'https://business.amazon.ca/en/cp/amazon-business-in-person-registration';
71        } 
72        else {
73            amazonButton.href = 'https://business.amazon.com/en/cp/amazon-business-in-person-registration';
74        }
75    }
76});
77}
78
79/*
80     FILE ARCHIVED ON 06:23:30 Jul 11, 2025 AND RETRIEVED FROM THE
81     INTERNET ARCHIVE ON 09:04:57 Aug 06, 2026.
82     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
83
84     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
85     SECTION 108(a)(3)).
86*/
87/*
88playback timings (ms):
89  captures_list: 0.611
90  exclusion.robots: 0.082
91  exclusion.robots.policy: 0.069
92  esindex: 0.011
93  cdx.remote: 9.248
94  LoadShardBlock: 52.55 (3)
95  PetaboxLoader3.datanode: 57.243 (5)
96  PetaboxLoader3.resolve: 95.923 (3)
97  load_resource: 123.086
98  loaddict: 29.517
99*/

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.