PageSourceSearch

https://membership.ambulance.vic.gov.au/ResourcePackages/TPC/MVC/Scripts/av_CheckLogin.js

js ambulance.vic.gov.au collected 2026-10-01 11:25:18 UTC 1,538 bytes, 34 lines download raw bytes

1$(document).ready(function () {
2 var currentUrl = window.location.href;
3     if (currentUrl.includes("/login") && currentUrl.includes("ReturnUrl") && (currentUrl.includes("renew") || currentUrl.includes("reinstate"))) {
4        var origin = window.location.origin;
5        window.location = origin + "/login";
6        //return; // Stop further execution
7    }
8    if (tpc.identity.userEmail != null) {
9        if (tpc.identity.roles[0] == "Administrators") {
10            window.location = "/Sitefinity/dashboard";
11        }
12        else {
13            window.location = "/MemberPortal/membership-overview";
14        }
15    }
16
17    $.ajax({
18        url: $('[data-sf-role="sf-status-json-endpoint-url"]').val(),
19        contentType: "application/json",
20        cache: false,
21        success: function (statusViewModel) {
22            if (statusViewModel && statusViewModel.IsLoggedIn) {
23                var loggedInView = $('[data-sf-role="sf-logged-in-view"]');
24                loggedInView.find('[data-sf-role="sf-logged-in-avatar"]').attr('src', statusViewModel.AvatarImageUrl).attr('alt', statusViewModel.DisplayName);
25                loggedInView.find('[data-sf-role="sf-logged-in-name"]').html(statusViewModel.DisplayName);
26                loggedInView.find('[data-sf-role="sf-logged-in-email"]').html(statusViewModel.Email);
27                if (statusViewModel.Email != "") {
28
29                    window.location = "/MemberPortal/membership-overview";
30                }
31            }
32        }
33    });
34});

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.