/usr/lib/python2.7/dist-packages/sagenb_export/nbextension/www/sagenb-export.js is in python-sagenb-export 3.2-3.
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 | 'use strict';
function getCookie(name) {
var r = document.cookie.match("\\b" + name + "=([^;]*)\\b");
return r ? r[1] : undefined;
}
var exportSageNB = function(uniqueId) {
console.log('Converting ' + uniqueId);
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (xhttp.readyState == 4 && xhttp.status == 200) {
var url = 'http://' + document.location.host + xhttp.responseText;
var win = window.open(url, '_blank');
win.focus();
} else {
document.querySelector('.error').innerText = xhttp.responseText;
}
};
xhttp.open('POST', '/sagenb/export', false);
xhttp.setRequestHeader('X-Xsrftoken', getCookie("_xsrf"));
xhttp.send(uniqueId);
};
|