1(function() { 2 TestSeries.controller('SingleCtrl', ['$scope', '$http', '$rootScope', function($scope, $http, $rootScope){ 3 $scope.load = function () { 4 $scope.getData(); 5 $scope.getVernacularTextContent() 6 } 7 $scope.getData = function () { 8 var req = { 9 method: 'GET', 10 url: '/api/v1/generic_handler?action=get_client_meta_and_feature_for_homepage', 11 headers: {'Content-Type' : 'application/json'} 12 }; 13 $http(req).then(function (response) { 14 data = response.data; 15 if (data.status) { 16 $rootScope.root_user_data = data.result.user; 17 } 18 }, 19 function(error) { 20 console.log("Something went wrong! Please try again later!"); 21 }); 22 } 23 $scope.getVernacularTextContent = function (lang_code = null) { 24 if(!lang_code) { 25 lang_code = getLanguageCode(); 26 } 27 let json_file_path = '/static/json/final_static_text_json/homepage_template_2_iframe_' + lang_code + '.json'; 28 fetch(json_file_path).then(response => { 29 if (!response.ok) { 30 if (response.status === 404) { 31 return $scope.getVernacularTextContent("1"); 32 } 33 throw new Error(`HTTP error! Status: ${response.status}`); 34 } 35 return response.json(); 36 }).then(data => { 37 $('#chat_gpt_header_title').html(data.chatgpt_text[0]); 38 $('#chat_gpt_welcome1').html(data['chatgpt_text'][1]) 39 $('#chat_gpt_welcome2').html(data['chatgpt_text'][2]) 40 $('#chat_gpt_text_input').attr("placeholder", data['chatgpt_text'][3]) 41 }).catch(error => console.error("Error fetching JSON:", error)); 42 } 43 }]); 44})(angular);
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.