PageSourceSearch

https://wetzlar.de/WEB-IES/js/Scrolling.js

js wetzlar.de collected 2026-10-02 06:39:23 UTC 1,578 bytes, 51 lines download raw bytes

1/* global SP, Modernizr */
2/**
3 * Fügt Schnellsprüunge in die Seite ein.
4 * @author [email protected]
5 */
6SP.Class.define('SP.Scrolling', {
7
8  /**
9   * @constructor
10   * @access public
11   */
12  init: function (options) {
13    var options = SP.Object.apply({
14          position: "bottom",
15          touchOnly: true
16        }, options);
17
18    if ((options.touchOnly === false || (options.touchOnly === true && Modernizr && Modernizr.touch))) {
19      var trigger = document.createElement("a");
20          trigger.href = "#SP-global";
21          trigger.id = "SP-scroller";
22          trigger.innerHTML = "<i class=\"SP-scroller-icon SPi SPi-arr-up\"><span class=\"SP-acc-hide\">nach oben springen</span></i>";
23
24      if (options.position == "top") {
25        SP.DomUtils.addClass(trigger, "SP-scroller-top");
26      } else if (options.position == "bottom") {
27        SP.DomUtils.addClass(trigger, 'SP-scroller-bottom');
28      }
29
30      var page = document.getElementById("SP-global");
31          page.appendChild(trigger);
32
33      var toggle = function () {
34        var scrollPos = window.pageYOffset || document.documentElement.scrollTop;
35        if (scrollPos > 0) {
36          SP.DomUtils.addClass(trigger, "SP-scroller-visible");
37        } else {
38          SP.DomUtils.removeClass(trigger, "SP-scroller-visible");
39        }
40      }
41
42      toggle();
43      SP.Event.addListener(window, "scroll", function () {
44        toggle();
45      });
46      SP.Event.addListener(window, "resize", function () {
47        toggle();
48      });
49    }
50  }
51});

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.