1var ecblib = ecblib || {}; 2ecblib.goods_ajax_bookmark = ecblib.goods_ajax_bookmark || {}; 3 4jQuery(function () { 5 var _goods_ajax_bookmark = ecblib.goods_ajax_bookmark; 6 7 var $btn_bookmark = jQuery(".js-animation-bookmark"); 8 $btn_bookmark.off("click"); 9 $btn_bookmark.on("click", function (e) { 10 var originalText; 11 var loadStart = function (elem) { 12 jQuery(elem).attr("data-bookmark-click", "true"); 13 originalText = jQuery(elem).html(); 14 jQuery(elem).html('<i class="js-animation-bookmark-in-progress fa fa-spinner fa-pulse fa-fw"></i><span class="sr-only">' + ecblib.msg.goods_ajax_bookmark.PLEASE_WAIT + '</span></a>'); 15 return elem; 16 }; 17 var loadEnd = function (elem, iserror, msg) { 18 if (!iserror) { 19 ecblib.ui.showToolTip(jQuery(".js-animation-bookmark-in-progress"), { tooltip: msg, diptimeSec: 2 }); 20 setTimeout(function () { 21 jQuery(elem).html(originalText); 22 }, 2400); 23 } else { 24 jQuery(elem).html(originalText); 25 } 26 27 jQuery(elem).removeAttr("data-bookmark-click"); 28 }; 29 var addBookmark = function (b, g) { 30 // ãæ°ã«å ¥ããã¿ã³ã®Ajaxå¦çãå®äºãã¦ããªããã°å¦çãçµäºãã 31 if (jQuery(b).attr("data-bookmark-click") == "true") { 32 return false; 33 } 34 35 var o = loadStart(b); 36 jQuery.ajax({ 37 async: true, 38 type: "POST", 39 url: ecblib.sys.wwwroot + "/shop/customer/bookmarkajax.aspx", 40 data: { 41 "goods": g, 42 "crsirefo_hidden": jQuery('#js_crsirefo_hidden').val() 43 }, 44 cache: false, 45 ifModified: false, 46 dataType: "json", 47 success: function (contents) { 48 setTimeout(function () { 49 loadEnd(o, false, contents.msg); 50 }, 400); 51 if (contents.isGuestBookmarkRedirect) { 52 location.href = ecblib.sys.wwwroot + "/shop/customer/bookmark_guest.aspx"; 53 } 54 }, 55 error: function (xhr, status, thrown) { 56 loadEnd(o, true); 57 alert(ecblib.msg.goods_ajax_bookmark.SESSION_EXPIRED); 58 return false; 59 } 60 }); 61 return true; 62 }; 63 if (!jQuery(this).size()) { 64 return false; 65 } 66 var href = jQuery(this).attr("href"); 67 var re = new RegExp("goods=([0-9A-Za-z_\-]+)"); 68 var matches = href.match(re); 69 var goods = ""; 70 if (matches && matches.length == 2) { 71 goods = matches[1]; 72 } else { 73 return true; 74 } 75 addBookmark(this, goods); 76 return false; 77 }); 78});
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.