1"use strict"; 2 3document.addEventListener('DOMContentLoaded', function () { 4 const template_preview_btn = document.querySelector("button.ga-btn-bee-template-preview"); 5 const template_save_btn = document.querySelector("button.ga-btn-template-save"); 6 const template_save_exit_btn = document.querySelector("button.ga-btn-template-save-and-exit"); 7 8 if (template_preview_btn) { 9 template_preview_btn.addEventListener("click", function () { 10 createTemplatePreview(idOfCurrentClient); 11 }); 12 } 13 14 if (template_save_btn) { 15 template_save_btn.addEventListener("click", function () { 16 createTemplateSave(idOfCurrentClient); 17 }); 18 } 19 20 if (template_save_exit_btn) { 21 template_save_exit_btn.addEventListener("click", function () { 22 createTemplateFinish(idOfCurrentClient); 23 }); 24 } 25 26 const save_campaign_btn = document.querySelector('button.ga-btn-start-campaign'); 27 const save_campaign_draft_btn = document.querySelector('button.ga-btn-save-campaign-draft'); 28 29 if (save_campaign_btn) { 30 save_campaign_btn.addEventListener("click", createCampaignFinish); 31 } 32 33 if (save_campaign_draft_btn) { 34 save_campaign_draft_btn.addEventListener("click", createCampaignSaveDraft); 35 } 36 37 const btn_sanitize_list = document.querySelectorAll('button.btn-sanitize-list, button#btn-sanitize-list'); 38 const btn_export_list = document.querySelector('a.btn-export-list, a.btn-download-list'); 39 const btn_boost_list = document.querySelector('#btn-boost-list'); 40 41 if (btn_sanitize_list && btn_sanitize_list.length) { 42 btn_sanitize_list[0].addEventListener("click", sanitizeListEvent); 43 } 44 45 if (btn_export_list && btn_export_list.length) { 46 btn_export_list[0].addEventListener("click", exportListEvent); 47 } 48 49 if (btn_boost_list) { 50 btn_boost_list.addEventListener("click", listBoostedEvent); 51 } 52 53 /* path based triggers */ 54 const current_path = window.location.pathname; 55 /* path based triggers */ 56 57 let list_add_paths = ['/contact/getfromservice', '/contact/copypaste', '/contact/addonebyone', '/contact/upload']; 58 if (list_add_paths.includes(current_path)) { 59 createListStartEvent(); 60 } 61 62 const btn_save_list = document.querySelector('button.ga-btn-save-list'); 63 if (btn_save_list) { 64 createListFinishEevent(); 65 } 66 67 if (current_path.startsWith('/reports/overview/')) { 68 visitedCampaignReportsEvent(); 69 } 70 71 const btn_exportCampaign = document.querySelectorAll(".ga-export-campaign-reports"); 72 if (btn_exportCampaign && btn_exportCampaign.length) { 73 for (let i = 0; i < btn_exportCampaign.length; i++) { 74 btn_exportCampaign[i].addEventListener("click", exportedCampaignReportsEvents); 75 } 76 } 77 78 if (current_path.startsWith('/featureplan/')) { 79 planUpgradeNeededEvent(current_path.replace('/featureplan/', '')); 80 } 81 82 const btn_upgrade = document.querySelector('.ga-upgrade-btn'); 83 if (btn_upgrade) { 84 btn_upgrade.addEventListener("click", upgradeProcessStartedEvent); 85 } 86 87 if (current_path.startsWith('/templateinbox/preview/')) { 88 usedInboxPreviewEvent(); 89 } 90 91 if (current_path.startsWith('/templatespam/check/')) { 92 usedSpamDoctorEvent(); 93 } 94 95 const btn_create_tag = document.querySelector('button.ga-create-tag-btn'); 96 if (btn_create_tag) { 97 btn_create_tag.addEventListener("click", createdTagEvent); 98 } 99 100 const btn_save_segment = document.querySelector('button.ga-save-segment-btn'); 101 if (btn_save_segment) { 102 btn_save_segment.addEventListener("click", createdSegmentEvent); 103 } 104 105 const btn_save_landingpage = document.querySelector('button.ga-save-landingpage-btn'); 106 if (btn_save_landingpage) { 107 btn_save_landingpage.addEventListener("click", createdLandingPageEvent); 108 } 109 110 const btn_publish_landingpage = document.querySelector('button.ga-publish-langinpage'); 111 if (btn_publish_landingpage) { 112 btn_publish_landingpage.addEventListener("click", publishedLandingPageEvent); 113 } 114 115 if (current_path.startsWith('/integrations/plugins')) { 116 visitedPluginsPage(); 117 } 118 119 const btn_wp_plugin = document.querySelector("a.ga-visit-wordpress-plugin"); 120 if (btn_wp_plugin) { 121 btn_wp_plugin.addEventListener("click", visitedWordpressPlugin); 122 } 123 124 if (current_path.startsWith('/integrations/apikeys')) { 125 visitedApiPage(); 126 } 127 128 const btn_confirm_sender = document.querySelector("button.ga-confirm-sender"); 129 if (btn_confirm_sender) { 130 btn_confirm_sender.addEventListener("click", addedSenderAddressEvent); 131 } 132 133 if (current_path === '/domain/authenticate') { 134 addedConnectedDomain(); 135 } 136 137 const btn_update_footer = document.querySelector("button.ga-update-footer-btn"); 138 if (btn_update_footer) { 139 btn_update_footer.addEventListener("click", customizedFooterEvent); 140 } 141 142 const onboarding_get_started_btn = document.querySelector("#onboarding-get-started-btn"); 143 const onboarding_dont_show_this_again_btn = document.querySelector("#onboarding-dont-show-this-again-btn"); 144 const onboarding_close_modal_btn = document.querySelector("#onboarding-close-modal-btn"); 145 146 if (onboarding_get_started_btn) { 147 onboarding_get_started_btn.addEventListener("click", function () { 148 onbaordingGetStarted(idOfCurrentClient); 149 }); 150 } 151 152 if (onboarding_dont_show_this_again_btn) { 153 onboarding_dont_show_this_again_btn.addEventListener("click", function () { 154 onbaordingDontShowModalAgain(idOfCurrentClient); 155 }); 156 } 157 158 if (onboarding_close_modal_btn) { 159 onboarding_close_modal_btn.addEventListener("click", function () { 160 onbaordingCloseModal(idOfCurrentClient); 161 }); 162 } 163 164});
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.