PageSourceSearch

https://www.borderstates.com/_ui/responsive/common/js/jquery.ajaxQueue.js

js borderstates.com collected 2026-10-03 21:42:59 UTC 1,278 bytes, 51 lines download raw bytes

1/*! jQuery Ajax Queue - v0.1.2pre - 2013-03-19
2* https://github.com/gnarf37/jquery-ajaxQueue
3* Copyright (c) 2013 Corey Frang; Licensed MIT */
4(function($) {
5
6    
7
8// jQuery on an empty object, we are going to use this as our Queue
9var ajaxQueue = $({});
10
11$.ajaxQueue = function( ajaxOpts ) {
12    var jqXHR,
13        dfd = $.Deferred(),
14        promise = dfd.promise();
15
16    // run the actual query
17    function doRequest( next ) {
18        jqXHR = $.ajax( ajaxOpts );
19        jqXHR.done( dfd.resolve )
20            .fail( dfd.reject )
21            .then( next, next );
22    }
23
24    // queue our ajax request
25    ajaxQueue.queue( doRequest );
26
27    // add the abort method
28    promise.abort = function( statusText ) {
29
30        // proxy abort to the jqXHR if it is active
31        if ( jqXHR ) {
32            return jqXHR.abort( statusText );
33        }
34
35        // if there wasn't already a jqXHR we need to remove from queue
36        var queue = ajaxQueue.queue(),
37            index = $.inArray( doRequest, queue );
38
39        if ( index > -1 ) {
40            queue.splice( index, 1 );
41        }
42
43        // and then reject the deferred
44        dfd.rejectWith( ajaxOpts.context || ajaxOpts, [ promise, statusText, "" ] );
45        return promise;
46    };
47
48    return promise;
49};
50
51})(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.