tidusx18
7/5/2017 - 6:40 PM

Creates availability dates from the Date Management page in Blackboard.

Creates availability dates from the Date Management page in Blackboard.

var rows = document.querySelectorAll('#dateRolloverSummaryTable_databody tr');

var modal = document.createElement('p');
modal.setAttribute('style',
`
display: block;
background-color: rgb(255, 255, 255);
position: fixed;
z-index: 9999;
left: 22%;
top: 26%;
width: 1000px;
height: auto;
box-shadow: 0px 0px 30px 0px #969696;
padding: 40px;
`
);

document.body.appendChild(modal)

for(row of rows) {
	let name = row.querySelector('th').firstChild.textContent;
	let start = row.querySelector('td:nth-child(5) div span');
	let end = row.querySelector('td:nth-child(6) div span');
  // let due = row.querySelector('td:nth-child(4) div span');

	if(start && end) {
    modal.innerHTML +=`${name} Available From ${start.textContent} at 5:00 AM - ${end.textContent} at 11:55 PM<br>`;
  }
}