PageSourceSearch

https://suitedash.com/wp-content/uploads/2022/02/scroll_to_top_helpscout.js

js suitedash.com collected 2026-09-24 18:10:47 UTC 2,418 bytes, 67 lines download raw bytes

1
2
3/* Please ❤ this if you like it! */
4
5
6
7(function($) { "use strict";
8
9    //Switch dark/light
10
11    $(".switch").on('click', function () {
12        if ($("body").hasClass("light")) {
13            $("body").removeClass("light");
14            $(".switch").removeClass("switched");
15        }
16        else {
17            $("body").addClass("light");
18            $(".switch").addClass("switched");
19        }
20    });
21
22    $(document).ready(function(){"use strict";
23        var html = `<div class="progress-wrap"> 
24         <svg class="progress-circle svg-content" width="100%" height="100%" viewbox="-1 -1 102 102"> 
25          <path d="M50,1 a49,49 0 0,1 0,98 a49,49 0 0,1 0,-98"></path> 
26         </svg> 
27        </div>`
28        //Scroll back to top
29        if(jQuery('.progress-wrap').length == 0 && window.location.hostname == 'help.suitedash.com') {
30          jQuery('#fullArticle').append(html);
31        }
32
33        var progressPath = document.querySelector('.progress-wrap path');
34        var pathLength = progressPath.getTotalLength();
35        progressPath.style.transition = progressPath.style.WebkitTransition = 'none';
36        progressPath.style.strokeDasharray = pathLength + ' ' + pathLength;
37        progressPath.style.strokeDashoffset = pathLength;
38        progressPath.getBoundingClientRect();
39        progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear';
40        var updateProgress = function () {
41            var scroll = $(window).scrollTop();
42            var height = $(document).height() - $(window).height();
43            var progress = pathLength - (scroll * pathLength / height);
44            progressPath.style.strokeDashoffset = progress;
45        }
46        updateProgress();
47        $(window).scroll(updateProgress);
48        var offset = 50;
49        var duration = 550;
50        jQuery(window).on('scroll', function() {
51            if (jQuery(this).scrollTop() > offset) {
52                jQuery('.progress-wrap').addClass('active-progress');
53            } else {
54                jQuery('.progress-wrap').removeClass('active-progress');
55            }
56        });
57
58        jQuery('.progress-wrap').on('click', function(event) {
59            event.preventDefault();
60            jQuery('html, body').animate({scrollTop: 0}, duration);
61            return false;
62        })
63
64
65    });
66
67})(jQuery);

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.