-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Montserrat font & cleaner mdai popup
- Loading branch information
Showing
4 changed files
with
55 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
function mdai() { | ||
const popup = document.getElementById('custom-popup'); | ||
const popupMessage = document.getElementById('popup-message'); | ||
const closePopup = document.getElementsByClassName('close-popup')[0]; | ||
const popup = document.createElement('div'); | ||
popup.className = 'custom-popup'; | ||
popup.innerHTML = ` | ||
<div class="popup-content"> | ||
<span class="close-popup">×</span> | ||
<div id="popup-message">This project was completed with AI assistance</div> | ||
</div> | ||
`; | ||
|
||
document.body.appendChild(popup); | ||
|
||
popupMessage.textContent = "This project was completed with AI assistance"; | ||
popup.style.display = "block"; | ||
|
||
closePopup.onclick = function() { | ||
popup.style.display = "none"; | ||
} | ||
const closePopup = () => { | ||
popup.remove(); | ||
}; | ||
|
||
window.onclick = function(event) { | ||
if (event.target == popup) { | ||
popup.style.display = "none"; | ||
} | ||
} | ||
popup.querySelector('.close-popup').onclick = closePopup; | ||
popup.onclick = (e) => { | ||
if (e.target === popup) closePopup(); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters