mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 05:11:13 -05:00
- Created a base email template (base.html) for consistent styling across all emails. - Added moderation approval email template (moderation_approved.html) to notify users of approved submissions. - Added moderation rejection email template (moderation_rejected.html) to inform users of required changes for their submissions. - Created password reset email template (password_reset.html) for users requesting to reset their passwords. - Developed a welcome email template (welcome.html) to greet new users and provide account details and tips for using ThrillWiki.
30 lines
884 B
JavaScript
30 lines
884 B
JavaScript
'use strict';
|
|
{
|
|
// Call function fn when the DOM is loaded and ready. If it is already
|
|
// loaded, call the function now.
|
|
// http://youmightnotneedjquery.com/#ready
|
|
function ready(fn) {
|
|
if (document.readyState !== 'loading') {
|
|
fn();
|
|
} else {
|
|
document.addEventListener('DOMContentLoaded', fn);
|
|
}
|
|
}
|
|
|
|
ready(function() {
|
|
function handleClick(event) {
|
|
event.preventDefault();
|
|
const params = new URLSearchParams(window.location.search);
|
|
if (params.has('_popup')) {
|
|
window.close(); // Close the popup.
|
|
} else {
|
|
window.history.back(); // Otherwise, go back.
|
|
}
|
|
}
|
|
|
|
document.querySelectorAll('.cancel-link').forEach(function(el) {
|
|
el.addEventListener('click', handleClick);
|
|
});
|
|
});
|
|
}
|