PageSourceSearch

https://aamft.org/ScriptResource.axd?d=xtDSkLnUefsDkXzy1V9OGXwH4Qu…98fs-l7-NLUwTTXP8k6nyzw2&t=ffffffff92637136

js aamft.org collected 2026-09-24 08:46:09 UTC 1,936 bytes, 43 lines download raw bytes

1function Asi_WebRoot_AsiCommon_ContentManagement_DownloadDocument() {
2
3    var oldJavascriptTextPrefix = 'javascript://['; //No longer supported due to XSS vulnerabilities, href placeholder for button click logic created in ContentLinkDialog.js
4    var oldJavascriptTextSuffix = ']'; //also used for placeholder href
5    var javascriptPathPrefix = '/common/'; // New method of inserting download links
6    var downloadButton;
7    var hiddenField;
8    var my;
9
10    this.OnLoad = function (downloadButtonId, hiddenDownloadField) {
11        my = this;
12        downloadButton = jQuery(downloadButtonId);
13        hiddenField = jQuery(hiddenDownloadField);
14        var container = downloadButton.closest(".ContentItemContainer");
15        //look for links with href placeholders created by ContentLinkDialog.js for download file links
16        container.find("a[href^='javascript://'], a[download='']").each(function () {
17            jQuery(this).click(function (e) {
18                e.preventDefault();
19                my.OnClick(jQuery(this).prop("href"));
20            });
21        });
22    };
23
24    this.OnClick = function (href) {
25        //parse out path
26        var path = my.ExtractPathFromHref(href);
27        hiddenField.val(path);
28        downloadButton.click();//sends to server for requested file
29    };
30
31    this.ExtractPathFromHref = function (href) {
32        if (href.startsWith("javascript://")) {
33            var startIndex = oldJavascriptTextPrefix.length;
34            var endIndex = href.length - oldJavascriptTextSuffix.length;
35        }
36        else {
37            var startIndex = href.indexOf(javascriptPathPrefix) + javascriptPathPrefix.length; /*may need to check if javascriptPathPrefix is found */
38            var endIndex = href.length;
39        }              
40        var pathWithoutJavascript = href.slice(startIndex, endIndex);
41        return pathWithoutJavascript;
42    };
43}

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.