PageSourceSearch

https://www.fisglobal.com/-/media/0879378669EF421AA88E8017E68384DF

js fisglobal.com collected 2026-09-27 20:53:57 UTC 12,870 bytes, 302 lines download raw bytes

1const productToasterMarkup = '<div class="component Toaster-Popup-Component">\n' +
2                        '<div class="component-content">\n' +
3                            '<div class="fis-toaster-wrapper fis-bg-white">\n' +
4                                '<div class="toaster-nav fis-bg-white">\n' +
5                                    '<div class="toaster-copy">\n' +
6                                        '<p class="field-collapsedtitle">Book a meeting</p>\n' +
7                                        '<i>\n' +
8                                            '<svg class="fis-icon fis-zoom-svg fis-svg-green">\n' +
9                                                '<use xlink:href="#fis-zoom-svg"></use>\n' +
10                                            '</svg>\n' +
11                                        '</i>\n' +
12                                    '</div>\n' +
13                                '</div>\n' +
14                                '<div class="close-btn">\n' +
15                                    '<svg class="fis-icon fis-close-svg">\n' +
16                                        '<use xlink:href="#fis-close-svg"></use>\n' +
17                                    '</svg>\n' +
18                                '</div>\n' +
19
20                                '<div class="toaster-copy-inner">\n' +
21                                    '<div class="img">\n' +
22                                        '<img src="/-/media/B13A552C8B9B47A1BBDFABEFF82892EC.ashx" alt="Woman working on a laptop">\n' +
23                                    '</div>\n' +
24                                    '<div class="content">\n' +
25                                        '<div class="toaster-title">Speak with a specialist</div>\n' +
26                                        '<p>Schedule an appointment with a dedicated specialist who can evaluate your business needs and develop a tailored plan to align with your objectives.</p>\n' +
27                                        '<a target="" class="toaster-cta btn-primary-green-on-dark" href="/solutions-contact?param=products/digital-one&amp;cta=toaster">Get in touch\n' +
28                                            '<svg class="fis-icon fis-icon-arrow fis-svg-green">\n' +
29                                                '<title></title>\n' +
30                                                '<use xlink:href="#fis-icon-arrow"></use>\n' +
31                                            '</svg>\n' +
32                                        '</a>\n' +
33                                    '</div>\n' +
34                                '</div>\n' +
35                            '</div>\n' +
36                        '</div>\n' +
37                    '</div>';
38
39const insightToasterMarkup = '<div class="component Toaster-Popup-Component">\n' +
40                    '<div class="component-content">\n' +
41                        '<div class="fis-toaster-wrapper fis-bg-white">\n' +
42                            '<div class="toaster-nav fis-bg-white">\n' +
43                                '<div class="toaster-copy">\n' +
44                                    '<p class="field-collapsedtitle">Report</p>\n' +
45                                    '<i>\n' +
46                                        '<svg class="fis-icon fis-zoom-svg fis-svg-green">\n' +
47                                            '<use xlink:href="#fis-zoom-svg"></use>\n' +
48                                        '</svg>\n' +
49                                    '</i>\n' +
50                                '</div>\n' +
51                            '</div>\n' +
52                            '<div class="close-btn">\n' +
53                                '<svg class="fis-icon fis-close-svg">\n' +
54                                    '<use xlink:href="#fis-close-svg"></use>\n' +
55                                '</svg>\n' +
56                            '</div>\n' +
57
58                            '<div class="toaster-copy-inner">\n' +
59                                '<div class="img">\n' +
60                                    '<img src="/-/media/14769AFDF7B84F379C57DC675AB75812.as
60hx" alt="Circular cropped image of a calm ocean on top of a stormy ocean">\n' +
61                                '</div>\n' +
62                                '<div class="content">\n' +
63                                    '<div class="toaster-title">Finding the financial upside in uncertainty</div>\n' +
64                                    '<p>Unlock strategies to help ease tensions and transform financial imbalance into opportunity in The Harmony Gap report.</p>\n' +
65                                    '<a target="" class="toaster-cta btn-primary-green-on-dark" href="/the-harmony-gap#Home">Learn more\n' +
66                                        '<svg class="fis-icon fis-icon-arrow fis-svg-green">\n' +
67                                            '<title></title>\n' +
68                                            '<use xlink:href="#fis-icon-arrow"></use>\n' +
69                                        '</svg>\n' +
70                                    '</a>\n' +
71                                '</div>\n' +
72                            '</div>\n' +
73                        '</div>\n' +
74                    '</div>\n' +
75                '</div>';                    
76
77// Function to add CSS file to head
78function addStylesheet(href) {
79  // Check if the stylesheet is already added
80  const existingLink = document.querySelector(`link[href="${href}"]`);
81  if (existingLink) {
82    //console.log('Stylesheet already exists:', href);
83    return; // Already exists, no need to add it again
84  }
85  
86  // Create link element
87  const link = document.createElement('link');
88  link.rel = 'stylesheet';
89  link.type = 'text/css';
90  link.href = href;
91  
92  // Append to the head
93  document.head.appendChild(link);
94  //console.log('Added stylesheet:', href);
95}
96
97
98  
99  
100
101  function buildToaster() {
102    addStylesheet('/~/-/media/BDF6EA42B4064838B64355F1D1BCB58D.ashx');
103    
104    // Create toaster container
105    const toasterContainer = document.createElement('div');
106    
107    // Insert the toaster markup
108
109
110if (window.location.pathname.includes('/products/')) {
111    toasterContainer.innerHTML = productToasterMarkup;
112} else if (window.location.pathname.includes('/insights/')) {
113    toasterContainer.innerHTML = insightToasterMarkup;
114}
115    // Find the link element that needs to be updated
116    const link = toasterContainer.querySelector('.toaster-copy-inner a');
117    if (link) {
118      // Get the current page path without domain
119      let pagePath = window.location.pathname;
120      
121      // Remove leading slash if it exists
122      if (pagePath.startsWith('/')) {
123        pagePath = pagePath.substring(1);
124      }
125      
126      // Create the dynamic parameter
127      const dynamicParam = '?param=' + pagePath + '&cta=toaster';
128      
129      // Get the base URL from the existing href
130      const hrefBase = link.getAttribute('href').split('?')[0];
131      
132      if (window.location.pathname.includes('/products/')) {
133      // Update the href with the new parameters
134      link.setAttribute('href', hrefBase + dynamicParam);
135
136      } else {
137        link.setAttribute('href', hrefBase);
138      }
139      
140      //console.log('Updated link with dynamic parameter:', dynamicParam);
141    }
142    
143    // Append to main element instead of body
144    const mainElement = document.querySelector('main');
145    if (mainElement) {
146      mainElement.appendChild(toasterContainer);
147    } else {
148      // Fallback to body if main not found
149      document.body.appendChild(toasterContainer);
150    }
151  }
152
153  function toasterFunctions() {
154    // Trigger click on toaster-nav after 10ms
155    setTimeout(function() {
156      // Simulate click on toaster-nav
157      const toasterNav = document.querySelector('.toaster-nav');
158      if (toasterNav) {
159        // Create and dispatch a click event
160        const clickEvent = new Event('click');
161        toasterNav.dispatchEvent(clickEvent);
162      }
163    }, 100);
164  
165    // Add click event listener to toaster-nav elements
166    const toasterNavElements = document.querySelectorAll('.toaster-nav');
167    toasterNavElements.forEach(function(element) {
168      element.addEventListener('click', function() {
169        // Toggle classes
170        document.querySelector('.fis-toaster-wrapper').classList.toggle('show');
171        this.classList.toggle('active');
172      });
173    });
174  
175    // Add click event listener to close button
176    const closeButtons = document.querySelectorAll('.close-btn');
177    closeButtons.forEach(function(button) {
178      button.addEventListener('click', function(e) {
179        // Remove classes
180        document.querySelector('.fis-toaster-wrapper').classList.remove('show');
181        document.querySelector('.toaster-nav').classList.remove('active');
182        
183        // Stop event propagation
184        e.stopPropagation();
185      });
186    });
187  }
188 
189  
190  document.addEventListener('DOMContentLoaded', function() {
191    // Function to check page path and add toaster if needed
192    function checkPathAndAddToaster() {
193      // 1. Check if the page path contains '/products/'
194      if (window.location.pathname.includes('/products/')) {
195        
196        // 2. Check if toaster component already exists
197        const existingToaster = document.querySelector('.Toaster-Popup-Component');
198        
199        // 3. If it doesn't exist, add it
200        if (!existingToaster) {
201          //console.log('Adding toaster to products page...');
202          
203          // Find the main element
204          const mainElement = document.querySelector('main');
205          
206          if (mainElement) {
207            // Build and add the toaster with dynamic path parameters
208            buildToaster();
209            
210            // Set up the toaster functionality
211            toasterFunctions();
212            
213            //console.log('Toaster added successfully');
214          } else {
215            //console.error('Main element not found');
216          }
217        } else {
218          // 4. Exit if toaster already exists
219          //console.log('Toaster already exists, no action taken');
220        }
221      } else if (window.location.pathname.includes('/insights/')) {
222        // 2. Check if toaster component already exists
223        const existingToaster = document.querySelector('.Toaster-Popup-Component');
224        
225        // 3. If it doesn't exist, add it
226        if (!existingToaster) {
227          //console.log('Adding toaster to products page...');
228          
229          // Find the main element
230          const mainElement = document.querySelector('main');
231          
232          if (mainElement) {
233            // Build and add the toaster with dynamic path parameters
234            buildToaster();
235            
236            // Set up the toaster functionality
237            toasterFunctions();
238            
239            //console.log('Toaster added successfully');
240          } else {
241            //console.error('Main element not found');
242          }
243        } else {
244          // 4. Exit if toaster already exists
245          //console.log('Toaster already exists, no action taken');
246        }
247      } else {
248//console.log('Not a products page, toaster not added');
249      }
250    }
251    
252    // Execute the check
253    checkPathAndAddToaster();
254  });
255  
256/* Toaster Hide Local Storage */
257(function () {
258  const VISIT_KEY = "site_has_visited";
259
260  function hasVisited() {
261    try { return localStorage.getItem(VISIT_KEY) === "true"; } catch { return false; }
262  }
263  function markVisited() {
264    try { localStorage.setItem(VISIT_KEY, "true"); } catch {}
265  }
266
267  function applyState() {
268    const wrapper = document.querySelector(".fis-toaster-wrapper");
269    const nav = document.querySelector(".toaster-nav");
270    const closeBtn = document.querySelector(".close-btn");
271    if (!wrapper) return;
272
273    const firstVisit = !hasVisited();
274
275    if (firstVisit) {
276      wrapper.classList.add("show");
277      if (nav) nav.classList.add("active");
278      if (closeBtn) {
279        closeBtn.addEventListener("click", function () {
280          wrapper.classList.remove("show");
281          if (nav) nav.classList.remove("active");
282          markVisited();
283        }, { once: true });
284      } else {
285        setTimeout(markVisited, 1200);
286      }
287    } else {
288      wrapper.classList.remove("show");
289      if (nav) nav.classList.remove("active");
290    }
291  }
292
293  if (document.readyState === "loading") {
294    document.addEventListener("DOMContentLoaded", applyState);
295  } else {
296    applyState();
297  }
298
299  const observer = new MutationObserver(() => applyState());
300  observer.observe(document.documentElement, { childList: true, subtree: true });
301})();
302/* Toaster Hide Local Storage */

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.