/usr/lib/python2.7/dist-packages/sagenb/data/sage/js/async_lib.js is in python-sagenb 0.13+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /*global $ */
/*jslint white: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, strict: true, newcap: true, immed: true */
//"use strict";
function generic_callback(status, response_text) {
/* do nothing */
}
function async_request(url, callback, postvars) {
var settings = {
url : url,
async : true,
cache : false,
dataType: "text"
};
if ($.isFunction(callback)) {
settings.error = function (XMLHttpRequest, textStatus, errorThrown) {
callback("failure", errorThrown);
};
settings.success = function (data, textStatus) {
callback("success", data);
};
}
if (postvars) {
settings.type = "POST";
settings.data = postvars;
} else {
settings.type = "GET";
}
$.ajax(settings);
}
|