|
var attendance = "<WHOEVER_TAKES_ATTENDANCE_FOR_YOU>"; |
|
var bcc = "<YOUR_EMAIL ADDRESS_GOES_HERE>"; |
|
|
|
var d = new Date(); |
|
var bodyText = d.toDateString() + '\n' + d.toTimeString() + '\n\n\n'; |
|
var className= $("header>div>div div").text().substr(0,2); |
|
var subject = 'Absent Students from ' + className; |
|
|
|
var late = $("img[src='/be0f7a34ef27e82a28e9005115e57754.png']").parent().parent().prev().children(); |
|
|
|
bodyText += subject + '\n'; |
|
|
|
for(i = 0; i < late.length; i++) { |
|
if(i % 2 !== 0) { |
|
bodyText += late[i].innerText + "\n"; |
|
} else { |
|
bodyText += late[i].innerText + " "; |
|
} |
|
} |
|
|
|
window.location.href = "mailto:" + attendance + "?bcc=" + bcc + "&subject=" + encodeURIComponent(subject) + "&body="+ encodeURIComponent(bodyText); |
|
/////////////////////////////////////////////////////// |
|
var absentSrc = '/be0f7a34ef27e82a28e9005115e57754.png'; |
|
var lateSrc = '/a88b6d72d410a8cea1d8ab18a04c44d4.png'; |
|
|
|
|
|
/////////////////////////////////////////////////////// |
|
var fname = absent[0].parentElement.parentElement.previousSibling.firstChild.firstChild.innerHTML |
|
var lname = absent[0].parentElement.parentElement.previousSibling.lastChild.firstChild.innerHTML |
|
|
|
function getAbsentNames () { |
|
var subjectLine = "Absent Students from " + document.querySelector('#reactApplication > div > div > header > div > div:nth-child(2) > div').innerHTML; |
|
|
|
var absents = document.querySelectorAll("img[src='/be0f7a34ef27e82a28e9005115e57754.png']"); |
|
|
|
var bodyLine = ["Todays date is " + new Date().toDateString() + "\n"]; |
|
|
|
for(var i = 0; i < absents.length - 1; i++) { |
|
var fname = absents[i].parentElement.parentElement.previousSibling.firstChild.firstChild.innerHTML; |
|
var lname = absents[i].parentElement.parentElement.previousSibling.lastChild.firstChild.innerHTML; |
|
|
|
bodyLine.push(fname + ' ' + lname + '\n'); |
|
} |
|
|
|
console.log(bodyLine.join('')); |
|
} |
|
|
|
var fname = absents[i].parentElement.parentElement.previousSibling.firstChild.firstChild.innerHTML; |
|
var lname = absents[i].parentElement.parentElement.previousSibling.lastChild.firstChild.innerHTML; |
|
studentNames.push(fname + ' ' + lname); |