|
| 1 | +// this code is related to implementing the A/B testing tool VMO: https://vwo.com/ |
| 2 | +/* eslint-disable */ |
| 3 | +// @ts-nocheck |
| 4 | +export const executeVWO = () => { |
| 5 | + window._vwo_code = |
| 6 | + window._vwo_code || |
| 7 | + (function() { |
| 8 | + var account_id = 634566, |
| 9 | + settings_tolerance = 2000, |
| 10 | + library_tolerance = 2500, |
| 11 | + use_existing_jquery = false, |
| 12 | + is_spa = 1, |
| 13 | + hide_element = 'body', |
| 14 | + /* DO NOT EDIT BELOW THIS LINE */ |
| 15 | + f = false, |
| 16 | + d = document, |
| 17 | + code = { |
| 18 | + use_existing_jquery: function() { |
| 19 | + return use_existing_jquery |
| 20 | + }, |
| 21 | + library_tolerance: function() { |
| 22 | + return library_tolerance |
| 23 | + }, |
| 24 | + finish: function() { |
| 25 | + if (!f) { |
| 26 | + f = true |
| 27 | + var a = d.getElementById('_vis_opt_path_hides') |
| 28 | + if (a) a.parentNode.removeChild(a) |
| 29 | + } |
| 30 | + }, |
| 31 | + finished: function() { |
| 32 | + return f |
| 33 | + }, |
| 34 | + load: function(a) { |
| 35 | + var b = d.createElement('script') |
| 36 | + b.src = a |
| 37 | + b.type = 'text/javascript' |
| 38 | + b.innerText |
| 39 | + b.onerror = function() { |
| 40 | + window._vwo_code.finish() |
| 41 | + } |
| 42 | + d.getElementsByTagName('head')[0].appendChild(b) |
| 43 | + }, |
| 44 | + init: function() { |
| 45 | + window.settings_timer = setTimeout(function() { |
| 46 | + window._vwo_code.finish() |
| 47 | + }, settings_tolerance) |
| 48 | + var a = d.createElement('style'), |
| 49 | + b = hide_element |
| 50 | + ? hide_element + |
| 51 | + '{opacity:0 !important;filter:alpha(opacity=0) !important;background:none !important;}' |
| 52 | + : '', |
| 53 | + h = d.getElementsByTagName('head')[0] |
| 54 | + a.setAttribute('id', '_vis_opt_path_hides') |
| 55 | + a.setAttribute('type', 'text/css') |
| 56 | + if (a.styleSheet) a.styleSheet.cssText = b |
| 57 | + else a.appendChild(d.createTextNode(b)) |
| 58 | + h.appendChild(a) |
| 59 | + this.load( |
| 60 | + 'https://dev.visualwebsiteoptimizer.com/j.php?a=' + |
| 61 | + account_id + |
| 62 | + '&u=' + |
| 63 | + encodeURIComponent(d.URL) + |
| 64 | + '&f=' + |
| 65 | + +is_spa + |
| 66 | + '&r=' + |
| 67 | + Math.random() |
| 68 | + ) |
| 69 | + return window.settings_timer |
| 70 | + }, |
| 71 | + } |
| 72 | + window._vwo_settings_timer = code.init() |
| 73 | + return code |
| 74 | + })() |
| 75 | +} |
0 commit comments