1jQuery(function($) { 2 3 window.socialRegister = function (formId, flow = null){ 4 5 var form = $('#' + formId); 6 var params = new URLSearchParams(window.location.search); 7 8 // ãæ°ã«å ¥ããããæ±äººã®ç´è¿å±¥æ´ãåå¾ 9 if (common.getItemIfAvailable('favorite') !== null) { 10 var favorite = localStorage.getItem('favorite'); 11 var favArr = JSON.parse(favorite).histories; 12 if (favArr !== null && favArr !== undefined && favArr.length > 0) { 13 favArr.sort((a, b) => b.addTime - a.addTime); 14 for (var i = 0; i < favArr.length; i++) { 15 form.append('<input type="hidden" name="histories[favorite][' + i + '][uid]" value="' + favArr[i].uid + '">'); 16 form.append('<input type="hidden" name="histories[favorite][' + i + '][addTime]" value="' + favArr[i].addTime + '">'); 17 } 18 } 19 } 20 21 // é²è¦§å±¥æ´ã®æ±äººã®ç´è¿å±¥æ´ãåå¾ 22 if(common.getItemIfAvailable('detailHistory') !== null) { 23 var detailHistory = localStorage.getItem('detailHistory'); 24 var dhArr = JSON.parse(detailHistory).histories; 25 if (dhArr !== null && dhArr !== undefined && dhArr.length > 0) { 26 dhArr.sort((a, b) => b.addTime - a.addTime); 27 for (var i = 0; i < dhArr.length; i++) { 28 form.append('<input type="hidden" name="histories[detailHistory][' + i + '][uid]" value="' + dhArr[i].uid + '">'); 29 form.append('<input type="hidden" name="histories[detailHistory][' + i + '][addTime]" value="' + dhArr[i].addTime + '">'); 30 } 31 } 32 } 33 // ç´åã®æ¤ç´¢æ¡ä»¶ã®1ä»¶ãåå¾ 34 if(common.getItemIfAvailable('searchHistory') !== null) { 35 var searchHistory = localStorage.getItem('searchHistory'); 36 var shArr = JSON.parse(searchHistory); 37 if (shArr !== null && shArr !== undefined && shArr.length > 0) { 38 shArr.sort((a, b) => b.addTime - a.addTime); 39 let shKeys = Object.keys(shArr[0]); 40 for (var i = 0; i < shKeys.length; i++) { 41 form.append('<input type="hidden" name="histories[searchHistory][' + shKeys[i] + ']" value="' + shArr[0][shKeys[i]] + '">'); 42 } 43 } 44 } 45 46 // ã¨ã¼ã¸ã§ã³ãæ°è¦ç»é²å°ç·çµç±ã®ç»é² 47 const agentCheckbox = document.getElementById('agentActivate'); 48 const isAgentActive = agentCheckbox ? agentCheckbox.checked : params.get('agent') === '1'; 49 // POSTããã£ã«å ãã¦ããã©ã¼ã ã® action URL ã®ã¯ã¨ãªã«ãä»ä¸ããã 50 // iOS ã§ã¯ /auth/* ã¸ã® POST ããã£ã³ã»ã«ãã URL ã®ã¿ GET ã§åèªè¾¼ãããããï¼KbWebViewPresenter::preAuthï¼ã 51 // ã¯ã¨ãªã«è¼ããªã㨠agentActivate ã失ãããï¼from/uid/flow ã¯æ¢ã«ã¯ã¨ãªã«ããããçåãã¦ããï¼ã 52 try { 53 const actionUrl = new URL(form.attr('action'), window.location.origin); 54 actionUrl.searchParams.set('agentActivate', isAgentActive ? '1' : '0'); 55 form.attr('action', actionUrl.pathname + actionUrl.search); 56 } catch (e) { 57 // URL è§£æã«å¤±æãã¦ã POSTããã£å´ã§æ ä¿ãã 58 } 59 if (isAgentActive) { 60 form.append('<input type="hidden" name="agentActivate" value="1">'); 61 } else { 62 form.append('<input type="hidden" name="agentActivate" value="0">'); 63 } 64 65 // ç°¡æãã¥ã¼ããªã¢ã«çµç±ã®ç»é² 66 if (flow === 'tutorial') { 67 tutorialFlowRegister(form); 68 form.submit(); 69 $('input[name="tutorial[area]"]').val(''); 70 $('input[name="tutorial[employType]"]').prop('checked', false); 71 $('input[name="tutorial[feature]"]').prop('checked', false); 72 } else { 73 form.submit(); 74 } 75 76 return false; 77 } 78 79 function tutorialFlowRegister(form) { 80 // 叿æ¡ä»¶ãåå¾ 81 $.each($('input[name^="tutorial["]').serializeArray(), function(_, field) { 82 var fieldName = field.name.replace('tutorial', "histories[preferredCondition]"); 83 if ($('input[name="' + field.name + '"]').attr('type') === 'checkbox') { 84 form.append('<input type="hidden" name="' + fieldName + '[]" value="' + field.value + '">'); 85 } else { 86 form.append('<input type="hidden" name="' + fieldName + '" value="' + field.value + '">'); 87 } 88 }); 89 } 90 91 92});
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.