1$(function () { 2 3 4 //Posts 5 $(function () { 6 7 var mobile = false; 8 var ua = navigator.userAgent; 9 if (ua.indexOf('iPhone') > 0 || ua.indexOf('iPod') > 0 || ua.indexOf('iPad') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0) { 10 mobile = true; 11 } 12 13 function onPlayerReady(event) { 14 if (mobile) { 15 event.target.mute(); 16 } 17 event.target.playVideo(); 18 } 19 $('.thumb-wrap').click(function () { 20 var video_id = $(this).children('.thumb').data('video'); 21 var player_id = $(this).next().attr('id'); 22 var video_type = $(this).children('.thumb').data('type'); 23 if (video_type == 'youtube') { 24 player = new YT.Player(player_id, { 25 height: '315', 26 width: '560', 27 playerVars: { 28 playsinline: 1 29 }, 30 videoId: video_id, 31 events: { 32 'onReady': onPlayerReady, 33 } 34 }); 35 $(this).hide(); 36 } 37 if (video_type == 'vimeo') { 38 var player = new Vimeo.Player($('#' + player_id), { 39 id: video_id, 40 width: '560', 41 }); 42 $(player).trigger('play'); 43 $(this).hide(); 44 } 45 }); 46 }); 47 48 // youtube / vimeo / nicovideã«å¯¾å¿ 49 function getVideoType(url) { 50 51 var type; 52 var id; 53 var src; 54 55 if (1 <= url.indexOf('youtube')) { 56 type = 'youtube'; 57 id = url.match(/\?v=([^&]+)/); 58 src = 'https://www.youtube.com/embed/' + id[1]; 59 } 60 61 if (1 <= url.indexOf('vimeo')) { 62 type = 'vimeo'; 63 id = url.match(/[0-9]+$/); 64 src = 'https://player.vimeo.com/video/' + id[0] + '?title=0&byline=0&portrait=0'; 65 } 66 67 if (1 <= url.indexOf('nicovideo')) { 68 type = 'nicovideo'; 69 id = url.match(/\/watch\/([^\/]*)/); 70 src = 'https://embed.nicovideo.jp/watch/' + id[1]; 71 } 72 73 return { 74 'type': type, 75 'id': id, 76 'src': src 77 } 78 } 79 80 $(function () { 81 $('.reply-comment-body').on('change keydown keyup paste cut', 'textarea', function () { 82 $('.post-comment').height(0).height(this.scrollHeight); 83 if ($(this).height() >= 300) { 84 $('.post-comment').css("overflow", "auto"); 85 } 86 else { 87 $('.post-comment').css("overflow", "hidden"); 88 } 89 }).find('.post-comment').change(); 90 }); 91 92 $(function () { 93 $('.postinner-like,.postinner-comment-like').click(function () { 94 $(this).addClass("postinner-liked"); 95 }); 96 97 $('.table-more').click(function () { 98 if ($(this).find(".more-popup,.popup-triangle").is(":visible")) { 99 $(".more-popup,.popup-triangle").fadeOut(); 100 } else { 101 $(".more-popup,.popup-triangle").fadeOut(); 102 $(this).find(".more-popup,.popup-triangle").fadeIn(); 103 } 104 }); 105 106 $('.reply-comment-button').click(function () { 107 $(this).parents('.postinner-comment').find('.reply-comment').toggleClass("switchon"); 108 $(this).parents('.postinner-comment').find('.post-comment').focus(); 109 }); 110 111 $('.switch-button').click(function () { 112 $(this).parents('.switch-wrap').next().toggleClass("switchoff"); 113 $(this).parents('.switch-wrap').siblings('.switch-on').toggleClass("switchon"); 114 }); 115 116 $('.other-receiver').click(function () { 117 $('.hide-field-wrap').slideToggle(); 118 }); 119 120 }); 121 122 $(".tab_content").hide(); 123 $(".tab_content:first").show(); 124 125 //tab mode 126 127 $(".tabs .tab, .tabs .tab-wrap").click(function () { 128 129 $(".tab_content").hide(); 130 var activeTab = $(this).attr("rel"); 131 $("#" + activeTab).show(); 132 $(".tabs .tab, .tabs .tab-wrap").removeClass("tab-active"); 133 $(this).addClass("tab-active"); 134 135 $(".tab-accordion_heading").removeClass("d_active"); 136 $(".tab-accordion_heading[rel^='" + activeTab + "']").addClass("d_active"); 137 138 139 target = $('.page-store-menu'); 140 $('html,body').animate({ 141 scrollTop: target.offset().top - 100 142 }, 100); 143 144 }); 145 146 /* acoordion mode */ 147 148 $(".tab-accordion_heading").click(function () { 149 150 $(".tab_content").hide(); 151 var d_activeTab = $(this).attr("rel"); 152 $("#" + d_activeTab).fadeIn(); 153 154 $(".tab-accordion_heading").removeClass("d_active"); 155 $(this).addClass("d_active"); 156 157 $(".tab-accordion_heading").removeClass("tab-active"); 158 $(".tab-accordion_heading[rel^='" + d_activeTab + "']").addClass("tab-active"); 159 160 if ($(this).hasClass("d_active")) { 161 $(this).removeClass("d_active"); 162 $("#" + d_activeTab).fadeIn(); 163 } 164 165 target = $('.tab-accordion_heading.tab-active'); 166 $('html,body').animate({ 167 scrollTop: target.offset().top - 100 168 }, 100); 169 170 171 }); 172 173 //Community 174 $(function () { 175 $("#survey").on("click", function () { 176 if($("#survey_form tbody tr").length > 10) {
177 window.alert("ã¢ã³ã±ã¼ãã¯10åã¾ã§ã§ãã"); 178 return false; 179 } 180 $("#survey_form tbody tr:first-child").clone(true).appendTo("#survey_form tbody"); 181 182 $("#survey_form tbody tr:last-child").css("display", "block"); 183 184 $(".surveydelete").on("click", function () { 185 $(this).parent().parent().remove(); 186 }); 187 }); 188 }); 189 190 191 //Shop 192 $(function () { 193 if ($('.shop-image-slider').length) { 194 $('.shop-image-slider').slick({ 195 autoplay: false, 196 infinite: false, 197 dots: true, 198 arrows: true, 199 prevArrow: $('.arrow-left'), 200 nextArrow: $('.arrow-right'), 201 customPaging: function (slider, i) { 202 var thumb = $(slider.$slides[i]).data('thumb'); 203 return '<img class="shop-sub-image" src="' + thumb + '" loading="lazy"/>'; 204 } 205 }); 206 } 207 }); 208 209 //種é¡ã«ãã£ã¦å¨åº«æ°ãåçã«åãæ¿ãã 210 $(function () { 211 $('#FlagGoodsType').change(function () { 212 var amount; 213 $('#FlagGoodsQuantity').children().remove(); 214 $.each(data, function (index, val) { 215 if (val['id'] == $('#FlagGoodsType').val()) { 216 amount = val['amount']; 217 } 218 }); 219 for (var i = 1; i <= amount; i++) { 220 $('#FlagGoodsQuantity').append($('<option value="' + i + '">' + i + '</option>')); 221 } 222 }); 223 }); 224 225// $(function () { 226 227// var 228// $form_header = $('.creatorpage-purchase-form'), 229// productprice = $('.creatorpage-productprice'), 230// header_height = $form_header.height(), 231// offset_val = $form_header.outerHeight() + $form_header.offset().top; 232 233 234// // Methods 235// // ================================================= 236 237// function navSlide() { 238// var scroll_top = $(window).scrollTop(); 239 240// if (scroll_top >= offset_val) { 241// $form_header.addClass('bottom-sticky'); 242// productprice.css('margin-top', '75px'); 243// } else { 244// $form_header.removeClass('bottom-sticky'); 245// productprice.css('margin-top', '0'); 246// } 247// } 248 249// $(window).scroll(navSlide); 250 251// }); 252 253 $('.adminbar-title-link').click(function () { 254 $('.adminbar-subtitle').fadeToggle(); 255 }); 256 257 $('.note-video-clip').parent('p').addClass('iframe-wrap'); 258}); 259 260$(function () { 261 function insertStr(input) { 262 return input.slice(0, 3) + '-' + input.slice(3, input.length); 263 } 264 265 $("#postalcode, #recipientpostalcode").on('keyup', function () { 266 var input = $(this).val(); 267 var key = event.keyCode || event.charCode; 268 if (key == 8 || key == 46) { 269 return false; 270 } 271 if (input.length === 3) { 272 $(this).val(insertStr(input)); 273 } 274 if ($(this).val().length == 8) { 275 $(this).closest('.payment-input').nextAll('.half').find('.input-content').focus(); 276 } 277 }); 278 279 $("#postalcode, #recipientpostalcode").on('blur', function () { 280 var input = $(this).val(); 281 if (input.length >= 3 && input.substr(3, 1) !== '-') { 282 $(this).val(insertStr(input)); 283 } 284 if ($(this).val() == '') { 285 $('#address').val(''); 286 } 287 }); 288 289 $("#tel, #recipienttel").on('blur', function () { 290 var val_old = $(this).val(); 291 var newString = new libphonenumber.AsYouType('JP').input(val_old); 292 $(this).val('').val(newString); 293 }); 294}); 295 296$(function () { 297 $(document).ready(function(){ 298 $.validator.addMethod("isZip", function (value, element) { 299 return this.optional(element) || /^\d{3}-?\d{4}$/.test(value); 300 }, 'æ£ããå½¢å¼ã§å ¥åãã¦ãã ãã'); 301 302 $.extend($.validator.messages, { 303 required: 'å¿ é é ç®ã§ã', 304 maxlength: '{0}å以ä¸ã§å ¥åãã¦ãã ãã', 305 email: 'ã¡ã¼ã«ã¢ãã¬ã¹ã®å½¢å¼ã§å ¥åãã¦ãã ãã' 306 }); 307 308 $.validator.addMethod("isTel", function (value, element) { 309 return this.optional(element) || /^(0[5-9]0[0-9]{8}|0[1-9][1-9][0-9]{7})$/.test(value.replace(/[â.*â.*â.*ï¼.*\-.*ã¼.*\-]/gi, '')); 310 }, 'æ£ããå½¢å¼ã§å ¥åãã¦ãã ãã'); 311 312 $("#FlagGoodsUserCheckoutForm, #FlagAuctionUserCheckoutForm").validate({ 313 errorElement: "p", 314 errorClass: "error-content", 315 rules: { 316 "data[FlagPayer][email]": { 317 email: true, 318 }, 319 "data[FlagPayer][postalcode]": { 320 isZip: true, 321 }, 322 "data[FlagRecipient][postalcode]": { 323 isZip: true, 324 }, 325 "data[FlagPayer][tel]": { 326 isTel: true, 327 }, 328 "data[FlagRecipient][tel]": { 329 isTel: true, 330 }, 331 }, 332 }); 333 334 $("#FlagSupportUserJoinForm").validate({ 335 errorElement: "p", 336 errorClass: "error-content", 337 rules: { 338 "data[FlagPayer][email]": { 339 email: true, 340 }, 341 "data[FlagPayer][postalcode]": { 342 isZip: true, 343 }, 344 "data[FlagRecipient][postalcode]": { 345 isZip: true, 346 }, 347 "data[FlagPayer][tel]": { 348 isTel: true, 349 }, 350 "data[FlagRecipient][tel]": { 351 isTel: true, 352 }, 353 }, 354 }); 355}); 356 357 $(document).on('click', function (e) { 358 if (!$(e.target).closest('.tooltip').length && !$(e.target).closest('.help-icon').length) { 359 $('.tooltip,.tooltip-triangle').fadeOut(); 360 } 361 }); 362 363 $('.help-icon').click(function () { 364 if ($(this).siblings(".tooltip,.tooltip-triangle").is(":visible")) { 365 $(".tooltip,.tooltip-triangle").fadeOut(); 366 } else { 367 $(".tooltip,.tooltip-triangle").fadeOut(); 368 $(this).siblings(".tooltip,.tooltip-triangle").fadeIn(); 369 } 370 }); 371}); 372 373$(window).on('load', function () { 374 var url = $(location).attr('href'); 375 if (url.indexOf("#") != -1) { 376 var anchor = url.split("#"); 377 var target = $('#' + anchor[anchor.length - 1]); 378 if (target.length) { 379 // åºå®ãããã¼ã®é«ã(.banner{height:50px})ã¶ãã ãå¼ãã 380 // åä¸ãã¼ã¸å ã¯ãªãã¯æã®ã¹ã¯ãã¼ã«å¦ç(tinyvoice-main.jsã®a[href*="#"]ãã³ãã©)㯠381 // æ¢ã«ãã® -50 ã使ã£ã¦ãããä»ãã¼ã¸ããããã·ã¥ä»ãURLã§ç´æ¥é·ç§»ãã¦ãã 382 // å ´å(=ãã®loadæãã³ãã©ãæ å½ããã±ã¼ã¹)ã ã-120ã¨ããç°ãªãå¤ã«ãªã£ã¦ãã¦ã 383 // ãããã¼åãå¼ãããã対象ã»ã¯ã·ã§ã³ã®ä¸ã«åã®ã»ã¯ã·ã§ã³ãè¦ãã¦ãã¾ã£ã¦ããã 384 // 385 // target.offset().topã¯è¡éãªã©ã¬ã¤ã¢ã¦ãç±æ¥ã®ç«¯æ°(å°æ°px)ãæã¤ãã¨ãããã 386 // Math.floorã§åãæ¨ã¦ãã¨ãããã¼ã®ä¸ã«ãã®ç«¯æ°ã¶ãã®ééãã§ããåã®ã»ã¯ã·ã§ã³ã® 387 // 端ãç´°ãç·ç¶ã«è¦ãã¦ãã¾ãã忍äºå ¥ãã¦ç«¯æ°ããããã¼å´(è¦ãã
387ªãå´)ã«å¯ããã 388 var pos = Math.round(target.offset().top) - 50; 389 $("html, body").animate({ scrollTop: pos }, 0); 390 } 391 } 392});
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.