PageSourceSearch

https://ryujin-heart.com/common/js/jquery.scrollify.js

js ryujin-heart.com collected 2026-10-06 13:49:26 UTC 25,311 bytes, 847 lines download raw bytes

vendor: 25,311 bytes, lines 1-847
1/*!
2 * jQuery Scrollify
3 * Version 1.0.19
4 *
5 * Requires:
6 * - jQuery 1.7 or higher
7 *
8 * https://github.com/lukehaas/Scrollify
9 *
10 * Copyright 2016, Luke Haas
11 * Permission is hereby granted, free of charge, to any person obtaining a copy of
12 * this software and associated documentation files (the "Software"), to deal in
13 * the Software without restriction, including without limitation the rights to
14 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
15 * the Software, and to permit persons to whom the Software is furnished to do so,
16 * subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in all
19 * copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
23 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
24 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
25 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
28
29
30if touchScroll is false - update index
31
32 */
33(function (global,factory) {
34  "use strict";
35  if (typeof define === 'function' && define.amd) {
36    // AMD. Register as an anonymous module.
37    define(['jquery'], function($) {
38      return factory($, global, global.document);
39    });
40  } else if (typeof module === 'object' && module.exports) {
41    // Node/CommonJS
42    module.exports = factory(require('jquery'), global, global.document);
43  } else {
44    // Browser globals
45    factory(jQuery, global, global.document);
46  }
47}(typeof window !== 'undefined' ? window : this, function ($, window, document, undefined) {
48  "use strict";
49  var heights = [],
50    names = [],
51    elements = [],
52    overflow = [],
53    index = 0,
54    currentIndex = 0,
55    interstitialIndex = 1,
56    hasLocation = false,
57    timeoutId,
58    timeoutId2,
59    $window = $(window),
60    portHeight,
61    top = $window.scrollTop(),
62    scrollable = false,
63    locked = false,
64    scrolled = false,
65    manualScroll,
66    swipeScroll,
67    util,
68    disabled = false,
69    scrollSamples = [],
70    scrollTime = new Date().getTime(),
71    firstLoad = true,
72    initialised = false,
73    destination = 0,
74    wheelEvent = 'onwheel' in document ? 'wheel' : document.onmousewheel !== undefined ? 'mousewheel' : 'DOMMouseScroll',
75    settings = {
76      //section should be an identifier that is the same for each section
77      section: ".section",
78      sectionName: "section-name",
79      interstitialSection: "",
80      easing: "easeOutExpo",
81      scrollSpeed: 1100,
82      offset: 0,
83      scrollbars: true,
84      target:"html,body",
85      standardScrollElements: false,
86      setHeights: true,
87      overflowScroll:true,
88      updateHash: true,
89      touchScroll:true,
90      before:function() {},
91      after:function() {},
92      afterResize:function() {},
93      afterRender:function() {}
94    };
95  function getportHeight() {
96    return ($window.height() + settings.offset);
97  }
98  function animateScroll(index,instant,callbacks,toTop) {
99    if(currentIndex===index) {
100      callbacks = false;
101    }
102    if(disabled===true) {
103      return true;
104    }
105    if(names[index]) {
106      scrollable = false;
107      if(firstLoad===true) {
108        settings.afterRender();
109        firstLoad = false;
110      }
111      if(callbacks) {
112        if( typeof settings.before == 'function' && settings.before(index,elements) === false ){
113          return true;
114        }
115      }
116      interstitialIndex = 1;
117      destination = heights[index];
118      if(firstLoad===false && currentIndex>index && toTop===false) {
119        //We're going backwards
120        if(overflow[index]) {
121          portHeight = getportHeight();
122
123          interstitialIndex = parseInt(elements[index].outerHeight()/portHeight);
124
125          destination = parseInt(heights[index])+(elements[index].outerHeight()-portHeight);
126        }
127      }
128
129
130      if(settings.updateHash && settings.sectionName && !(firstLoad===true && index===0)) {
131        if(history.pushState) {
132            try {
133              history.replaceState(null, null, names[index]);
134            } catch (e) {
135              if(window.console) {
136                console.warn("Scrollify warning: Page must be hosted to manipulate the hash value.");
137              }
138            }
139
140        } else {
141          window.location.hash = names[index];
142        }
143      }
144
145      currentIndex = index;
146      if(instant) {
147        $(settings.target).stop().scrollTop(destination);
148        if(callbacks) {
149          settings.after(index,elements);
150        }
151      } else {
152        locked = true;
153        if( $().velocity ) {
154          $(settings.target).stop().velocity('scroll', {
155            duration: settings.scrollSpeed,
156            easing: settings.easing,
157            offset: destination,
158            mobileHA: false
159          });
160        } else {
161          $(settings.target).stop().animate({
162            scrollTop: destination
163          }, settings.scrollSpeed,settings.easing);
164        }
165
166        if(window.location.hash.length && settings.sectionName && window.console) {
167          try {
168            if($(window.location.hash).length) {
169              console.warn("Scrollify warning: ID matches hash value - this will cause the page to anchor.");
170            }
171          } catch (e) {}
172        }
173        $(settings.target).promise().done(function(){
174          locked = false;
175          firstLoad = false;
176          if(callbacks) {
177            settings.after(index,elements);
178          }
179        });
180      }
181
182    }
183  }
184
185  function isAccelerating(samples) {
186    function average(num) {
187      var sum = 0;
188
189      var lastElements = samples.slice(Math.max(samples.length - num, 1));
190
191      for(var i = 0; i < lastElements.length; i++){
192          sum += lastElements[i];
193      }
194
195      return Math.ceil(sum/num);
196    }
197
198    var avEnd = average(10);
199    var avMiddle = average(70);
200
201    if(avEnd >= avMiddle) {
202      return true;
203    } else {
204      return false;
205    }
206  }
207  var scrollify = function(options) {
208    initialised = true;
209    $.easing['easeOutExpo'] = function(x, t, b, c, d) {
210      return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
211    };
212
213    manualScroll = {
214      handleMousedown:function() {
215        if(disabled===true) {
216          return true;
217        }
218        scrollable = false;
219        scrolled = false;
220      },
221      handleMouseup:function() {
222        if(disabled===true) {
223          return true;
224        }
225        scrollable = true;
226        if(scrolled) {
227          //instant,callbacks
228          manualScroll.calculateNearest(false,true);
229        }
230      },
231      handleScroll:function() {
232        if(disabled===true) {
233          return true;
234        }
235        if(timeoutId){
236          clearTimeout(timeoutId);
237        }
238
239        timeoutId = setTimeout(function(){
240          scrolled = true;
241          if(scrollable===false) {
242            return false;
243          }
244          scrollable = false;
245          //instant,callbacks
246          manualScroll.calculateNearest(false,true);
247        }, 200);
248      },
249      calculateNearest:function(instant,callbacks) {
250        top = $window.scrollTop();
251        var i =1,
252          max = heights.length,
253          closest = 0,
254          prev = Math.abs(heights[0] - top),
255          diff;
256        for(;i<max;i++) {
257          diff = Math.abs(heights[i] - top);
258
259          if(diff < prev) {
260            prev = diff;
261            closest = i;
262          }
263        }
264        if((atBottom() && closest>index) || atTop()) {
265          index = closest;
266          //index, instant, callbacks, toTop
267          animateScroll(closest,instant,callbacks,false);
268        }
269      },
270      wheelHandler:function(e) {
271        if(disabled===true) {
272          return true;
273        } else if(settings.standardScrollElements) {
274          if($(e.target).is(settings.standardScrollElements) || $(e.target).closest(settings.standardScrollElements).length) {
275            return true;
276          }
277        }
278        if(!overflow[index]) {
279          e.preventDefault();
280        }
281        var currentScrollTime = new Date().getTime();
282
283
284        e = e || window.event;
285        var value = e.originalEvent.wheelDelta || -e.originalEvent.deltaY || -e.originalEvent.detail;
286        var delta = Math.max(-1, Math.min(1, value));
287
288        //delta = delta || -e.originalEvent.detail / 3 || e.originalEvent.wheelDelta / 120;
289
290        if(scrollSamples.length > 149){
291          scrollSamples.shift();
292        }
293        //scrollSamples.push(Math.abs(delta*10));
294        scrollSamples.push(Math.abs(value));
295
296        if((currentScrollTime-scrollTime) > 200){
297          scrollSamples = [];
298        }
299        scrollTime = currentScrollTime;
300
301
302        if(locked) {
303          return false;
304        }
305        if(delta<0) {
306          if(index<heights.length-1) {
307            if(atBottom()) {
308              if(isAccelerating(scrollSamples)) {
309                e.preventDefault();
310                index++;
311                locked = true;
312                //index, instant, callbacks, toTop
313                animateScroll(index,false,true, false);
314              } else {
315                return false;
316              }
317            }
318          }
319        } else if(delta>0) {
320          if(index>0) {
321            if(atTop()) {
322              if(isAccelerating(scrollSamples)) {
323                e.preventDefault();
324                index--;
325                locked = true;
326                //index, instant, callbacks, toTop
327                animateScroll(index,false,true, false);
328              } else {
329                return false
330              }
331            }
332          }
333        }
334
335      },
336      keyHandler:function(e) {
337        if(disabled===true || document.activeElement.readOnly===false) {
338          return true;
339        } else if(settings.standardScrollElements) {
340          if($(e.target).is(settings.standardScrollElements) || $(e.target).closest(settings.standardScrollElements).length) {
341            return true;
342          }
343        }
344        if(locked===true) {
345          return false;
346        }
347        if(e.keyCode==38 || e.keyCode==33) {
348          if(index>0) {
349            if(atTop()) {
350              e.preventDefault();
351              index--;
352              //index, instant, callbacks, toTop
353              animateScroll(index,false,true,false);
354            }
355          }
356        } else if(e.keyCode==40 || e.keyCode==34) {
357          if(index<heights.length-1) {
358            if(atBottom()) {
359              e.preventDefault();
360              index++;
361              //index, instant, callbacks, toTop
362              animateScroll(index,false,true,false);
363            }
364          }
365        }
366      },
367      init:function() {
368        if(settings.scrollbars) {
369          $window.on('mousedown', manualScroll.handleMousedown);
370          $window.on('mouseup', manualScroll.handleMouseup);
371          $window.on('scroll', manualScroll.handleScroll);
372        } else {
373          $("body").css({"overflow":"hidden"});
374        }
375        $window.on(wheelEvent,manualScroll.wheelHandler);
376        //$(document).bind(wheelEvent,manualScroll.wheelHandler);
377        $window.on('keydown', manualScroll.keyHandler);
378      }
379    };
380
381    swipeScroll = {
382      touches : {
383        "touchstart": {"y":-1,"x":-1},
384        "touchmove" : {"y":-1,"x":-1},
385        "touchend"  : false,
386        "direction" : "undetermined"
387      },
388      options:{
389        "distance" : 30,
390        "timeGap" : 800,
391        "timeStamp" : new Date().getTime()
392      },
393      touchHandler: function(event) {
394        if(disabled===true) {
395          return true;
396        } else if(settings.standardScrollElements) {
397          if($(event.target).is(settings.standardScrollElements) || $(event.target).closest(settings.standardScrollElements).length) {
398            return true;
399          }
400        }
401        var touch;
402        if (typeof event !== 'undefined'){
403          if (typeof event.touches !== 'undefined') {
404            touch = event.touches[0];
405            switch (event.type) {
406              case 'touchstart':
407                swipeScroll.touches.touchstart.y = touch.pageY;
408                swipeScroll.touches.touchmove.y = -1;
409
410                swipeScroll.touches.touchstart.x = touch.pageX;
411                swipeScroll.touches.touchmove.x = -1;
412
413                swipeScroll.options.timeStamp = new Date().getTime();
414                swipeScroll.touches.touchend = false;
415              case 'touchmove':
416                swipeScroll.touches.touchmove.y = touch.pageY;
417                swipeScroll.touches.touchmove.x = touch.pageX;
418                if(swipeScroll.touches.touchstart.y!==swipeScroll.touches.touchmove.y && (Math.abs(swipeScroll.touches.touchstart.y-swipeScroll.touches.touchmove.y)>Math.abs(swipeScroll.touches.touchstart.x-swipeScroll.touches.touchmove.x))) {
419                  //if(!overflow[index]) {
420                    event.preventDefault();
421                  //}
422                  swipeScroll.touches.direction = "y";
423                  if((swipeScroll.options.timeStamp+swipeScroll.options.timeGap)<(new Date().getTime()) && swipeScroll.touches.touchend == false) {
424
425                    swipeScroll.touches.touchend = true;
426                    if (swipeScroll.touches.touchstart.y > -1) {
427
428                      if(Math.abs(swipeScroll.touches.touchmove.y-swipeScroll.touches.touchstart.y)>swipeScroll.options.distance) {
429                        if(swipeScroll.touches.touchstart.y < swipeScroll.touches.touchmove.y) {
430
431                          swipeScroll.up();
432
433                        } else {
434                          swipeScroll.down();
435
436                        }
437                      }
438                    }
439                  }
440                }
441                break;
442              case 'touchend':
443                if(swipeScroll.touches[event.type]===false) {
444                  swipeScroll.touches[event.type] = true;
445                  if (swipeScroll.touches.touchstart.y > -1 && swipeScroll.touches.touchmove.y > -1 && swipeScroll.touches.direction==="y") {
446
447                    if(Math.abs(swipeScroll.touches.touchmove.y-swipeScroll.touches.touchstart.y)>swipeScroll.options.distance) {
448                      if(swipeScroll.touches.touchstart.y < swipeScroll.touches.touchmove.y) {
449                        swipeScroll.up();
450
451                      } else {
452                        swipeScroll.down();
453
454                      }
455                    }
456                    swipeScroll.touches.touchstart.y = -1;
457                    swipeScroll.touches.touchstart.x = -1;
458                    swipeScroll.touches.direction = "undetermined";
459                  }
460                }
461              default:
462                break;
463            }
464          }
465        }
466      },
467      down: function() {
468
469        if(index<heights.length) {
470
471          if(atBottom() && index<heights.length-1) {
472
473            index++;
474            //index, instant, callbacks, toTop
475            animateScroll(index,false,true,false);
476          } else {
477            portHeight = getportHeight();
478            if(Math.floor(elements[index].height()/portHeight)>interstitialIndex) {
479
480              interstitialScroll(parseInt(heights[index])+(portHeight*interstitialIndex));
481              interstitialIndex += 1;
482
483            } else {
484              interstitialScroll(parseInt(heights[index])+(elements[index].outerHeight()-portHeight));
485            }
486
487          }
488        }
489      },
490      up: function() {
491        if(index>=0) {
492          if(atTop() && index>0) {
493
494            index--;
495            //index, instant, callbacks, toTop
496            animateScroll(index,false,true,false);
497          } else {
498
499            if(interstitialIndex>2) {
500              portHeight = getportHeight();
501
502              interstitialIndex -= 1;
503              interstitialScroll(parseInt(heights[index])+(portHeight*interstitialIndex));
504
505            } else {
506
507              interstitialIndex = 1;
508              interstitialScroll(parseInt(heights[index]));
509            }
510          }
511
512        }
513      },
514      init: function() {
515        if (document.addEventListener && settings.touchScroll) {
516          var eventListenerOptions = {
517            passive: false
518          };
519          document.addEventListener('touchstart', swipeScroll.touchHandler, eventListenerOptions);
520          document.addEventListener('touchmove', swipeScroll.touchHandler, eventListenerOptions);
521          document.addEventListener('touchend', swipeScroll.touchHandler, eventListenerOptions);
522        }
523      }
524    };
525
526
527    util = {
528      refresh:function(withCallback,scroll) {
529        clearTimeout(timeoutId2);
530        timeoutId2 = setTimeout(function() {
531          //retain position
532          sizePanels(true);
533          //scroll, firstLoad
534          calculatePositions(scroll,false);
535          if(withCallback) {
536              settings.afterResize();
537          }
538        },400);
539      },
540      handleUpdate:function() {
541        //callbacks, scroll
542        //changed from false,true to false,false
543        util.refresh(false,false);
544      },
545      handleResize:function() {
546        //callbacks, scroll
547        util.refresh(true,false);
548      },
549      handleOrientation:function() {
550        //callbacks, scroll
551        util.refresh(true,true);
552      }
553    };
554    settings = $.extend(settings, options);
555
556    //retain position
557    sizePanels(false);
558
559    calculatePositions(false,true);
560
561    if(true===hasLocation) {
562      //index, instant, callbacks, toTop
563      animateScroll(index,false,true,true);
564    } else {
565      setTimeout(function() {
566        //instant,callbacks
567        manualScroll.calculateNearest(true,false);
568      },200);
569    }
570    if(heights.length) {
571      manualScroll.init();
572      swipeScroll.init();
573
574      $window.on("resize",util.handleResize);
575      if (document.addEventListener) {
576        window.addEventListener("orientationchange", util.handleOrientation, false);
577      }
578    }
579    function interstitialScroll(pos) {
580      if( $().velocity ) {
581        $(settings.target).stop().velocity('scroll', {
582          duration: settings.scrollSpeed,
583          easing: settings.easing,
584          offset: pos,
585          mobileHA: false
586        });
587      } else {
588        $(settings.target).stop().animate({
589          scrollTop: pos
590        }, settings.scrollSpeed,settings.easing);
591      }
592    }
593
594    function sizePanels(keepPosition) {
595      if(keepPosition) {
596        top = $window.scrollTop();
597      }
598
599      var selector = settings.section;
600      overflow = [];
601      if(settings.interstitialSection.length) {
602        selector += "," + settings.interstitialSection;
603      }
604      if(settings.scrollbars===false) {
605        settings.overflowScroll = false;
606      }
607      portHeight = getportHeight();
608      $(selector).each(function(i) {
609        var $this = $(this);
610
611        if(settings.setHeights) {
612          if($this.is(settings.interstitialSection)) {
613            overflow[i] = false;
614          } else {
615            if(($this.css("height","auto").outerHeight()<portHeight) || $this.css("overflow")==="hidden") {
616              $this.css({"height":portHeight});
617
618              overflow[i] = false;
619            } else {
620
621              $this.css({"height":$this.height()});
622
623              if(settings.overflowScroll) {
624                overflow[i] = true;
625              } else {
626                overflow[i] = false;
627              }
628            }
629
630          }
631
632        } else {
633
634          if(($this.outerHeight()<portHeight) || (settings.overflowScroll===false)) {
635            overflow[i] = false;
636          } else {
637            overflow[i] = true;
638          }
639        }
640      });
641      if(keepPosition) {
642        $window.scrollTop(top);
643      }
644    }
645    function calculatePositions(scroll,firstLoad) {
646      var selector = settings.section;
647      if(settings.interstitialSection.length) {
648        selector += "," + settings.interstitialSection;
649      }
650      heights = [];
651      names = [];
652      elements = [];
653      $(selector).each(function(i){
654          var $this = $(this);
655          if(i>0) {
656            heights[i] = parseInt($this.offset().top) + settings.offset;
657          } else {
658            heights[i] = parseInt($this.offset().top);
659          }
660          if(settings.sectionName && $this.data(settings.sectionName)) {
661            names[i] = "#" + $this.data(settings.sectionName).toString().replace(/ /g,"-");
662          } else {
663            if($this.is(settings.interstitialSection)===false) {
664              names[i] = "#" + (i + 1);
665            } else {
666              names[i] = "#";
667              if(i===$(selector).length-1 && i>1) {
668                heights[i] = heights[i-1] + (parseInt($($(selector)[i-1]).outerHeight()) - parseInt($(window).height())) + parseInt($this.outerHeight());
669              }
670            }
671          }
672          elements[i] = $this;
673          try {
674            if($(names[i]).length && window.console) {
675              console.warn("Scrollify warning: Section names can't match IDs - this will cause the browser to anchor.");
676            }
677          } catch (e) {}
678
679          if(window.location.hash===names[i]) {
680            index = i;
681            hasLocation = true;
682          }
683
684      });
685
686      if(true===scroll) {
687        //index, instant, callbacks, toTop
688        animateScroll(index,false,false,false);
689      }
690    }
691
692    function atTop() {
693      if(!overflow[index]) {
694        return true;
695      }
696      top = $window.scrollTop();
697      if(top>parseInt(heights[index])) {
698        return false;
699      } else {
700        return true;
701      }
702    }
703    function atBottom() {
704      if(!overflow[index]) {
705        return true;
706      }
707      top = $window.scrollTop();
708      portHeight = getportHeight();
709
710      if(top<parseInt(heights[index])+(elements[index].outerHeight()-portHeight)-28) {
711
712        return false;
713
714      } else {
715        return true;
716      }
717    }
718  }
719
720  function move(panel,instant) {
721    var z = names.length;
722    for(;z>=0;z--) {
723      if(typeof panel === 'string') {
724        if (names[z]===panel) {
725          index = z;
726          //index, instant, callbacks, toTop
727          animateScroll(z,instant,true,true);
728        }
729      } else {
730        if(z===panel) {
731          index = z;
732          //index, instant, callbacks, toTop
733          animateScroll(z,instant,true,true);
734        }
735      }
736    }
737  }
738  scrollify.move = function(panel) {
739    if(panel===undefined) {
740      return false;
741    }
742    if(panel.originalEvent) {
743      panel = $(this).attr("href");
744    }
745    move(panel,false);
746  };
747  scrollify.instantMove = function(panel) {
748    if(panel===undefined) {
749      return false;
750    }
751    move(panel,true);
752  };
753  scrollify.next = function() {
754    if(index<names.length) {
755      index += 1;
756      //index, instant, callbacks, toTop
757      animateScroll(index,false,true,true);
758    }
759  };
760  scrollify.previous = function() {
761    if(index>0) {
762      index -= 1;
763      //index, instant, callbacks, toTop
764      animateScroll(index,false,true,true);
765    }
766  };
767  scrollify.instantNext = function() {
768    if(index<names.length) {
769      index += 1;
770      //index, instant, callbacks, toTop
771      animateScroll(index,true,true,true);
772    }
773  };
774  scrollify.instantPrevious = function() {
775    if(index>0) {
776      index -= 1;
777      //index, instant, callbacks, toTop
778      animateScroll(index,true,true,true);
779    }
780  };
781  scrollify.destroy = function() {
782    if(!initialised) {
783      return false;
784    }
785    if(settings.setHeights) {
786      $(settings.section).each(function() {
787        $(this).css("height","auto");
788      });
789    }
790    $window.off("resize",util.handleResize);
791    if(settings.scrollbars) {
792      $window.off('mousedown', manualScroll.handleMousedown);
793      $window.off('mouseup', manualScroll.handleMouseup);
794      $window.off('scroll', manualScroll.handleScroll);
795    }
796    $window.off(wheelEvent,manualScroll.wheelHandler);
797    $window.off('keydown', manualScroll.keyHandler);
798
799    if (document.addEventListener && settings.touchScroll) {
800      document.removeEventListener('touchstart', swipeScroll.touchHandler, false);
801      document.removeEventListener('touchmove', swipeScroll.touchHandler, false);
802      document.removeEventListener('touchend', swipeScroll.touchHandler, false);
803    }
804    heights = [];
805    names = [];
806    elements = [];
807    overflow = [];
808  };
809  scrollify.update = function() {
810    if(!initialised) {
811      return false;
812    }
813    util.handleUpdate();
814  };
815  scrollify.current = function() {
816    return elements[index];
817  };
818  scrollify.currentIndex = function() {
819    return index;
820  };
821  scrollify.disable = function() {
822    disabled = true;
823  };
824  scrollify.enable = function() {
825    disabled = false;
826    if (initialised) {
827      //instant,callbacks
828      manualScroll.calculateNearest(false,false);
829    }
830  };
831  scrollify.isDisabled = function() {
832    return disabled;
833  };
834  scrollify.setOptions = function(updatedOptions) {
835    if(!initialised) {
836      return false;
837    }
838    if(typeof updatedOptions === "object") {
839      settings = $.extend(settings, updatedOptions);
840      util.handleUpdate();
841    } else if(window.console) {
842      console.warn("Scrollify warning: setOptions expects an object.");
843    }
844  };
845  $.scrollify = scrollify;
846  return scrollify;
847}));

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.