1var AgentFy = (function () { 2 var agentfy_data = []; 3 var init = async function (callback = '') { 4 5 var metaTag = document.querySelector('meta[name="agentfy_data"]'); 6 if (!metaTag) { 7 console.error('Meta tag agentfy_data not found'); 8 return; 9 } 10 11 var json; 12 try { 13 console.log(metaTag.getAttribute('content')) 14 json = JSON.parse(metaTag.getAttribute('content')); 15 } catch (e) { 16 console.error('Error parsing agentfy_data:', e); 17 return; 18 } 19 20 agentfy({ 21 agentId: json['agentId'], 22 apiKey: json['code'], 23 ...json['options'], 24 header: { 25 color: "#05B6F0", 26 textColor: "#FFFFFF", 27 closeButton: "style2" 28 }, 29 promotion: { 30 url: "https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=46749" 31 }, 32 footer: { 33 input: { 34 placeholder: "Ask anything..." 35 }, 36 button: { 37 color: "#05B6F0" 38 } 39 }, 40 questions: [ 41 "What is the best quick checkout Extension?", 42 "How to install OpenCart?", 43 "What are the benefits of using OpenCart Cloud?", 44 "How to improve my SEO?" 45 ], 46 button:{ 47 title: "Chat AI", 48 icon: "Sparkles", 49 color: "#01afe8", 50 animation: "ping", 51 size: "sm", 52 type: "rounded", 53 shadow: "md", 54 }, 55 }) 56 // $.ajax({ 57 // method: 'post', 58 // url: 'index.php?route=agentfy/startup/getData', 59 // data: '', 60 // dataType: 'json', 61 // success: function (json) { 62 // console.log('age', json); 63 // agentfy({ 64 // agentId: json['agentId'], 65 // apiKey: json['code'], 66 // ...json['options'], 67 // header: { 68 // color: "#05B6F0", 69 // textColor: "#FFFFFF", 70 // closeButton: "style2" 71 // }, 72 // promotion: { 73 // url: "https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=46749" 74 // }, 75 // footer: { 76 // input: { 77 // placeholder: "Ask anything..." 78 // }, 79 // button: { 80 // color: "#05B6F0" 81 // } 82 // }, 83 // questions: [ 84 // "What is the best quick checkout Extension?", 85 // "How to install OpenCart?", 86 // "What are the benefits of using OpenCart Cloud?", 87 // "How to improve my SEO?" 88 // ], 89 // button:{ 90 // title: "Chat AI", 91 // icon: "Sparkles", 92 // color: "#01afe8", 93 // animation: "ping", 94 // size: "sm", 95 // type: "rounded", 96 // shadow: "md", 97 // }, 98 // }) 99 // }, 100 // error: function (xhr, ajaxOptions, thrownError) { 101 // console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); 102 // } 103 // }); 104 }; 105 106 return { 107 init: init 108 }; 109}()); 110 111window.addEventListener('load', function () { 112 AgentFy.init(); 113});
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.