PageSourceSearch

https://dallaspolice.net/Style%20Library/DallasPolice/JS/GetDPDReportsLinks.js

js dallaspolice.net collected 2026-10-01 10:43:22 UTC 1,516 bytes, 47 lines download raw bytes

1$(document).ready(function () {	 
2	getDPDReportsLinks();	
3});
4
5function getDPDReportsLinks(){
6	
7	var dc = this;
8	var requestUri = window.location.protocol + "//" + window.location.host + _spPageContextInfo.siteServerRelativeUrl + "_api/web/lists/getbytitle('DPDReportsLinks')/items";
9	dc.successCallback = function (responseData, ResultsItems, queryTxt) 
10	{        
11		pCount = responseData.d.results.length;
12		var output="";
13		var target="_self";
14		responseData.d.results.forEach(Display);
15		function Display(element, index, array)
16		{  			
17            var target = getTarget(element.URL);
18			if (element.Important == true) {
19				output += '<a role="button" target="' + target + '" href="' + element.URL.Url + '" class="btn btn-default" style="background-color: #f7cc3f;"><span class="glyphicon glyphicon-star" aria-hidden="true"></span> ' + element.URL.Description + ' <span class="glyphicon glyphicon-star" aria-hidden="true"></span></a>';					
20			} else {
21				output += '<a role="button" target="' + target + '" href="' + element.URL.Url + '" class="btn btn-default">' + element.URL.Description + '</a>';					
22			}
23		}     
24		$("#dpdreports").html(output);
25	}     
26
27	dc.failureCallback = function (error) {
28		console.log("error");
29	}
30
31	execAjax(
32		requestUri,
33		dc.successCallback,
34		dc.failureCallback,
35		false
36		)
37}
38
39function getTarget(link){
40      if(link && link.Url){
41        if(link.Url.endsWith(".pdf"))
42          return "_blank";
43      else
44      	  return "_self";
45      }else
46          return "_self";
47}

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.