1 2/* 3share_with_wechat.js 415:59 2019-07-09 change to public domain 510:47 2019-08-28 fix for fundraising page 610:34 2020-06-04 IE11 cannot open a page for https://www.gov.hk on testing domains, AND the window actually need just blank page only 716:14 2020-09-11 rewrite for CSP 8*/ 9 10$(document).ready(function () { 11 12 var $shareWithWechat = $('.shareWechat'); 13 14 // 14:32 2019-06-11 GOVHK: add checking in case no wechat icon (Writesup Page) 15 if ($shareWithWechat.length) { 16 17 // 11:31 2019-07-09 GOVHK: change to public domain 18 var pagePathname = 'https://www.gov.hk'+window.location.pathname; 19 var pageSearch = window.location.search; 20 var pageHash = window.location.hash; 21 var pageUrl = pagePathname + pageSearch + pageHash; 22 23 // 10:47 2019-08-28 fundraising detail URL too long for QR code, and cannot directly go detail 24 // so redirect back to fundraising search page 25 if (pageUrl.indexOf('/theme/fundraising/search')>0) { 26 pageUrl = 'https://www.gov.hk/' + feedin_lang + '/theme/fundraising/search/'; 27 } 28 29 //console.log("pageUrl:"+pageUrl); 30 31 // 11:34 2019-07-09 GOVHK change to public domain 32 new QRCode(document.getElementById("wcQR"), pageUrl); 33 //new QRCode(document.getElementById("wcQR"), window.location.href); 34 // $('#wcQR').qrcode(window.location.href); 35 36 $shareWithWechat.click(function () { 37 38 // 16:12 2020-09-11 rewrite the html for new page 39 var wechatTitle = getTxtByLang(['WeChat Share', '微信å享', '微信å享']); 40 var css = '<link rel="stylesheet" media="screen" href="/css/layout_append.css?20200911.160631" type="text/css" />'; 41 var html1 = '<!DOCTYPE html><html><head><title>' + wechatTitle + '</title>'+css+'</head><body></body></html>' 42 var html2 = getTxtByLang(['"Scan QR Code" in WeChat and tap "..." to share.', 'è«å¨å¾®ä¿¡ä¸ææäºç¶ç¢¼ç¶å¾æã...ã以å享', '请å¨å¾®ä¿¡ä¸æ«æäºç»´ç ç¶å¾æã...ã以å享']); 43 html2 += $('#wcQR').prop('outerHTML'); 44 45 46 // 10:34 2020-06-04 IE11 cannot open a page for https://www.gov.hk on testing domains, AND the window actually need just blank page only 47 // var newWindow = window.open(window.location.href, '_blank', 'scrollbars=yes ,width=280px, height=326px'); 48 //var newWindow = window.open(pageUrl, '_blank', 'scrollbars=yes ,width=280px, height=326px'); 49 var newWindow = window.open("about:blank", '_blank', 'scrollbars=yes ,width=280px, height=326px'); 50 51 // 16:13 2020-09-11 rewrite: 52 newWindow.document.write(html1); 53 newWindow.document.write(html2); 54 55 56 }); 57 } 58 59 60});
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.