1/* I modified https://github.com/browserstate/ajaxify to remove the polyfill requirement, and for specific site applications */ 2 3wolfgangs.ajaxify = wolfgangs.ajaxify || { 4 "enabled": false 5}; 6 7wolfgangs.ajaxify.pages = []; 8wolfgangs.ajaxify.pages.push(window.location.href.replace(window.location.protocol + '//' + window.location.hostname, '')); 9 10wolfgangs.ajaxify.errorOffset = 70; 11 12wolfgangs.ajaxify.goto = function (url, callback, error) { 13 "use strict"; 14 if (callback) { 15 if (wolfgangs.ajaxify.spinnerId) { /* remove spnner if present to not double-up */ 16 wolfgangs.spinner.dialog.destroy(wolfgangs.ajaxify.spinnerId); 17 } 18 wolfgangs.ajaxify.spinnerId = wolfgangs.spinner.dialog.create("loading…"); 19 jQuery.ajax({ 20 "url": url, 21 "success": function (data) { 22 "use strict"; 23 wolfgangs.spinner.dialog.check(wolfgangs.ajaxify.spinnerId, true); 24 callback(data, url); 25 var $errors = jQuery(".error"); /* scroll up to the error if necessary */ 26 if ($errors.length) { 27 jQuery(window).scrollTop($errors.eq(0).offset().top - wolfgangs.ajaxify.errorOffset); 28 } else { 29 // force a scroll to the top of the page 30 window.scrollTo(0, 0); 31 } 32 }, 33 "error": error 34 }); 35 } else { 36 if (wolfgangs.ajaxify.enabled) { 37 jQuery(window).trigger("statechange", url); 38 } else { 39 window.location.href = url; 40 } 41 } 42}; 43 44/* rest of this JS is in authenticated.js */
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.