1'use strict'; 2(function () { 3 document.addEventListener('DOMContentLoaded', function (event) { 4 qbreal.init(); 5 ScrollBar.init(); 6 }); 7 8 var qbreal = { 9 $more: '.p-real__footer', 10 clickcount: 1, 11 pernum: 5, //ä¸åº¦ã«è¡¨ç¤ºãããä»¶æ° 12 maxnum: 0, 13 $items: '.p-real__list-item', 14 getitem: function getitem() { 15 this.maxnum = $(this.$items).length; 16 // è¨äºã5件以ä¸ã®å ´å 17 if (this.maxnum <= this.pernum) { 18 $(this.$items).addClass('is-show'); 19 $(this.$more).css('display', 'none'); 20 for (var i = 0; i < this.maxnum; i++) { 21 var _elem = $(this.$items).eq(i); 22 this.setimglength(_elem); 23 } 24 } else { 25 // è¨äºã5件以ä¸ã®å ´å 26 this.showmore(); 27 } 28 }, 29 showmore: function showmore() { 30 var _this = this; 31 // åæè¡¨ç¤º 32 for (var i = 0; i < this.pernum * this.clickcount; i++) { 33 var _elem = $(this.$items).eq(i); 34 _elem.addClass('is-show'); 35 this.setimglength(_elem); 36 } 37 // moreãã¿ã³ã¯ãªãã¯ã§è¨äºè¿½å 38 $(this.$more).on('click', function () { 39 var showminindex = _this.pernum * _this.clickcount; 40 _this.clickcount++; 41 var showmaxindex = _this.pernum * _this.clickcount; 42 if (showmaxindex > _this.maxnum) { 43 showmaxindex = _this.maxnum; 44 $(_this.$more).css('display', 'none'); 45 } 46 for (var _i = showminindex; _i < showmaxindex; _i++) { 47 var _elem2 = $(_this.$items).eq(_i); 48 _elem2.addClass('is-show'); 49 _this.setimglength(_elem2); 50 } 51 }); 52 }, 53 setimglength: function setimglength(elem) { 54 if (!$('.p-real_card__img').length) return; 55 var length = elem.find('.p-real_card__img-item').length; 56 elem.addClass('is-img'.concat(length)); 57 }, 58 init: function init() { 59 qbreal.getitem(); 60 }, 61 }; 62 63 var ScrollBar = { 64 instance: [], 65 set: function set() { 66 var _this2 = this; 67 var target = document.querySelectorAll('.js-scrollBar'); 68 target.forEach(function (elem, index) { 69 _this2.instance[index] = new SimpleBar(elem, { 70 autoHide: false, 71 }); 72 }); 73 }, 74 update: function update() { 75 this.instance.forEach(function (elem) { 76 elem.recalculate(); 77 }); 78 }, 79 init: function init() { 80 if ($('.js-scrollBar').length) { 81 this.set(); 82 } 83 }, 84 }; 85})();
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.