1// ver 0.0.1 2// IE9 later 3// tp_common_basic.js 4$(document).ready(function() { 5}); 6function f_tp_article_article_button_addTopEle (l_in_aid, event) { 7 try { 8 if ('id_article_title_title_button_button_heart_div' == event.target.id) { 9 if ($.contains($('#id_article_mid_content_love_img_div')[0], $('#id_button_div')[0])) { 10// f_tp_article_article_button_close(); 11 return; 12 } 13 } else if ('id_article_mid_content_love_img_div' == event.target.id) { 14 if ($.contains($('#id_article_title_title_button_button_heart_div')[0], $('#id_button_div')[0])) { 15// f_tp_article_article_button_close(); 16 return; 17 } 18 } 19 } catch (ee0) { 20 } 21 try { 22 if ($.contains(event.target, $('#id_button_div')[0])) { 23 f_tp_article_article_button_close(); 24 return; 25 } 26 } catch (ee1) { 27 } 28// 29 f_tp_article_article_button_total(l_in_aid, event); 30// 31 var l_req = null; 32 if (window.ActiveXObject) { 33 try { 34 l_req = new ActiveXObject("Msxml2.XMLHTTP"); 35 } catch (e_xmlhttpobject) { 36 l_req = new ActiveXObject("Microsoft.XMLHTTP"); 37 } 38 } else if (window.XMLHttpRequest) { 39 l_req = new XMLHttpRequest(); 40 l_req.overrideMimeType('text/html'); 41 } else { 42 l_req = null; 43 } 44 if (f_tp_common_basic_isNull(l_req)) { return; } 45 l_req.open('POST', '/sr/button_article.cgi?u=' + f_tp_common_basic_nowDate2yymmddhhmmss(), true); 46 l_req.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' ); 47 l_req.onreadystatechange = function() { 48 if (4 === l_req.readyState) { 49 var ll_stat = '0'; 50 var ll_res = ''; 51 if (200 === l_req.status) { 52 ll_res = l_req.responseText; 53 ll_stat = '1'; 54 } else if (1 === l_req.status) { 55 } else { 56 ll_stat = '-1'; 57 try { 58 l_req.abort(); 59 } catch (e1) { 60 } 61 try { 62 l_req = null; 63 } catch (e2) { 64 } 65 } 66 f_tp_article_article_button_addTopEle_callback(ll_stat, ll_res, event); 67 } 68 }; 69 var l_sendData = 'aid=' + l_in_aid; 70 l_req.send(l_sendData); 71 72// $(document.body).css("overflow", "hidden"); 73// event.stopPropagation(); 74} 75function f_tp_article_article_button_total(l_in_aid, event) { 76 var l_req = null; 77 if (window.ActiveXObject) { 78 try { 79 l_req = new ActiveXObject("Msxml2.XMLHTTP"); 80 } catch (e_xmlhttpobject) { 81 l_req = new ActiveXObject("Microsoft.XMLHTTP"); 82 } 83 } else if (window.XMLHttpRequest) { 84 l_req = new XMLHttpRequest(); 85 l_req.overrideMimeType('text/html'); 86 } else { 87 l_req = null; 88 } 89 if (f_tp_common_basic_isNull(l_req)) { return; } 90 l_req.open('POST', '/sr/button_article_total.cgi?u=' + f_tp_common_basic_nowDate2yymmddhhmmss(), true); 91 l_req.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' ); 92 l_req.onreadystatechange = function() { 93 if (4 === l_req.readyState) { 94 var ll_stat = '0'; 95 var ll_res = ''; 96 if (200 === l_req.status) { 97 ll_res = l_req.responseText; 98 ll_stat = '1'; 99 } else if (1 === l_req.status) { 100 } else { 101 ll_stat = '-1'; 102 try { 103 l_req.abort(); 104 } catch (e1) { 105 } 106 try { 107 l_req = null; 108 } catch (e2) { 109 } 110 } 111 f_tp_article_article_button_total_callback(ll_stat, ll_res, event); 112 } 113 }; 114 var l_sendData = 'aid=' + l_in_aid; 115 l_req.send(l_sendData); 116} 117function f_tp_article_article_button_total_callback(l_ret, l_res, event) { 118 if ('1' == l_ret) { 119 try { 120 // $('#id_article_title_title_heart_val_text_div').html(l_res); 121 $('#id_article_title_title_heart_val_text_div').html(l_res); 122 $('.c_article_title_title_heart_val_text_div').each(function(index, l_ele) { 123 $(l_ele).html(l_res); 124 }); 125 } catch (e0) { 126 } 127 } 128} 129function f_tp_article_article_button_addTopEle_callback(l_ret, l_res, event) { 130 if ('1' == l_ret) { 131 try { 132 var $lv_eventObj = $('#' + event.target.id); 133 $lv_eventObj.empty(); 134 135 var l_w = f_tp_common_basic_numPx2num($lv_eventObj.css('width')); 136 var l_h = f_tp_common_basic_numPx2num($lv_eventObj.css('height')); 137 var l_b_offsetX = -115 + Math.round(l_w * 0.5); // 230 <div name="n_button_div" id="id_button_div" 138 var $mainDiv_obj = $("<div></div>"); 139 $mainDiv_obj.attr("name", "n_button_div"); 140 $mainDiv_obj.attr("id", "id_button_div"); 141 $mainDiv_obj.css("left", l_b_offsetX + "px"); 142 $mainDiv_obj.css("top", l_h + "px"); 143 $mainDiv_obj.css("cursor", "auto"); 144 $mainDiv_obj.click(f_tp_article_article_button_onClickNoAction); 145 $mainDiv_obj.mouseover(f_tp_article_article_button_onClickNoAction); 146 $mainDiv_obj.mouseleave(f_tp_article_article_button_onClickNoAction); 147 $mainDiv_obj.html(l_res); 148 $lv_eventObj.append($mainDiv_obj); 149 } catch (e0) { 150 f_tp_article_article_button_close(); 151 } 152 } else { 153 f_tp_article_article_button_close(); 154 } 155} 156// 157function f_tp_article_article_button_add (l_in_aid, l_in_buttonNo) { 158// f_tp_article_article_button_close(); 159 var l_req = null; 160 if (window.ActiveXObject) { 161 try { 162 l_req = new ActiveXObject("Msxml2.XMLHTTP"); 163 } catch (e_xmlhttpobject) { 164 l_req = new ActiveXObject("Microsoft.XMLHTTP"); 165 } 166 } else if (window.XMLHttpRequest) { 167 l_req = new XMLHttpRequest(); 168 l_req.overrideMimeType('text/html'); 169 } else { 170 l_req = null; 171 } 172 if (f_tp_common_basic_isNull(l_req)) { return; } 173 l_req.open('POST', '/sr/button_article_add.cgi?u=' + f_tp_common_basic_nowDate2yymmddhhmmss(), true); 174 l_req.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' ); 175 l_req.onreadystatechange = function() { 176 if (4 === l_req.readyState) { 177 var ll_stat = '0'; 178 var ll_res = ''; 179 if (200 === l_req.status) { 180 ll_res = l_req.responseText; 181 ll_stat = '1'; 182 } else if (1 === l_req.status) { 183 } else { 184 ll_stat = '-1'; 185 try { 186 l_req.abort(); 187 } catch (e1) { 188 } 189 try { 190 l_req = null; 191 } catch (e2) { 192 } 193 } 194 f_tp_article_article_button_add_callback(l_in_aid, ll_stat, ll_res); 195 } 196 }; 197 var l_sendData = 'aid=' + l_in_aid; 198 l_sendData += '&bn=' + l_in_buttonNo; 199 l_req.send(l_sendData); 200} 201function f_tp_article_article_button_add_callback(l_in_aid, l_ret, l_res) { 202 if ('1' == l_ret) { 203// if (l_res.match(/^[0-9]+$/)) { 204// try { 205// $('#id_article_title_remind_count_num_span').html(l_res); 206// } catch (e0) { 207// } 208// } 209 210 f_tp_article_article_button_total(l_in_aid, event); 211 try { 212 if ('' != l_res) { 213 var $mainDiv_obj = $("#id_button_div"); 214 $mainDiv_obj.html(l_res); 215 } 216 } catch (e1) { 217 } 218 try { 219 var ll = l_res.match(/<!-- +r_total ([0-9]+) +-->/); 220 if (2 == ll.length) { 221 $('#id_article_title_remind_count_num_span').html(ll[1]); 222 } 223 } catch (e2) { 224 } 225 } 226// f_tp_article_article_button_close(); 227} 228/////////////////////// 229function f_tp_article_article_button_close() { 230 try { 231 $('#id_button_div').remove(); 232 } catch (e0) { 233 } 234 try { 235 var l_ele = document.getElementsByName('n_button_div'); 236 if (l_ele.length) { 237 for (var i = (l_ele.length - 1); i >= 0; i = i - 1) { 238 try { 239 l_ele[i].parentNode.removeChild(l_ele[i]); 240 } catch (e1_0) { 241 } 242 } 243 } 244 } catch (e1) { 245 } 246} 247function f_tp_article_article_button_onClickNoAction (event) { 248 // ãã¬ã¼ã å ãã¯ãªãã¯ãã¦ã親ã«ã¯ä¼æããªã 249 event.stopPropagation(); 250} 251// end of file
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.