Group Toolbar Menu

Forums » The Harbinger » A Gathering of the Crew

There was a call made to the entire crew of the Harbinger to gather in the galley, where the squirrel captain was already waiting for everyone to assemble - he'd stand beside the windows that showed the waters that they already sailed through and the wake of the Harbinger as she sailed ahead, turning around and holding out a paw in-case there was some idle chatter to silence.

"This has admittedly been an error of mine to announce this so late and for that, I apologize."

There was a slight bow as Nykita would make a small bow towards the crew.

"I did not mean to keep any of you in the dark about our current destination - it is an island located north east of the main Kasurian coast, a place known as Shadow Haven, Thunder Gate. On that island is the supposed wreck of an old airship, containing some cargo that our esteemed partner wishes to obtain and leaves us free claim on anything else of value on that wreckage; that is our deal and payment for this voyage. I took it because I have been to Shadow Haven many years ago and I have a curiousity to visit it once more and sail away with some treasure in our cargo instead some small amount of trade goods!"

Pausing for a moment, Nykita took a moment to survey those gathered with a slow sweep of his crimson gaze across the familiar faces.

"Once this voyage is over, we shall rest before I decide our next destination and I will make sure that you all know what it is."

Moderators: Nocturnal Aymen (played by PaganSpirit) Sofey Eristis (played by Lionheart) Nykita Aymen (played by Nykita)

"use strict"; (function() { const TYPING_DELAY = 500; const MAX_AGE_HOURS = 48; let typingTimers = {}; function isLocalStorageAvailable() { try { const test = '__localStorage_test__'; localStorage.setItem(test, test); localStorage.removeItem(test); return true; } catch(e) { console.warn('localStorage is not available:', e); return false; } } function saveContentDraft(key, value) { if (!isLocalStorageAvailable()) return; try { const data = { content: value, timestamp: Date.now() }; localStorage.setItem(key, JSON.stringify(data)); } catch(e) { console.error('Failed to save draft:', e); } } function restoreContentDraft(key) { if (!isLocalStorageAvailable()) return null; try { const stored = localStorage.getItem(key); if (!stored) return null; const data = JSON.parse(stored); // Check if draft is too old const age = Date.now() - data.timestamp; if (age > MAX_AGE_HOURS * 60 * 60 * 1000) { localStorage.removeItem(key); return null; } return data.content; } catch(e) { console.error('Failed to restore draft:', e); return null; } } // Clear specific draft function clearContentDraft(key) { if (!isLocalStorageAvailable()) return; try { localStorage.removeItem(key); } catch(e) { console.error('Failed to clear draft:', e); } } // Show notification to user function showContentRecoveryNotification(element) { const notification = document.createElement('div'); notification.style.cssText = 'padding: 10px; margin-bottom: 10px; background-color: #d4edda; border: 1px solid #c3e6cb; color: #155724; border-radius: 4px; font-size: 14px;'; notification.innerHTML = '✓ Your previous draft has been restored. Dismiss'; // Insert before the element element.parentNode.insertBefore(notification, element); // Dismiss on click notification.querySelector('a').addEventListener('click', function(e) { e.preventDefault(); notification.remove(); }); // Auto-dismiss after 10 seconds setTimeout(() => { if (notification.parentNode) { notification.remove(); } }, 10000); } // Initialize auto-save for an element function initAutoSave(element, storageKey) { if (!element || !storageKey) return; // Restore saved content on page load const savedContent = restoreContentDraft(storageKey); if (savedContent && savedContent !== element.value) { element.value = savedContent; showContentRecoveryNotification(element); } // Save on user input (debounced) function handleInput() { clearTimeout(typingTimers[storageKey]); typingTimers[storageKey] = setTimeout(function() { saveContentDraft(storageKey, element.value); }, TYPING_DELAY); } element.addEventListener('input', handleInput); element.addEventListener('change', handleInput); // Clear draft on form submission const form = element.closest('form'); if (form) { form.addEventListener('submit', function() { clearContentDraft(storageKey); }); } } function cleanupOldContentDrafts() { if (!isLocalStorageAvailable()) return; try { const keys = Object.keys(localStorage); const now = Date.now(); keys.forEach(key => { if (key.startsWith('draft_')) { try { const stored = localStorage.getItem(key); const data = JSON.parse(stored); if (data.timestamp && (now - data.timestamp) > MAX_AGE_HOURS * 60 * 60 * 1000) { localStorage.removeItem(key); } } catch(e) { // Invalid data, remove it localStorage.removeItem(key); } } }); } catch(e) { console.error('Failed to cleanup old drafts:', e); } } // Initialize on DOM ready if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init() { cleanupOldContentDrafts(); // Auto-initialize elements with data-draft-key attribute document.querySelectorAll('[data-draft-key]').forEach(function(element) { const draftKey = element.getAttribute('data-draft-key'); initAutoSave(element, draftKey); }); } // Expose API for manual initialization window.DraftContentRecovery = { init: initAutoSave, save: saveContentDraft, restore: restoreContentDraft, clear: clearContentDraft }; })();