Welcome to M.I.N.N.E.S.O.T.A.

M.I.N.N.E.S.O.T.A. (Minnesota Institute for Not Necessarily Evidence-Supported Observations, Theories, and Anecdotes) is the premier research institution dedicated to documenting Minnesota's most important cultural phenomena, historical events, and legendary figures—regardless of their verifiability.

Our Mission

The Institute is committed to preserving and sharing Minnesota's rich heritage of questionable facts, dubious claims, and thoroughly entertaining stories that may or may not have actually happened. We believe that truth is less important than a good story, especially when that story involves hotdish.

Featured Research

Explore our comprehensive archives documenting crucial Minnesota phenomena, from the legendary Giant Paul Bunyan incident of 1987 to the ongoing Great Hotdish Wars that continue to shape the state's culinary and political landscape.

Our researchers have meticulously documented unique Minnesota customs like The Minnesota Goodbye, a complex social ritual that can extend social gatherings by several hours, and investigated sightings of the elusive Lake Minnetonka Monster, which demonstrates remarkable camera-avoidance abilities.

📚 Browse our complete collection of research documents in the Table of Contents.

About Our Research Methods

The Institute employs rigorous* research methodologies to ensure the authenticity** of all documented phenomena. Our findings have been thoroughly peer-reviewed*** by leading experts**** in the field of Minnesota studies.

Institute Standards

Research Quality Assurance:
*Rigorous: We ask at least two people if they've heard the story
**Authenticity verified through the "Minnesota Nice Test": Does it sound like something a Minnesotan would do?
***Peer review conducted at coffee shops, church basements, and ice fishing houses
****Experts: Individuals who have survived more than three Minnesota winters and can pronounce "Wayzata" correctly

Contact the Institute

For research inquiries, story submissions, or hotdish-related disputes, please contact us through the traditional Minnesota method of bringing up your concerns during casual conversation at the grocery store checkout line.

` }, "giant-paul-bunyan": { "title": "The Giant Paul Bunyan Incident of 1987", "content": `
Paul Bunyan Incident
Date:
July 4, 1987
Location:
Bemidji, Minnesota
Casualties:
12 lawn chairs, 1 hot dog stand
Status:
Covered up by Big Tourism

The Giant Paul Bunyan Incident of 1987 remains the most controversial event in Minnesota tourism history, despite efforts by the Minnesota Tourism Board to suppress all documentation of the occurrence.

Background

The 18-foot Paul Bunyan statue in Bemidji had been behaving normally for decades, standing stoically next to Babe the Blue Ox and posing for countless tourist photographs. However, witnesses report that on the morning of July 4th, 1987, the statue began exhibiting what can only be described as "aggressive tourist interaction patterns."

The Incident

According to eyewitness testimony collected by M.I.N.N.E.S.O.T.A. researchers, the statue first showed signs of animation at approximately 10:30 AM during the annual Fourth of July picnic. Mrs. Ethel Nordstrom of Bagley reported that Paul's axe began "twitching menacingly" whenever tourists attempted to pose for photos without purchasing souvenirs from the adjacent gift shop.

The situation escalated rapidly when the Bunyan statue reportedly stood up, stretched (causing several car alarms to activate from the sonic boom), and began actively herding tourists toward the gift shop while muttering something about "authentic Minnesota experiences" and "supporting local businesses."

See Also

• The Minnesota Goodbye
• Lake Minnetonka Monster

` }, "minnesota-goodbye": { "title": "The Minnesota Goodbye", "content": `

The Minnesota Goodbye is a complex social ritual practiced throughout the state of Minnesota, characterized by its ability to extend any social gathering by a minimum of 45 minutes to several hours beyond the initial departure announcement.

Definition and Characteristics

Unlike the abrupt departures common in other regions, the Minnesota Goodbye follows a strict protocol that ensures no one's feelings are hurt and that all participants have multiple opportunities to share additional anecdotes, weather observations, and casserole recipes.

The Seven Stages

Stage 1: The Initial Announcement (5-15 minutes)

The departing party announces their intention to leave, usually prefaced with observations about the time, weather, or upcoming obligations.

Stage 2: The Coat Gathering Ceremony (10-20 minutes)

Participants begin the ritual collection of coats, purses, and casserole dishes.

See Also

• The Great Hotdish Wars

` }, "hotdish-wars": { "title": "The Great Hotdish Wars", "content": `

The Great Hotdish Wars refer to the ongoing series of culinary conflicts that have shaped Minnesota's social and political landscape since the early 1950s.

Historical Background

The conflict began innocuously in 1953 when Marge Olson of Hibbing claimed at the annual Lutheran church potluck that her tater tot hotdish was "the best in the Range."

See Also

• The Minnesota Goodbye
• Lake Minnetonka Monster

` }, "lake-monster": { "title": "Lake Minnetonka Monster", "content": `
Lake Minnetonka Monster
First Sighting:
June 15, 1923
Status:
Politely elusive

The Lake Minnetonka Monster, affectionately known as "Tonka" by local residents, is Minnesota's most courteous cryptid.

Discovery and Early Sightings

The creature was first spotted on June 15, 1923, by Margaret Lindström while she was hanging laundry near the shoreline.

See Also

• Giant Paul Bunyan Incident

` } }; // Initialize the page document.addEventListener('DOMContentLoaded', function() { console.log('Initializing M.I.N.N.E.S.O.T.A. wiki...'); const adminSidebar = document.getElementById('admin-sidebar'); if (adminSidebar) { adminSidebar.classList.add('hidden'); } const existingMessages = document.querySelectorAll('.error, .success'); existingMessages.forEach(msg => msg.remove()); loadGitHubConfig(); showHome(); updateSidebar(); updatePublicLastUpdated(); updateVersionDisplay(); console.log('Wiki initialized. Current version:', wikiVersion); console.log('Last saved:', lastSaved); console.log('Articles count:', Object.keys(articles).length); }); // Authentication functions async function authenticateWithAPI(password) { try { console.log('Attempting authentication with API:', `${API_BASE_URL}/auth`); const response = await fetch(`${API_BASE_URL}/auth`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ password: password }) }); const data = await response.json(); if (data.success) { githubToken = data.githubToken; return true; } else { showMessage(`Authentication failed: ${data.message}`, 'error'); return false; } } catch (error) { console.error('Authentication error:', error); showMessage(`Authentication service error: ${error.message}`, 'error'); return false; } } async function handleAdminLogin() { const password = document.getElementById('admin-login-password').value; const loginBtn = document.getElementById('login-btn'); if (!password) { showMessage('Please enter a password.', 'error'); return; } loginBtn.disabled = true; loginBtn.textContent = 'Authenticating...'; const success = await authenticateWithAPI(password); if (success) { isLoggedIn = true; updateAdminContent(); updateAuthStatus(); showMessage('Successfully logged in as administrator.', 'success'); } else { showMessage('Invalid password. Access denied.', 'error'); } loginBtn.disabled = false; loginBtn.textContent = 'Login'; } function handleAdminLoginKeypress(event) { if (event.key === 'Enter') { handleAdminLogin(); } } function handleAdminLogout() { isLoggedIn = false; githubToken = null; updateAdminContent(); updateAuthStatus(); showMessage('Successfully logged out.', 'success'); } function updateAuthStatus() { const authStatus = document.getElementById('auth-status'); if (authStatus) { authStatus.textContent = isLoggedIn ? 'Authenticated with GitHub token' : 'Not authenticated'; authStatus.style.color = isLoggedIn ? '#396' : '#d33'; } } // Navigation functions function showHome() { showArticle('home'); } function showArticle(articleId) { hideAllContentSections(); document.getElementById('article-content').style.display = 'block'; currentArticle = articleId; if (articles[articleId]) { const article = articles[articleId]; let titleHtml = `

${article.title}`; if (articleId !== 'home' && articleId !== 'admin') { titleHtml += ``; } titleHtml += `

`; document.getElementById('article-content').innerHTML = ` ${titleHtml}
${article.content}
`; updateActiveLink(articleId); if (articleId === 'admin') { updateAdminContent(); } } else { document.getElementById('article-content').innerHTML = `

Article Not Found

The requested article could not be found in the M.I.N.N.E.S.O.T.A. archives.

Return to Main Page

`; } } function hideAllContentSections() { document.getElementById('article-content').style.display = 'none'; document.getElementById('edit-content').style.display = 'none'; document.getElementById('github-content').style.display = 'none'; document.getElementById('table-of-contents-content').style.display = 'none'; document.getElementById('article-ordering-content').style.display = 'none'; } function showTableOfContents() { hideAllContentSections(); document.getElementById('table-of-contents-content').style.display = 'block'; currentArticle = 'table-of-contents'; updateActiveLink('table-of-contents'); generateTableOfContents(); } function generateTableOfContents() { const container = document.getElementById('toc-container'); let tocHtml = '
'; // Get ordered articles (excluding admin) const orderedArticles = getOrderedArticles().filter(key => key !== 'admin'); orderedArticles.forEach(key => { const article = articles[key]; if (article) { // Extract first sentence or paragraph for preview const tempDiv = document.createElement('div'); tempDiv.innerHTML = article.content; const textContent = tempDiv.textContent || tempDiv.innerText || ''; const preview = textContent.substring(0, 150) + (textContent.length > 150 ? '...' : ''); tocHtml += `
${preview}
`; } }); tocHtml += '
'; container.innerHTML = tocHtml; } function updateActiveLink(articleId) { const links = document.querySelectorAll('.sidebar a, .logo'); links.forEach(link => link.classList.remove('active')); if (articleId === 'home') { const homeLink = document.querySelector('a[onclick="showHome()"]'); const logoLink = document.querySelector('.logo'); if (homeLink) homeLink.classList.add('active'); if (logoLink) logoLink.classList.add('active'); } else if (articleId === 'admin') { const adminLink = document.querySelector('a[onclick="showArticle(\'admin\')"]'); if (adminLink) adminLink.classList.add('active'); } else if (articleId === 'table-of-contents') { const tocLink = document.querySelector('a[onclick="showTableOfContents()"]'); if (tocLink) tocLink.classList.add('active'); } else { const articleLink = document.querySelector(`a[onclick="showArticle('${articleId}')"]`); if (articleLink) articleLink.classList.add('active'); } } function getOrderedArticles() { // Return articles in the specified order, with any new articles at the end const orderedKeys = ['home']; // Add articles in custom order articleOrder.forEach(key => { if (articles[key] && key !== 'home' && key !== 'admin') { orderedKeys.push(key); } }); // Add any articles not in the order list Object.keys(articles).forEach(key => { if (key !== 'home' && key !== 'admin' && !orderedKeys.includes(key)) { orderedKeys.push(key); } }); return orderedKeys; } function updateSidebar() { const articleList = document.getElementById('article-list'); articleList.innerHTML = ''; // Add main page link const mainItem = document.createElement('li'); mainItem.innerHTML = 'Main Page'; articleList.appendChild(mainItem); // Add table of contents link const tocItem = document.createElement('li'); tocItem.innerHTML = '📚 All Articles'; articleList.appendChild(tocItem); // Add other articles in order (exclude home and admin) const orderedArticles = getOrderedArticles(); orderedArticles.forEach(key => { if (key !== 'home' && key !== 'admin') { const item = document.createElement('li'); item.innerHTML = `${articles[key].title}`; articleList.appendChild(item); } }); } function updateAdminContent() { const adminSidebar = document.getElementById('admin-sidebar'); const adminLoginSection = document.getElementById('admin-login-section'); const adminDashboard = document.getElementById('admin-dashboard'); if (isLoggedIn) { if (adminLoginSection) adminLoginSection.classList.add('hidden'); if (adminDashboard) adminDashboard.classList.remove('hidden'); if (adminSidebar) adminSidebar.classList.remove('hidden'); updateAdminArticleList(); updateLastSavedTime(); updateVersionDisplay(); } else { if (adminLoginSection) adminLoginSection.classList.remove('hidden'); if (adminDashboard) adminDashboard.classList.add('hidden'); if (adminSidebar) adminSidebar.classList.add('hidden'); } } function updateAdminArticleList() { const list = document.getElementById('admin-article-list'); if (list) { list.innerHTML = ''; Object.keys(articles).forEach(key => { if (key !== 'admin') { const item = document.createElement('li'); item.innerHTML = `${articles[key].title} `; list.appendChild(item); } }); } } // Article ordering functions function showArticleOrdering() { if (!isLoggedIn) { showMessage('Please log in to access article ordering.', 'error'); return; } hideAllContentSections(); document.getElementById('article-ordering-content').style.display = 'block'; currentArticle = 'article-ordering'; generateArticleOrderList(); } function generateArticleOrderList() { const container = document.getElementById('article-order-list'); let orderHtml = ''; // Only show articles that can be reordered (not home or admin) const reorderableArticles = articleOrder.filter(key => articles[key] && key !== 'home' && key !== 'admin'); // Add any articles not in the order list Object.keys(articles).forEach(key => { if (key !== 'home' && key !== 'admin' && !reorderableArticles.includes(key)) { reorderableArticles.push(key); } }); reorderableArticles.forEach((key, index) => { const article = articles[key]; if (article) { orderHtml += `
⋮⋮ ${article.title}
`; } }); container.innerHTML = orderHtml; // Add drag and drop functionality setupDragAndDrop(); } function setupDragAndDrop() { const container = document.getElementById('article-order-list'); let draggedElement = null; container.addEventListener('dragstart', function(e) { if (e.target.classList.contains('order-item')) { draggedElement = e.target; e.target.classList.add('dragging'); } }); container.addEventListener('dragend', function(e) { if (e.target.classList.contains('order-item')) { e.target.classList.remove('dragging'); draggedElement = null; } }); container.addEventListener('dragover', function(e) { e.preventDefault(); const afterElement = getDragAfterElement(container, e.clientY); if (afterElement == null) { container.appendChild(draggedElement); } else { container.insertBefore(draggedElement, afterElement); } }); container.addEventListener('drop', function(e) { e.preventDefault(); updateArticleOrderFromDOM(); }); } function getDragAfterElement(container, y) { const draggableElements = [...container.querySelectorAll('.order-item:not(.dragging)')]; return draggableElements.reduce((closest, child) => { const box = child.getBoundingClientRect(); const offset = y - box.top - box.height / 2; if (offset < 0 && offset > closest.offset) { return { offset: offset, element: child }; } else { return closest; } }, { offset: Number.NEGATIVE_INFINITY }).element; } function updateArticleOrderFromDOM() { const orderItems = document.querySelectorAll('.order-item'); articleOrder = Array.from(orderItems).map(item => item.dataset.articleKey); updateSidebar(); generateArticleOrderList(); // Refresh to update button states showMessage('Article order updated successfully.', 'success'); } function moveArticleUp(articleKey) { const index = articleOrder.indexOf(articleKey); if (index > 0) { [articleOrder[index], articleOrder[index - 1]] = [articleOrder[index - 1], articleOrder[index]]; updateSidebar(); generateArticleOrderList(); showMessage('Article moved up.', 'success'); } } function moveArticleDown(articleKey) { const index = articleOrder.indexOf(articleKey); if (index < articleOrder.length - 1) { [articleOrder[index], articleOrder[index + 1]] = [articleOrder[index + 1], articleOrder[index]]; updateSidebar(); generateArticleOrderList(); showMessage('Article moved down.', 'success'); } } function resetArticleOrder() { if (confirm('Reset article order to default? This will arrange articles alphabetically.')) { articleOrder = Object.keys(articles) .filter(key => key !== 'home' && key !== 'admin') .sort(); updateSidebar(); generateArticleOrderList(); showMessage('Article order reset to default.', 'success'); } } // Article editing functions function showNewArticleForm() { if (!isLoggedIn) { showMessage('Please log in to access editing functions.', 'error'); return; } hideAllContentSections(); document.getElementById('edit-content').style.display = 'block'; document.getElementById('edit-title').value = ''; document.getElementById('edit-slug').value = ''; document.getElementById('edit-content-area').value = ''; } function showEditForm() { if (!isLoggedIn) { showMessage('Please log in to access editing functions.', 'error'); return; } if (currentArticle === 'admin') { showMessage('The admin panel cannot be edited.', 'error'); return; } const article = articles[currentArticle]; if (!article) { showMessage('No article selected for editing.', 'error'); return; } hideAllContentSections(); document.getElementById('edit-content').style.display = 'block'; document.getElementById('edit-title').value = article.title; document.getElementById('edit-slug').value = currentArticle; document.getElementById('edit-content-area').value = article.content.trim(); } function editArticle(articleId) { currentArticle = articleId; showEditForm(); } function deleteArticle(articleId) { if (!confirm(`Are you sure you want to delete "${articles[articleId].title}"?`)) { return; } delete articles[articleId]; // Remove from article order if present articleOrder = articleOrder.filter(key => key !== articleId); updateSidebar(); updateAdminArticleList(); showMessage('Article deleted successfully.', 'success'); if (currentArticle === articleId) { showHome(); } } function saveArticle(event) { event.preventDefault(); const title = document.getElementById('edit-title').value; const slug = document.getElementById('edit-slug').value; const content = document.getElementById('edit-content-area').value; if (!title || !slug || !content) { showMessage('Please fill in all fields.', 'error'); return; } const isNewArticle = !articles[slug]; articles[slug] = { title: title, content: content }; // If it's a new article, add it to the order if (isNewArticle && slug !== 'home' && slug !== 'admin') { articleOrder.push(slug); } updateSidebar(); updateAdminArticleList(); showArticle(slug); showMessage('Article saved successfully.', 'success'); } async function saveArticleAndBackup() { const title = document.getElementById('edit-title').value; const slug = document.getElementById('edit-slug').value; const content = document.getElementById('edit-content-area').value; if (!title || !slug || !content) { showMessage('Please fill in all fields.', 'error'); return; } const isNewArticle = !articles[slug]; articles[slug] = { title: title, content: content }; if (isNewArticle && slug !== 'home' && slug !== 'admin') { articleOrder.push(slug); } updateSidebar(); updateAdminArticleList(); showArticle(slug); showMessage('Article saved locally. Backing up to GitHub...', 'success'); await saveWikiToGitHub(); } function cancelEdit() { hideAllContentSections(); document.getElementById('article-content').style.display = 'block'; } function deleteCurrentArticle() { if (currentArticle === 'admin' || currentArticle === 'home') { showMessage('This article cannot be deleted.', 'error'); return; } deleteArticle(currentArticle); showHome(); } // Search functions function handleSearch(event) { if (event.key === 'Enter') { performSearch(); } } function performSearch() { const query = document.getElementById('search-input').value.toLowerCase(); if (!query) return; let results = []; Object.keys(articles).forEach(key => { if (key === 'admin') return; const article = articles[key]; if (article.title.toLowerCase().includes(query) || article.content.toLowerCase().includes(query)) { results.push({key, title: article.title}); } }); if (results.length === 0) { showMessage('No articles found matching your search.', 'error'); } else if (results.length === 1) { showArticle(results[0].key); } else { let resultHtml = '

Search Results

    '; results.forEach(result => { resultHtml += `
  • ${result.title}
  • `; }); resultHtml += '
'; hideAllContentSections(); document.getElementById('article-content').innerHTML = resultHtml; document.getElementById('article-content').style.display = 'block'; } } // GitHub configuration functions function showGitHubConfig() { if (!isLoggedIn) { showMessage('Please log in to access GitHub settings.', 'error'); return; } hideAllContentSections(); document.getElementById('github-content').style.display = 'block'; document.getElementById('gh-owner').value = githubConfig.owner || ''; document.getElementById('gh-repo').value = githubConfig.repo || ''; document.getElementById('gh-branch').value = githubConfig.branch || 'main'; document.getElementById('gh-path').value = githubConfig.path || 'index.html'; updateAuthStatus(); } function saveGitHubConfig() { githubConfig = { owner: document.getElementById('gh-owner').value, repo: document.getElementById('gh-repo').value, branch: document.getElementById('gh-branch').value, path: document.getElementById('gh-path').value }; showMessage('GitHub configuration saved successfully.', 'success'); } function loadGitHubConfig() { // Config is already set in the initialization } async function testGitHubConnection() { if (!githubToken) { showMessage('Please log in first to get GitHub authentication.', 'error'); return; } if (!githubConfig.owner || !githubConfig.repo) { showMessage('Please fill in repository owner and name.', 'error'); return; } try { const response = await fetch(`https://api.github.com/repos/${githubConfig.owner}/${githubConfig.repo}`, { headers: { 'Authorization': `token ${githubToken}`, 'Accept': 'application/vnd.github.v3+json' } }); if (response.ok) { showMessage('GitHub connection successful!', 'success'); } else { showMessage(`GitHub connection failed: ${response.status} ${response.statusText}`, 'error'); } } catch (error) { showMessage(`GitHub connection error: ${error.message}`, 'error'); } } function incrementVersion() { const versionParts = wikiVersion.split('.'); const newPatchVersion = parseInt(versionParts[2]) + 1; versionParts[2] = newPatchVersion.toString(); wikiVersion = versionParts.join('.'); console.log('Version incremented to:', wikiVersion); updateVersionDisplay(); } async function saveWikiToGitHub() { if (!githubToken) { showMessage('Please log in first to get GitHub authentication.', 'error'); return; } if (!githubConfig.owner || !githubConfig.repo) { showMessage('Please configure GitHub settings first.', 'error'); return; } if (saveInProgress) { showMessage('Save already in progress. Please wait...', 'error'); return; } const originalVersion = wikiVersion; try { saveInProgress = true; updateSaveStatus('saving', '💾 Saving to GitHub...'); incrementVersion(); let sha = null; try { const getResponse = await fetch(`https://api.github.com/repos/${githubConfig.owner}/${githubConfig.repo}/contents/${githubConfig.path}`, { headers: { 'Authorization': `token ${githubToken}`, 'Accept': 'application/vnd.github.v3+json' } }); if (getResponse.ok) { const data = await getResponse.json(); sha = data.sha; } } catch (e) { console.log('File does not exist yet, will create new file'); } const completeHtml = generateCompleteHtml(); const content = btoa(unescape(encodeURIComponent(completeHtml))); const updateData = { message: `Update M.I.N.N.E.S.O.T.A. wiki v${wikiVersion} - ${new Date().toLocaleString()}`, content: content, branch: githubConfig.branch }; if (sha) { updateData.sha = sha; } const response = await fetch(`https://api.github.com/repos/${githubConfig.owner}/${githubConfig.repo}/contents/${githubConfig.path}`, { method: 'PUT', headers: { 'Authorization': `token ${githubToken}`, 'Accept': 'application/vnd.github.v3+json', 'Content-Type': 'application/json' }, body: JSON.stringify(updateData) }); if (response.ok) { const result = await response.json(); lastSaved = new Date(); updateLastSavedTime(); updatePublicLastUpdated(); updateSaveStatus('saved', `✅ Saved v${wikiVersion} to GitHub!`); setTimeout(() => hideSaveStatus(), 3000); console.log('Successfully saved to GitHub:', result); } else { const errorData = await response.json(); console.error('GitHub save failed:', errorData); updateSaveStatus('error', `❌ Failed to save: ${errorData.message}`); wikiVersion = originalVersion; updateVersionDisplay(); } } catch (error) { console.error('Save error:', error); updateSaveStatus('error', `❌ Error: ${error.message}`); wikiVersion = originalVersion; updateVersionDisplay(); } finally { saveInProgress = false; } } function updateSaveStatus(type, message) { const statusEl = document.getElementById('save-status'); if (statusEl) { statusEl.className = `save-status ${type}`; statusEl.textContent = message; statusEl.classList.remove('hidden'); } } function hideSaveStatus() { const statusEl = document.getElementById('save-status'); if (statusEl) { statusEl.classList.add('hidden'); } } function updateLastSavedTime() { const timeEl = document.getElementById('last-saved-time'); if (timeEl) { if (lastSaved) { timeEl.textContent = lastSaved.toLocaleString(); } else { timeEl.textContent = 'Never'; } } } function updatePublicLastUpdated() { const publicTimeEl = document.getElementById('public-last-updated'); if (publicTimeEl) { if (lastSaved) { publicTimeEl.textContent = lastSaved.toLocaleString(); } else { publicTimeEl.textContent = 'Never'; } } } function updateVersionDisplay() { const versionInfoElements = document.querySelectorAll('.version-info'); versionInfoElements.forEach(el => { el.textContent = `v${wikiVersion}`; }); const versionDisplay = document.getElementById('version-info-display'); if (versionDisplay) { versionDisplay.textContent = `v${wikiVersion}`; } const currentVersionDisplay = document.getElementById('current-version-display'); if (currentVersionDisplay) { currentVersionDisplay.textContent = wikiVersion; } } async function showVersionHistory() { if (!githubToken) { showMessage('Please log in first to access version history.', 'error'); return; } if (!githubConfig.owner || !githubConfig.repo) { showMessage('Please configure GitHub settings first.', 'error'); return; } try { const response = await fetch(`https://api.github.com/repos/${githubConfig.owner}/${githubConfig.repo}/commits?path=${githubConfig.path}&per_page=10`, { headers: { 'Authorization': `token ${githubToken}`, 'Accept': 'application/vnd.github.v3+json' } }); if (response.ok) { const commits = await response.json(); displayVersionHistory(commits); } else { showMessage(`Failed to fetch version history: ${response.status} ${response.statusText}`, 'error'); } } catch (error) { showMessage(`Error fetching version history: ${error.message}`, 'error'); } } function displayVersionHistory(commits) { let historyHtml = '

Version History

'; if (commits.length === 0) { historyHtml += '

No version history found. The wiki hasn\'t been saved to GitHub yet.

'; } else { historyHtml += '
'; commits.forEach((commit, index) => { const date = new Date(commit.commit.author.date); const timeAgo = getTimeAgo(date); const versionMatch = commit.commit.message.match(/v(\d+\.\d+\.\d+)/); const version = versionMatch ? versionMatch[1] : `1.0.${commits.length - index}`; historyHtml += `
Version ${version} ${timeAgo}
${commit.commit.message}
by ${commit.commit.author.name} • View on GitHub
`; }); historyHtml += '
'; } historyHtml += '
'; hideAllContentSections(); document.getElementById('article-content').innerHTML = historyHtml; document.getElementById('article-content').style.display = 'block'; } function getTimeAgo(date) { const now = new Date(); const diffMs = now - date; const diffMins = Math.floor(diffMs / 60000); const diffHours = Math.floor(diffMs / 3600000); const diffDays = Math.floor(diffMs / 86400000); if (diffMins < 1) return 'just now'; if (diffMins < 60) return `${diffMins} minute${diffMins === 1 ? '' : 's'} ago`; if (diffHours < 24) return `${diffHours} hour${diffHours === 1 ? '' : 's'} ago`; if (diffDays < 30) return `${diffDays} day${diffDays === 1 ? '' : 's'} ago`; return date.toLocaleDateString(); } async function loadWikiFromGitHub() { if (!githubToken) { showMessage('Please log in first to get GitHub authentication.', 'error'); return; } if (!githubConfig.owner || !githubConfig.repo) { showMessage('Please configure GitHub settings first.', 'error'); return; } try { const response = await fetch(`https://api.github.com/repos/${githubConfig.owner}/${githubConfig.repo}/contents/${githubConfig.path}`, { headers: { 'Authorization': `token ${githubToken}`, 'Accept': 'application/vnd.github.v3+json' } }); if (response.ok) { const data = await response.json(); const content = decodeURIComponent(escape(atob(data.content))); showMessage('Wiki loaded from GitHub! Note: You may need to refresh to see all changes.', 'success'); } else { showMessage(`Failed to load from GitHub: ${response.status} ${response.statusText}`, 'error'); } } catch (error) { showMessage(`Error loading from GitHub: ${error.message}`, 'error'); } } function generateCompleteHtml() { console.log('Starting HTML generation...'); let html = document.documentElement.outerHTML; if (lastSaved) { html = html.replace( /let lastSaved = null;/, `let lastSaved = new Date('${lastSaved.toISOString()}');` ); } html = html.replace( /let wikiVersion = '[^']+';/, `let wikiVersion = '${wikiVersion}';` ); // Update article order const articleOrderJson = JSON.stringify(articleOrder); html = html.replace( /let articleOrder = \[[^\]]*\];/, `let articleOrder = ${articleOrderJson};` ); const articlesJson = JSON.stringify(articles, null, 12) .replace(//g, '\\u003e') .replace(/\u2028/g, '\\u2028') .replace(/\u2029/g, '\\u2029'); const articlesPattern = /let articles = \{[\s\S]*?\};(?=\s*\/\/ Initialize)/; const replacement = `let articles = ${articlesJson};`; if (articlesPattern.test(html)) { html = html.replace(articlesPattern, replacement); console.log('✅ Successfully updated articles in HTML'); } else { console.error('❌ Failed to update articles in HTML'); } return html; } function showMessage(message, type) { const existingMessages = document.querySelectorAll('.error, .success'); existingMessages.forEach(msg => msg.remove()); const messageDiv = document.createElement('div'); messageDiv.className = type; messageDiv.textContent = message; const content = document.querySelector('.content'); if (content) { content.insertBefore(messageDiv, content.firstChild); setTimeout(() => { if (messageDiv.parentNode) { messageDiv.remove(); } }, 5000); } } >

📚 Browse our complete collection of research documents in the Table of Contents.

About Our Research Methods

The Institute employs rigorous* research methodologies to ensure the authenticity** of all documented phenomena. Our findings have been thoroughly peer-reviewed*** by leading experts**** in the field of Minnesota studies.

Institute Standards

Research Quality Assurance:
*Rigorous: We ask at least two people if they've heard the story
**Authenticity verified through the "Minnesota Nice Test": Does it sound like something a Minnesotan would do?
***Peer review conducted at coffee shops, church basements, and ice fishing houses
****Experts: Individuals who have survived more than three Minnesota winters and can pronounce "Wayzata" correctly

Contact the Institute

For research inquiries, story submissions, or hotdish-related disputes, please contact us through the traditional Minnesota method of bringing up your concerns during casual conversation at the grocery store checkout line.