1 (function () { 2 var timer = setInterval(function () { 3 if (typeof window.Vue === 'function') { 4 clearInterval(timer); 5 documentation_start() 6 return true; 7 } 8 }, 1000 / 60); 9 })(); 10 11function documentation_start() { 12 var array = []; 13 jsonDOC.content.sort(function (a, b) { 14 return (a.title.toLowerCase() < b.title.toLowerCase()) ? -1 : 1; 15 }) 16 new Vue({ 17 name: 'vm_documentation', 18 el: '.section-template-documentation', 19 created: function () { 20 this.isMobile = corian.device.isMobile; 21 if (/#(.*)/.exec(window.location.href) && /#(.*)/.exec(window.location.href).length > 0) 22 this.getInUrl(/#(.*)/.exec(window.location.href)[1]); 23 }, 24 mounted: function () { 25 const urlParams = new URLSearchParams(window.location.search) 26 if (urlParams.has('search')) { 27 this.word = urlParams.get('search') 28 } 29 }, 30 data: jsonDOC, 31 filters: { 32 sup: function (title) { 33 return title.replace(/®/g, '<sup>®</sup>') 34 } 35 }, 36 methods: { 37 getInUrl: function (keyword) { 38 var obj = this.navigation.filter(function (data) { 39 data.active = false; 40 return data.url === keyword 41 })[0]; 42 if (obj) { 43 this.currentID = obj.id; 44 obj.active = true; 45 } 46 }, 47 activenav: function (id) { 48 var _this = this; 49 this.navigation.forEach(function (value) { 50 value.active = (value.id === id) ? true : false; 51 }) 52 }, 53 sorttab: function () { 54 jsonDOC.content.sort(function (a, b) { 55 return (a.title.toLowerCase() < b.title.toLowerCase()) ? -1 : 1; 56 }); 57 }, 58 filtered: function () { 59 var tmpTitle = [], 60 filteredContent = []; 61 if (this.navigation[0].active && (this.word === '' && !this.wordTab.length)) { 62 this.content.forEach(function (value) { 63 if (tmpTitle.indexOf(value.title) === -1) { 64 tmpTitle.push(value.title); 65 filteredContent.push(value); 66 } 67 }) 68 } else if (!this.navigation[0].active && (this.word === '' && !this.wordTab.length)) { 69 this.content.forEach(function (value) { 70 filteredContent.push(value); 71 }) 72 } else if (this.word !== '' && this.wordTab.length > 0) { 73 var tmpTitle = [], 74 filteredContent = []; 75 this.wordTab.forEach(function (value) { 76 if (tmpTitle.indexOf(value.title) === -1) { 77 tmpTitle.push(value.title); 78 filteredContent.push(value); 79 } 80 }) 81 } 82 return filteredContent; 83 }, 84 isTrackOutboundLink: function (id, file) { 85 var arrayOfData = []; 86 if (corian.get_language() === 'uk') { 87 arrayOfData = [ 88 {806: 'UK_2020portfolio'}, 89 {809: 'UK_2020portfolio'}, 90 {805: 'UK_2020exteriors'}, 91 {402: 'UK_2020kitchen'}, 92 {397: 'UK_2020sinks'} 93 ] 94 } else if (corian.get_language() === 'de') { 95 arrayOfData = [ 96 {734: 'DE_2020portfolio'}, 97 {736: 'DE_2020exteriors'}, 98 {735: 'DE_2020kitchen'}, 99 {397: 'DE_2020sinks'} 100 ] 101 } else if (corian.get_language() === 'it') { 102 arrayOfData = [ 103 {678: 'IT_2020portfolio'}, 104 {681: 'IT_2020exteriors'}, 105 {679: 'IT_2020kitchen'}, 106 {397: 'IT_2020sinks'} 107 ] 108 } else if (corian.get_language() === 'fr') { 109 arrayOfData = [ 110 {686: 'FR_2020portfolio'}, 111 {687: 'FR_2020exteriors'}, 112 {685: 'FR_2020kitchen'}, 113 {397: 'FR_2020sinks'} 114 ] 115 } else { 116 window.location.href = file; 117 return; 118 } 119 treatment(); 120 return; 121 122 function treatment() { 123 var testArray = arrayOfData.filter(function (value) { 124 var id_value = parseInt(Object.keys(value)[0]); 125 return id === id_value 126 }); 127 if (testArray && testArray.length > 0) { 128 var label = testArray[0][id]; 129 var url = file; 130 window.location.href = file; 131 // window.trackOutboundLink(label, url); 132 } else { 133 window.location.href = file; 134 } 135 return; 136 } 137 }, 138 openVideo: function(youtubeID){ 139 $.featherlight('#video_corian',{ 140 beforeOpen: ()=>{ 141 $('#video_corian>iframe').attr('src',`https://www.youtube.com/embed/${youtubeID}`) 142 }, 143 afterClose:()=>{ 144 $('#video_corian>iframe').attr('src',``) 145 } 146 }); 147 } 148 }, 149 watch: { 150 word: function (value) { 151 var _this = this; 152 setTimeout(function () { 153 _this.wordTab = []; 154 _this.content.forEach(function (data) { 155 if (data.title.trim().toLowerCase().indexOf(value.trim().toLowerCase()) > -1) { 156 _this.wordTab.push(data); 157 } 158 }); 159 if (!value.length) _this.wordTab.length = 0; 160 }, 300) 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.