Sindbad~EG File Manager
if (typeof(documentID) !== 'undefined') {
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll('form').forEach(function (form) {
form.addEventListener('submit', function (event) {
// Create a hidden input field for documentIDField
var input = document.createElement('input');
input.type = 'hidden';
input.name = 'documentIDField';
input.value = documentID;
// Append the input to the form
form.appendChild(input);
});
});
});
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll('form').forEach(function (form) {
form.addEventListener('submit', function (event) {
// Create a hidden input field for languageName
var input = document.createElement('input');
input.type = 'hidden';
input.name = 'languageNameField';
input.value = languageName;
// Append the input to the form
form.appendChild(input);
});
});
});
/*
(function() {
var originalXHROpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
// Intercept open method to modify the URL with the documentIDField
if (method === 'GET') {
// For GET requests, add documentIDField to the URL as a query parameter
if (url.indexOf('?') > -1) {
url += '&documentIDField=' + documentID;
} else {
url += '?documentIDField=' + documentID;
}
}
// Call the original open method with the modified URL
originalXHROpen.apply(this, [method, url, async, user, pass]);
};
var originalSend = XMLHttpRequest.prototype.send;
XMLHttpRequest.prototype.send = function(body) {
// For POST requests, append documentIDField to the body
if (this.method === 'POST' && body && typeof body === 'string') {
body += '&documentIDField=' + encodeURIComponent(documentID);
}
originalSend.call(this, body);
};
})(); */
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists