1$(document).ready(function() { 2 //loadMainSearch(); 3 4 5 /* Grid View */ 6 if($('.grid-view').length > 0) { 7 8 $('.grid-view').masonry({ 9 gutter: 20, 10 }).imagesLoaded().progress(function() { 11 $('.grid-view').masonry('layout'); 12 }); 13 $(window).resize(function() { 14 reload_grid_view(); 15 }); 16 17 } 18 19 /*------------------------Animate header RTHK logo-----------------------------------------------------------*/ 20 var windowSize = $(window).width(); 21 22 if ( windowSize > 1000 ) { 23 24 $(window).scroll(function() { 25 var scrollTop = $(window).scrollTop(); 26 if (scrollTop > 200) { 27 $('.logoBot').stop().animate({top: "20px"},200); 28 } 29 else if (scrollTop < 200) { 30 $('.logoBot').stop().animate({top: "70px"},200); 31 } 32 }); 33 // Features 34 $('#fullScroll').scroll(function() { 35 var scrollTop = $('#fullScroll').scrollTop(); 36 if (scrollTop > 200) { 37 $('.logoBot').stop().animate({top: "20px"},200); 38 } 39 else if (scrollTop < 200) { 40 $('.logoBot').stop().animate({top: "70px"},200); 41 } 42 }); 43 44 $('#fullPageScroll').scroll(function() { 45 var scrollTop = $('#fullPageScroll').scrollTop(); 46 if (scrollTop > 200) { 47 $('.logoBot').stop().animate({top: "20px"},200); 48 } 49 else if (scrollTop < 200) { 50 $('.logoBot').stop().animate({top: "70px"},200); 51 } 52 }); 53 54 } 55 $( window ).resize(function() { 56 var windowSize = $(window).width(); 57 if ( windowSize > 1000 ) { 58 // Features 59 $(window).scroll(function() { 60 var scrollTop = $(window).scrollTop(); 61 if (scrollTop > 200) { 62 $('.logoBot').stop().animate({top: "20px"},200); 63 } 64 else { 65 $('.logoBot').stop().animate({top: "70px"},200); 66 } 67 }); 68 69 $('#fullScroll').scroll(function() { 70 var scrollTop = $('#fullScroll').scrollTop(); 71 if (scrollTop > 200) { 72 $('.logoBot').stop().animate({top: "20px"},200); 73 } 74 else { 75 $('.logoBot').stop().animate({top: "70px"},200); 76 } 77 }); 78 79 $('#fullPageScroll').scroll(function() { 80 var scrollTop = $('#fullPageScroll').scrollTop(); 81 if (scrollTop > 200) { 82 $('.logoBot').stop().animate({top: "20px"},200); 83 } 84 else if (scrollTop < 200) { 85 $('.logoBot').stop().animate({top: "70px"},200); 86 } 87 }); 88 } 89 }); 90 /*------------------------Animate header RTHK logo-----------------------------------------------------------*/ 91 92 $('#searchBtn').bind('click', function(e) { 93 e.preventDefault(); 94 $('#searchWrap').bPopup({ 95 onOpen: function () {}, 96 fadeSpeed: 'slow', 97 followSpeed: 1500, 98 modalColor: '#d4d8dc', 99 opacity: '0.95', 100 modalClose: false, 101 closeClass: 'b-close', 102 position: ["50%","50%"], 103 }); 104 $(".searchInput").focus(); 105 106 }); 107 108 $('#searchBtn').keypress(function(e) { 109 e.preventDefault(); 110 var key = e.which; 111 if(key == 13) // the enter key code 112 { 113 $('#searchWrap').bPopup({ 114 onOpen: function () {}, 115 fadeSpeed: 'slow', 116 followSpeed: 1500, 117 modalColor: '#d4d8dc', 118 opacity: '0.95', 119 modalClose: false, 120 closeClass: 'b-close', 121 position: ["50%","50%"], 122 }); 123 $(".searchInput").focus(); 124 } 125 }); 126 127 $('#searchWrap .b-close').keypress(function(e) { 128 e.preventDefault(); 129 var key = e.which || e.keyCode; 130 if(key == 13) // the enter key code 131 { 132 $('#searchWrap .b-close').click(); 133 } 134 135 }); 136 137 $("#searchWrap .b-close").on('keydown', function(e) { 138 var keyCode = e.keyCode || e.which; 139 140 if (keyCode == 9) { 141 e.preventDefault(); 142 $(".searchInput").focus(); 143 } 144 }); 145 146 $('#searchWrap .searchInput').on('keydown', function(e) { 147 var keyCode = e.keyCode || e.which; 148 149 if(keyCode === 9 && e.shiftKey){ 150 $("#searchWrap .b-close").focus(); 151 } 152 }); 153 154}); 155 156 157 158 159function reload_grid_view() { 160 $('.grid-view').masonry().imagesLoaded().progress(function() { 161 $('.grid-view').masonry(); 162 }); 163} 164 165 166function __LogClickEventAction(wt_cg_n, wt_cg_s, dcs_dcsqry) { 167 var dcs_dcsurl = window.current_url; 168 var wt_ti = ""; 169 var wt_cg_n = wt_cg_n || ""; 170 var wt_cg_s = wt_cg_s || ""; 171 var wt_es = ""; 172 var dcs_dcsqry = dcs_dcsqry || ""; 173 174 __LogPlayerAction(dcs_dcsurl, wt_ti, wt_cg_n, wt_cg_s, wt_es, dcs_dcsqry); 175} 176 177function __LogPlayerAction(dcs_dcsurl, wt_ti, wt_cg_n, wt_cg_s, wt_es, dcs_dcsqry) { 178 179 console.log("dcs_dcsurl:" + dcs_dcsurl); 180 console.log("wt_ti:" + wt_ti); 181 console.log("wt_cg_n:" + wt_cg_n); 182 console.log("wt_cg_s:" + wt_cg_s); 183 console.log("wt_es:" + wt_es); 184 console.log("dcs_dcsqry:" + dcs_dcsqry); 185 186 dcsMultiTrack('DCS.dcsuri', dcs_dcsurl, 'WT.ti', wt_ti, 'WT.cg_n', wt_cg_n, 'WT.cg_s', wt_cg_s,'WT.es', wt_es, 'DCS.dcsqry', dcs_dcsqry ); 187} 188 189 190/* Loading Search page */ 191function loadMainSearch(){ 192// $('#mainSearchList').load(window.base_url + '/main/search'); 193} 194 195function gsearch(keyword){ 196 if(keyword!=''){ 197 // var url = 'https://search.rthk.hk/search?q=[KEYWORD]&search2btn=%E6%90%9C%E5%B0%8B&client=revamp16_v1p_frontend&output=xml_no_dtd&proxystylesheet=revamp16_v1p_frontend&proxyreload=1&sort=date:D:L:d1&entsp=a&wc=200&wc_mc=1&oe=UTF-8&ie=UTF-8&ud=1&getfields=*&inlang=zh-TW&exclude_apps=1&site=revamp16&ulang=en&access=p&entqr=3&entqrm=0&&start=0&filter=p'; 198 var url = 'https://websearch.rthk.hk/search?lang=tc&query=[KEYWORD]'; 199 200 url = url.replace('[KEYWORD]',encodeURIComponent(keyword)); 201 document.location.href=url; 202 } 203} 204function gsearchen(keyword){ 205 if(keyword!=''){ 206 // var url = 'https://search.rthk.hk/search?q=[KEYWORD]&search2btn=%E6%90%9C%E5%B0%8B&client=revamp16_v1_en_frontend&output=xml_no_dtd&proxystylesheet=revamp16_v1_en_frontend&proxyreload=1&sort=date:D:L:d1&entsp=a&wc=200&wc_mc=1&oe=UTF-8&ie=UTF-8&ud=1&getfields=*&inlang=zh-TW&exclude_apps=1&site=revamp16&ulang=en&access=p&entqr=3&entqrm=0&&start=0&filter=p'; 207 var url = 'https://websearch.rthk.hk/search?lang=en&query=[KEYWORD]'; 208 209 url = url.replace('[KEYWORD]',encodeURIComponent(keyword)); 210 document.location.href=url; 211 } 212} 213 214 215$(document).ready(function() { 216 var prime_block_height = $('.primeBlock').height() + 15; 217 if(prime_block_height!= '' && prime_block_height!= null && $(window).width() < 1000){ 218 $('.container').css('margin-bottom', prime_block_height); 219 } 220});
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.