1/** 2 * @fileOverview è¿ä¸ªæä»¶ä¼è¢«ç´æ¥æ³¨å ¥å° <head> éã 3 * ç±äº js ä¼ç¼å 1 å¹´ï¼æä»¥æ¯æ¬¡ä¿®æ¹è¿ä¸ªæä»¶åé½éè¦ä¿®æ¹æä»¶åã 4 */ 5 6const { search, hostname } = location 7 8const isLocal = hostname === 'localhost' 9const hasInviteCode = search.startsWith('?i=') 10 11/** 12 * å°é¾æ¥ä¸çé请ç åè¿ cookie 13 */ 14function setInviteCookie() { 15 if (hasInviteCode) { 16 fetch( 17 `${ 18 isLocal ? 'https://hcfy.local.dev' : 'https://hs-api.limingkai.cn' 19 }/set-invite?i=${search.slice(3)}`, 20 { 21 mode: 'cors', 22 credentials: 'include', 23 } 24 ) 25 } 26} 27 28setInviteCookie()
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.