PageSourceSearch

https://www.goo-net.com/usedcar/common_v2/js/list_navi.js

js goo-net.com collected 2026-10-01 10:30:56 UTC 5,695 bytes, 143 lines download raw bytes

1// ¤ªµ¤¤ËÆþ¤êºÇÂçɽ¼¨·ï¿ô
2const dispMax = 1;
3function getMySearchInfo() {
4    var idToken = localStorage.getItem('idToken');
5    if (idToken !== null) {
6        getFavoriteCarList();
7    } else {
8        setFavoriteCarList('');
9    }
10}
11
12function getFavoriteCarList() {
13    if (typeof sendGraphQLAPI == 'function') {
14        var clientMessageViewList = localStorage.getItem('client_message_view_list');
15        var h_param = {
16            use_graphql: true,
17            graphql_url: '5',
18            car_detail_flg: true,
19            client_message_view_list: clientMessageViewList
20        };
21        // ¤ªµ¤¤ËÆþ¤ê¼èÆÀAPI
22        sendGraphQLAPI(h_param, setFavoriteCarList);
23    }
24}
25
26// ¤ªµ¤¤ËÆþ¤ê¥¯¥ë¥Þ¾ðÊó¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ø¥»¥Ã¥È
27function setFavoriteCarList(data) {
28    let html = '';
29    if (data === '' || !data.hasOwnProperty('favorite_spread_detail')) {
30        html = '<div class="noContent">'
31                + '<p>¤Þ¤ÀÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤»¤ó</p>'
32                + '<p>¤Þ¤º¤Ï¥¯¥ë¥Þ¤ò¸¡º÷¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡ª</p>'
33            + '</div>';
34    } else {
35        let fcList = data.favorite_spread_detail;
36        for (let i = 0; i < dispMax; i++) {
37            let htmlparts =
38                '<a href="/usedcar/spread/goo/' + fcList[i].area_cd+'/' + fcList[i].goocar_id + '.html' + '" onclick="gtag(\'event\', \'link_click\',{ \'position\':\'favorite\',\'media\':\'usedcar\',\'detail\':\'usedcar_spread\',\'link_type\': \'field\'})"'+'>'
39                + '<div class="car_image">'
40                    + '<img onerror="this.src=\'https://img.goo-net.com/goo/usedcar/nophoto_big.jpg\'" src="'+fcList[i].image_thumbnail_url+'" alt="'+fcList[i].brand_name + " " + fcList[i].car_name+'">'
41                + '</div>'
42                + '<dl class="car_info">'
43                    + '<dt>' + fcList[i].car_name + " " + fcList[i].grade_name + '</dt>'
44                    + '<dd>'
45                        + '<dl>'
46                            + '<dd class="price">»ÙʧÁí³Û<i>(Àǹþ)</i></dd>'
47                            + '<dd class="red"><em>' + setTotalPrice(fcList[i].total_price) + '</em>Ëü±ß</dd>'
48                        + '</dl>'
49                    + '</dd>'
50                    + '<dd>'
51                        + '<dl>'
52                            + '<dd class="price">' + setTax(fcList[i].tax) + '</dd>'
53                            + '<dd class="red">' + setPrice(fcList[i].price) + '</dd>'
54                        + '</dl>'
55                    + '</dd>'
56                + '</dl>'
57                +'</a>\n';
58            html += htmlparts;
59        }
60    }
61    // ¤¢¤Ê¤¿¤Ø¤Î¤ªÃΤ餻
62    showClientMessage(data);
63    const parentElements = document.querySelector(".favorite");
64    parentElements.insertAdjacentHTML("beforeend",html)
65}
66
67function setTotalPrice(total_price) {
68    let dispTotalPrice;
69    if (total_price !== "" && total_price.replace("Ëü±ß", "") !== '0') {
70        dispTotalPrice = total_price.replace("Ëü±ß", "");
71    } else {
72        dispTotalPrice = "--";
73    }
74    return dispTotalPrice;
75}
76function setTax(tax) {
77    let dispTax;
78    if (tax === '¾ÃÈñÀÇÈó²ÝÀÇ') {
79        dispTax = "¼ÖξËÜÂβÁ³Ê" + '<br/><i>' + "(ÀÇÈó²ÝÀÇ)" + '</i>'
80    } else if (tax === '¾ÃÈñÀǹþ') {
81        dispTax = "¼ÖξËÜÂβÁ³Ê" + '<br/><i>' + "(Àǹþ)" + '</i>'
82    } else {
83        dispTax = "¼ÖξËÜÂβÁ³Ê" + '<i></i>';
84    }
85    return dispTax;
86}
87function setPrice(price) {
88    let dispPrice;
89    if (price === "ASK") {
90        dispPrice = '<em>' + price.replace("Ëü±ß", "") + '</em>'
91    } else {
92        dispPrice = '<em>' + price.replace("Ëü±ß", "") + '</em>' + "Ëü±ß"
93    }
94    return dispPrice;
95}
96
97
98function showClientMessage(responseText) {
99    var exists_client_message_id = setInterval(function () {
100            var o_client_message = document.getElementById('client_message');
101            if (o_client_message) {
102                o_client_message.style.display = 'none';
103                clearInterval(exists_client_message_id);
104                if (exists_client_message_id > 0) {
105                    clearInterval(exists_client_message_id);
106                }
107                var o_client_message_detail = document.getElementById('client_message_detail');
108                if (o_client_message_detail) {
109                    o_client_message_detail.style.display = 'none';
110                    if (responseText != '') {
111                        var data = eval(responseText);
112                        if (eval(data.client_message_count) > 0) {
113                            o_client_message_detail.style.display = '';
114                            o_client_message.style.display = '';
115                        }
116                    }
117                }
118                var o_change_price_count = document.getElementById('change_price_count');
119                if (o_change_price_count) {
120                    o_change_price_count.style.display = 'none';
121                    if (responseText != '') {
122                        var data = eval(responseText);
123                        if (eval(data.change_price_count) > 0) {
124                            o_client_message.style.display = '';
125                            o_change_price_count.style.display = '';
126                        }
127                    }
128                }
129
130                // ¥È¥Ã¥×²èÌÌ¤Ë ¤ªÃΤ餻 or ÈÎÇäŹ¥á¥Ã¥»¡¼¥¸¤Îɽ¼¨ ¤¬¤¢¤ë»þ¤ÏClass¤òÍ­¸ú¤Ë¤¹¤ë
131                if (responseText != '') {
132                    if (eval(data.client_message_count) > 0 || eval(data.change_price_count) > 0) {
133                        document.getElementById('info').className = "block_alert";
134                    }
135                }
136            }
137            showEstimateCartMessage();
138        }
139        ,10);
140}
141
142//¤ªµ¤¤ËÆþ¤ê¾ðÊó¡¢±ÜÍ÷ÍúÎò¾ðÊó¤ò¼èÆÀ
143getMySearchInfo();

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.