diff --git a/js/alertBar.js b/js/alertBar.js index 45b8d35..82780b7 100644 --- a/js/alertBar.js +++ b/js/alertBar.js @@ -3,27 +3,17 @@ * Code courtesy of UCI */ var alertBanner = window.setInterval(function () { - var date = new Date(); - if (date.getFullYear() == 2023 && date.getMonth() > 7 && date.getMonth() < 10) { - var prmAlertBar = document.getElementsByClassName('topbar-wrapper'); - var alertBarDiv = document.createElement('div'); - alertBarDiv.setAttribute('id', 'customAlertBar'); - alertBarDiv.setAttribute('style', 'align-content: center;align-items: center;'); - alertBarDiv.setAttribute('layout-align', 'center center'); - var alertBarInnerDiv = document.createElement('div'); - - if ((date.getMonth() == 8 && date.getDate() > 10 && date.getDate() < 23)) { - alertBarInnerDiv.setAttribute('style', 'text-align: center;background-color: #FFCE34;padding: 3px 0;font-size: 15px; color: #000000; font-family: Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;'); - alertBarInnerDiv.innerHTML = 'September 18-22, 2023: Art & Architecture General Collection print materials with call numbers N-NC will be unavailable while they are relocated to the 2nd floor, Mountain Sidesecond floor map.
To learn more, click here.'; - } - else if ((date.getMonth() == 8 && date.getDate() > 22) || (date.getMonth() == 9 && date.getDate() < 24)) { - alertBarInnerDiv.setAttribute('style', 'text-align: center;background-color: #FFCE34;padding: 3px 0;font-size: 18px; color: #000000; font-family: hind_regularregular, Helvetica, Arial, sans-serif; line-height: 1.5em; font-weight: 600'); - alertBarInnerDiv.innerHTML = 'Art & Architecture General Collection print materials with call numbers N-NC are temporarily located on the 2nd floor, Mountain Sidesecond floor map.
To learn more, click here.'; - } - alertBarDiv.appendChild(alertBarInnerDiv); - prmAlertBar[0].prepend(alertBarDiv); - clearInterval(alertBanner); - } + var prmAlertBar = document.getElementsByClassName('topbar-wrapper'); + var alertBarDiv = document.createElement('div'); + alertBarDiv.setAttribute('id', 'customAlertBar'); + alertBarDiv.setAttribute('style', 'align-content: center;align-items: center;'); + alertBarDiv.setAttribute('layout-align', 'center center'); + var alertBarInnerDiv = document.createElement('div'); + alertBarInnerDiv.setAttribute('style', 'text-align: center;background-color: #FFCE34;padding: 3px 0;font-size: 15px; color: #000000; font-family: Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;'); + alertBarInnerDiv.innerHTML = 'Some Art & Architecture collection materials are currently inaccessible for browsing due to construction and must be requested.
Requested materials will be paged Monday-Friday and must be picked up at the Services Desk. Learn more.'; + alertBarDiv.appendChild(alertBarInnerDiv); + prmAlertBar[0].prepend(alertBarDiv); + clearInterval(alertBanner); }, 5000); /** * End Alert Bar