1// javascript 2// ããããã¼ã¸ 3 4var base_dir = ''; 5 6$(function() { 7 // 8 var swiper_mv = new Swiper('#main_visula_slider', { 9 autoplay: { 10 delay: 4000 11 }, 12 speed: 2000, 13 effect: 'fade', 14 loop: true, 15 }); 16 17 // RECOMMENDED 18 var swiper1 = new Swiper('#recommended_slider', { 19 autoplay: { 20 delay: 4000 21 }, 22 spaceBetween: 0, 23 loop: true, 24 centeredSlides: true, 25 slidesPerView: 1.4, 26 27 breakpoints: { 28 768: { 29 centeredSlides: false, 30 slidesPerView: 2 31 }, 32 992: { 33 centeredSlides: false, 34 slidesPerView: 3 35 } 36 }, 37 38 pagination: { 39 el: '.swiper-pagination', //ãã¼ã¸ãã¼ã·ã§ã³ã®è¦ç´ 40 type: 'bullets', //ãã¼ã¸ãã¼ã·ã§ã³ã®ç¨®é¡ 41 clickable: true, //ã¯ãªãã¯ã«åå¿ããã 42 }, 43 //ããã²ã¼ã·ã§ã³ãã¿ã³ï¼ç¢å°ï¼è¡¨ç¤ºã®è¨å® 44 navigation: { 45 nextEl: '.swiper-button-next', //ãæ¬¡ã¸ãã¿ã³ãè¦ç´ ã®æå® 46 prevEl: '.swiper-button-prev', //ãåã¸ãã¿ã³ãè¦ç´ ã®æå® 47 }, 48 paginationClickable: true, 49 }); 50 51 // åè³ä¼æ¥ 52 var swiper3 = new Swiper('#sponsor_banner_slider', { 53 autoplay: { 54 delay: 6000 55 }, 56 spaceBetween: 0, 57 loop: true, 58 slidesPerView: 1, 59 60 breakpoints: { 61 768: { 62 slidesPerView: 3 63 }, 64 992: { 65 slidesPerView: 5 66 } 67 }, 68 69 pagination: { 70 el: '.swiper-pagination', //ãã¼ã¸ãã¼ã·ã§ã³ã®è¦ç´ 71 type: 'bullets', //ãã¼ã¸ãã¼ã·ã§ã³ã®ç¨®é¡ 72 clickable: true, //ã¯ãªãã¯ã«åå¿ããã 73 }, 74 //ããã²ã¼ã·ã§ã³ãã¿ã³ï¼ç¢å°ï¼è¡¨ç¤ºã®è¨å® 75 navigation: { 76 nextEl: '.swiper-button-next', //ãæ¬¡ã¸ãã¿ã³ãè¦ç´ ã®æå® 77 prevEl: '.swiper-button-prev', //ãåã¸ãã¿ã³ãè¦ç´ ã®æå® 78 }, 79 paginationClickable: true, 80 }); 81 82 getMedia('#instagram_list', 6, 1); 83}); 84 85 86 87//----- Instagramæç¨¿ãã¼ã¿ã®åå¾ ----- 88//id : 表示ããHTMLè¦ç´ 89//max_data : æå¤§è¡¨ç¤ºä»¶æ° 90//video_style : ãããªã®å ´åã®è¡¨ç¤ºæ¹æ³(1:åç»ã¨ãã¦è¡¨ç¤º 2:鿢ç»ãµã ãã¤ã«ã代æ¿è¡¨ç¤º) 91function getMedia(id, max_data, video_style) { 92 $.ajax({ 93 url : './get_instagram_media.php' , 94 type : 'GET' , 95 cache : false , 96 dataType : 'json' 97 }).done(function(json){ 98 if (json.status == 'success') { 99 var tag = '<ul>'; 100 if (json.data) { 101 for(i=0; i<json.data.length; i++) { 102 if (i == max_data) break; 103 var row = json.data[i]; 104 tag += ('<li><a href="' + row.permalink + '" target="_blank" title="' + row.caption + '">'); 105 if (row.media_type == 'VIDEO') { 106 console.log('row.thumbnail_url[' + row.thumbnail_url + ']'); 107 if (video_style == 1 || row.thumbnail_url === undefined) { 108 tag += ('<video src="' + row.media_url + '" autoplay muted playsinline loop></video>'); 109 } 110 else { 111 tag += ('<img src="' + row.thumbnail_url + '" />'); 112 } 113 } 114 else { 115 tag += ('<img src="' + row.media_url + '" />'); 116 } 117 tag += ('</a></li>'); 118 } 119 } 120 tag +=('</ul>'); 121 $(id).html(tag); 122 } 123 else { 124 $('#instagram_sample').html('<span class="text-muted">åå¾ã§ãã¾ãã</span>'); 125 if (json.instagram_error !== undefined) { 126 $('#instagram_sample').html(json.instagram_error); 127 } 128 else { 129 if (json.reason == 'curl_init_failed') { 130 $('#instagram_sample').html('ãã®ãµã¼ãã¼ã§ã¯cURLã使ç¨ã§ãã¾ããããµã¼ãã¼ç®¡çè ã«ãååããã ããã'); 131 } 132 else if (json.reason == 'instagram_token_refresh_faild') { 133 $('#instagram_sample').html('é·æã¢ã¯ã»ã¹ãã¼ã¯ã³ã®æ´æ°ã«å¤±æãã¾ããããµã¼ãã¼ç®¡çè ã«ãååããã ããã'); 134 } 135 else { 136 console.log(json.reason); 137 } 138 } 139 } 140 }).fail(function(jqXHR, textStatus, errorThrown) { 141 console.log('[getMedia] jqXHR.status[' + jqXHR.status + '] textStatus[' + textStatus + '] errorThrowm[' + errorThrown + ']'); 142 }); 143}
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.