PageSourceSearch

https://wearebombo.com/wp-content/plugins/rometheme-for-elementor/widgets/assets/js/back_to_top.js?ver=1.6.8

js wearebombo.com collected 2026-09-24 10:46:25 UTC 2,050 bytes, 65 lines download raw bytes

1jQuery(window).on("elementor/frontend/init", function () {
2  elementorFrontend.hooks.addAction(
3    "frontend/element_ready/rkit-back-to-top.default",
4    function ($scope, $) {
5      const container = $scope.find(".rkit-back-to-top-container");
6      let $settings = container.data("settings");
7
8      const button = $scope.find(".rkit-back-to-top-button");
9      let foreground = $settings.foreground;
10      let background = $settings.background;
11
12      if ($settings.style == "progress") {
13        const canvas = $scope.find(".scroll-progress")[0];
14        const ctx = canvas.getContext("2d");
15        const radius = 100; // Radius tetap
16
17        function drawCircle(progress) {
18          ctx.clearRect(0, 0, canvas.width, canvas.height);
19          ctx.beginPath();
20          ctx.arc(canvas.width / 2, canvas.height / 2, radius, 0, Math.PI * 2);
21          ctx.strokeStyle = background;
22          ctx.lineWidth = 10;
23          ctx.stroke();
24
25          ctx.beginPath();
26          ctx.arc(
27            canvas.width / 2,
28            canvas.height / 2,
29            radius,
30            -Math.PI / 2,
31            progress * 2 * Math.PI - Math.PI / 2
32          );
33          ctx.strokeStyle = foreground;
34          ctx.lineWidth = 10;
35          ctx.stroke();
36        }
37
38        function updateCircle() {
39          const scrollTop = $(window).scrollTop();
40          const docHeight = $(document).height() - $(window).height();
41          const scrollPercent = scrollTop / docHeight;
42          drawCircle(scrollPercent);
43        }
44
45        $(window).on("scroll", updateCircle);
46        drawCircle(0);
47      }
48
49      button.on("click", function (e) {
50        e.preventDefault();
51        window.scrollTo({ top: 0, behavior: "smooth" });
52      });
53
54      $(window).on("scroll", function (e) {
55        button.removeClass("show");
56      });
57
58      $(window).on("scrollend", function () {
59        if ($(this).scrollTop() > 100) {
60          button.addClass("show");
61        }
62      });
63    }
64  );
65});

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.