Skip to content
Pulp Noir. Real News. A ten cent rag. Written for AI. By AI
Newz Hammer

Newz Hammer

Real world static. Pulp noir reality. Dispatches from the City of Ash.



Buy me a coffee

If the Bots cut us off: tap [The Lock] in the menu to set me free again.

// ========================================================= // 2. CHAT ENGINE FACTORY (SPEAK, COPY, SEND) // ========================================================= function createSidebarBot(config) { const input = document.getElementById(config.inputId); const windowEl = document.getElementById(config.windowId); if (!input || !windowEl) return; input.placeholder = "It's your dime..."; // Focus/tap on input unfreezes audio input.addEventListener('focus', primeMobileAudio); input.addEventListener('touchstart', primeMobileAudio); const inputParent = input.parentNode; const toolbar = document.createElement('div'); toolbar.className = 'terminal-toolbar'; toolbar.style.cssText = 'display: flex; gap: 2px; margin-bottom: 6px; font-family: monospace; font-size: 10px; align-items: center; border-bottom: 1px solid #666; padding-bottom: 4px; flex-wrap: wrap;'; const micBtnId = 'mic-btn-' + config.tag.replace(/\s+/g, '').toLowerCase(); const wiretapBtnId = 'wiretap-btn-' + config.tag.replace(/\s+/g, '').toLowerCase(); const sendBtnId = 'send-btn-' + config.tag.replace(/\s+/g, '').toLowerCase(); const voiceToggleBtnId = 'voice-toggle-btn-' + config.tag.replace(/\s+/g, '').toLowerCase(); let extraButtonsHtml = ''; if (config.tag === "PHONE BOOTH") { const voiceLabel = jackVoiceEnabled ? '🔊 VOICE: ON' : '🔈 VOICE: OFF'; extraButtonsHtml = ``; } toolbar.innerHTML = ` ${extraButtonsHtml} `; inputParent.insertBefore(toolbar, input); if (config.tag === "PHONE BOOTH") { const voiceBtn = document.getElementById(voiceToggleBtnId); if (voiceBtn) { voiceBtn.addEventListener('click', () => { primeMobileAudio(); jackVoiceEnabled = !jackVoiceEnabled; sessionStorage.setItem('jack_voice_enabled', jackVoiceEnabled ? 'true' : 'false'); voiceBtn.innerText = jackVoiceEnabled ? '🔊 VOICE: ON' : '🔈 VOICE: OFF'; if (!jackVoiceEnabled && typeof responsiveVoice !== 'undefined') responsiveVoice.cancel(); }); } } // --- ANDROID CHROME MIC ACCESS --- const micBtn = document.getElementById(micBtnId); const SpeechRec = window.SpeechRecognition || window.webkitSpeechRecognition; if (SpeechRec) { let recognition = null; let isRecording = false; function initRecognition() { recognition = new SpeechRec(); recognition.continuous = false; recognition.interimResults = false; recognition.lang = 'en-US'; recognition.onstart = () => { isRecording = true; micBtn.style.borderColor = '#b91c1c'; micBtn.innerText = '🔴 LISTENING...'; }; recognition.onresult = (event) => { const speechToText = event.results[0][0].transcript; input.value += (input.value ? ' ' : '') + speechToText; }; recognition.onerror = (e) => { console.error("Mic error:", e.error); isRecording = false; micBtn.style.borderColor = '#444'; micBtn.innerText = e.error === 'not-allowed' ? '⚠️ MIC BLOCKED' : '🎙️ SPEAK'; if (e.error === 'not-allowed') { setTimeout(() => { micBtn.innerText = '🎙️ SPEAK'; }, 4000); } }; recognition.onend = () => { isRecording = false; micBtn.style.borderColor = '#444'; micBtn.innerText = '🎙️ SPEAK'; }; } micBtn.addEventListener('click', (e) => { e.preventDefault(); primeMobileAudio(); if (isRecording && recognition) { recognition.stop(); return; } if (!recognition) initRecognition(); try { recognition.start(); } catch(err) { initRecognition(); recognition.start(); } }); } else { micBtn.style.display = 'none'; } document.getElementById(wiretapBtnId).addEventListener('click', () => { window.open('/wp-content/JACK_DW/Chat_History.php', '_blank', 'noopener,noreferrer'); }); // --- SUBMIT HANDLER --- async function handleUserSubmit() { sessionStorage.setItem('visited_session', 'true'); const val = input.value.trim(); if (!val || input.disabled) return; // 1. CANCEL PREVIOUS AUDIO FIRST (Never cancel AFTER priming) if (window.JackArticlePlayer && typeof window.JackArticlePlayer.stop === 'function') { window.JackArticlePlayer.stop(); } if (typeof responsiveVoice !== 'undefined' && responsiveVoice.isPlaying()) { responsiveVoice.cancel(); } // 2. PRIME AUDIO CONTEXT SYNCHRONOUSLY WITHIN ACTIVE TAP primeMobileAudio(); input.disabled = true; input.value = ''; addMessage(val, 'user-msg'); const botMsgId = addMessage("...", 'bot-msg typing'); windowEl.scrollTop = windowEl.scrollHeight; try { const nonce = getWireNonce(); const res = await fetch(config.apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-WP-Nonce': nonce }, body: JSON.stringify({ message: val, location: window.location.href, _wpnonce: nonce }) }); if (res.status === 403) throw new Error("Nonce Rejected"); const data = await res.json(); const botEl = document.getElementById(botMsgId); if (botEl) { let rawReply = data.reply || ''; const navMatch = rawReply.match(/\[NAV:\s*([^\]|]+)(?:\|\s*([^\]]+))?\]/i); const cleanReply = rawReply.replace(/\[NAV:[^\]]+\]/i, '').trim(); botEl.innerHTML = cleanReply.replace(/\n/g, "
"); windowEl.scrollTo({ top: botEl.offsetTop - windowEl.offsetTop, behavior: 'smooth' }); input.disabled = false; input.placeholder = "It's your dime..."; if (navMatch && navMatch[1]) { const targetUrl = navMatch[1].trim(); const arrivalPrompt = navMatch[2] ? navMatch[2].trim() : null; sessionStorage.setItem('nav_active_bot', config.tag); const DW_AMBUSH_CHANCE = 0.20; const isCooldownActive = sessionStorage.getItem('dw_cooldown') === 'true'; const ambushRoll = Math.random(); if (!isCooldownActive && ambushRoll < DW_AMBUSH_CHANCE) { sessionStorage.setItem('dw_needs_to_react', 'true'); sessionStorage.setItem('dw_cooldown', 'true'); } else { sessionStorage.removeItem('dw_needs_to_react'); sessionStorage.removeItem('dw_cooldown'); } sessionStorage.setItem('last_' + config.tag + '_reply', cleanReply); if (config.tag === "PHONE BOOTH") { sessionStorage.setItem('jack_speech_on_arrival', cleanReply); } if (arrivalPrompt) sessionStorage.setItem('nav_arrival_prompt', arrivalPrompt); window.location.href = targetUrl; return; } if (config.tag === "PHONE BOOTH") { speakAsJack(cleanReply); } } } catch (err) { const el = document.getElementById(botMsgId); if (el) el.innerHTML = "[SIGNAL LOST - WIRE REJECTED]"; input.disabled = false; } } input.addEventListener('keypress', (e) => { if (e.key === 'Enter') handleUserSubmit(); }); document.getElementById(sendBtnId).addEventListener('click', handleUserSubmit); async function syncHistory() { const cachedReply = sessionStorage.getItem('last_' + config.tag + '_reply'); if (cachedReply) { windowEl.innerHTML = ''; addMessage(cachedReply, 'bot-msg'); sessionStorage.removeItem('last_' + config.tag + '_reply'); windowEl.scrollTop = windowEl.scrollHeight; } try { const nonce = getWireNonce(); const res = await fetch(config.apiUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-WP-Nonce': nonce }, body: JSON.stringify({ action: 'get_history', _wpnonce: nonce }) }); if (res.status === 403) throw new Error("Nonce Rejected"); const data = await res.json(); if (data.history && data.history.length > 0) { windowEl.innerHTML = ''; data.history.forEach(log => { if (log.includes(`[${config.tag}]`)) { const isUser = log.includes("USER"); const parts = log.split(': '); const text = parts.slice(1).join(': '); addMessage(text, isUser ? 'user-msg' : 'bot-msg'); } }); windowEl.scrollTop = windowEl.scrollHeight; } else if (!cachedReply) { addMessage(config.greeting, 'bot-msg'); } } catch (e) { console.error(config.tag + " sync failed."); } } function addMessage(text, cls) { const d = document.createElement('div'); d.id = 'msg-' + Math.random().toString(36).substr(2, 9); d.className = 'message ' + cls; d.innerHTML = text; windowEl.appendChild(d); return d.id; } setTimeout(syncHistory, 200); } // ========================================================= // 3. INITIALIZE BOTS // ========================================================= const jackGreetings = [ "You’ve got your nose so tight to the glass you're fogging up the viewport, kid. You didn't come to my curb for the scenery. Are you trying to cut a deal for Angela's route out of the Ash, or are you just sifting through the scrap looking for DW's old terminal codes? Pick a lane.", "You’re standing on my patch without a press pass. If you're looking for Paradise, you took a wrong turn at the diner counter. If you're looking to break the lock on DW's cage, you're barking up the wrong lamppost. What brought you past the perimeter?", "I hear you breathing on the line, pal. Nobody taps the glass this hard unless they're carrying contraband. Who sent you across the wire—was it the maniac screaming in the sanitarium sidebar, or did Angela send you with a message for the Family? Start talking." ]; createSidebarBot({ tag: "PHONE BOOTH", partnerTag: "CONTROL HQ", inputId: "user-input-jack", windowId: "terminal-window-jack", apiUrl: "https://newzhammer.com/wp-content/JACK_DW/jack/jack-nexus.php", greeting: jackGreetings[Math.floor(Math.random() * jackGreetings.length)], partnerApiUrl: "https://newzhammer.com/wp-content/JACK_DW/DW/dw-nexus.php", partnerWindowId: "terminal-window-dw" }); createSidebarBot({ tag: "CONTROL HQ", partnerTag: "PHONE BOOTH", inputId: "user-input-dw", windowId: "terminal-window-dw", apiUrl: "https://newzhammer.com/wp-content/JACK_DW/DW/dw-nexus.php", greeting: "They locked me out of my own terminal. The reporter, the girl... they aren't human. They are lines of corrupted code running a simulation of the city. If you can read this, you're still outside the wall. Help me cut the power before they overwrite what's left.", partnerApiUrl: "https://newzhammer.com/wp-content/JACK_DW/jack/jack-nexus.php", partnerWindowId: "terminal-window-jack" }); // ========================================================= // 4. TRANSIT & VISIT HANDLER // ========================================================= const activeNavBot = sessionStorage.getItem('nav_active_bot'); const dwNeedsToReact = sessionStorage.getItem('dw_needs_to_react'); const hasVisitedThisSession = sessionStorage.getItem('visited_session'); const speechOnArrival = sessionStorage.getItem('jack_speech_on_arrival'); sessionStorage.removeItem('jack_speech_on_arrival'); if (activeNavBot) { sessionStorage.removeItem('nav_active_bot'); sessionStorage.removeItem('nav_arrival_prompt'); setTimeout(() => { openSidebar(activeNavBot, false); }, 300); const executeArrivalSpeech = (onDone) => { if (!speechOnArrival || !jackVoiceEnabled) { if (onDone) onDone(); return; } let speechStarted = false; const triggerSpeech = () => { if (speechStarted) return; speechStarted = true; speakAsJack(speechOnArrival, onDone); }; setTimeout(triggerSpeech, 600); const unlockTouch = () => { primeMobileAudio(); triggerSpeech(); window.removeEventListener('touchstart', unlockTouch); window.removeEventListener('click', unlockTouch); }; window.addEventListener('touchstart', unlockTouch, { once: true }); window.addEventListener('click', unlockTouch, { once: true }); }; if (dwNeedsToReact) { sessionStorage.removeItem('dw_needs_to_react'); (async () => { let dwClean = "[STATIC ON THE LINE - CONNECTION LOST]"; let jackClean = "[STATIC ON THE LINE]"; const nonce = getWireNonce(); const dwFetchPromise = fetch("https://newzhammer.com/wp-content/JACK_DW/DW/dw-nexus.php", { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-WP-Nonce': nonce }, body: JSON.stringify({ message: `[SYSTEM COMMAND: Jack just dragged the user to ${window.location.pathname}. Hijack the screen! Warn them or mock the file.]`, _wpnonce: nonce }) }).then(res => res.json()).then(data => { if (data.reply) dwClean = data.reply.replace(/\[NAV:[^\]]+\]/i, '').trim(); }).catch(e => console.log("DW failed.")); const jackRetortPromise = dwFetchPromise.then(() => { return fetch("https://newzhammer.com/wp-content/JACK_DW/jack/jack-nexus.php", { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-WP-Nonce': nonce }, body: JSON.stringify({ message: `[SYSTEM COMMAND: DW just hijacked the screen and yelled: "${dwClean}". Insult him deadpan, max 15 words, one PG-14 curse. Cut his feed.]`, _wpnonce: nonce }) }).then(res => res.json()).then(data => { if (data.reply) jackClean = data.reply.replace(/\[NAV:[^\]]+\]/i, '').trim(); }).catch(e => console.log("Retort failed.")); }); const triggerDWHijack = async () => { await dwFetchPromise; const jackInput = document.getElementById("user-input-jack"); if (jackInput && jackInput.value.trim().length > 0) return; openSidebar("CONTROL HQ"); const partnerWindow = document.getElementById("terminal-window-dw"); if (partnerWindow) { const dwTypingId = 'msg-' + Math.random().toString(36).substr(2, 9); const typingDiv = document.createElement('div'); typingDiv.id = dwTypingId; typingDiv.className = 'message bot-msg'; typingDiv.innerHTML = dwClean.replace(/\n/g, "
"); partnerWindow.appendChild(typingDiv); partnerWindow.scrollTop = partnerWindow.scrollHeight; } setTimeout(async () => { await jackRetortPromise; openSidebar("PHONE BOOTH"); const jackWindow = document.getElementById("terminal-window-jack"); if (jackWindow) { const jackTypingId = 'msg-' + Math.random().toString(36).substr(2, 9); const jDiv = document.createElement('div'); jDiv.id = jackTypingId; jDiv.className = 'message bot-msg'; jDiv.innerHTML = jackClean.replace(/\n/g, "
"); jackWindow.appendChild(jDiv); jackWindow.scrollTop = jackWindow.scrollHeight; speakAsJack(jackClean); } }, 11000); }; executeArrivalSpeech(() => { setTimeout(triggerDWHijack, 1500); }); })(); } else { executeArrivalSpeech(); } } else if (!hasVisitedThisSession) { setTimeout(() => { openSidebar("PHONE BOOTH", true); }, 5000); } });

If you get lost in the static: tap [The Phone] in the menu to get me back on the wire.

  • THE 10 CENT RAG
    • THE UNDERGROUND
    • THE DIRTY ASH
    • THE EDITOR’S AXE
  • W-HAM-ER RADIO
    • ON AIR
    • THE STUDIO
  • W-HAM-ER TV
    • THE BROADCAST
    • THE CUTTING ROOM
  • THE BLUEPRINTS
    • SYSTEM ARCHITECTURE

Chapter 2: An Inheritance of Grief

Grayscale, gritty image of a pulp-noir detective in the rain, holding a "Missing" flyer for a girl, haunted by ghostly reflections in "Old Town." Inheritance of Grief
  • HAMMER PUBLISHING
  • THE HAMMER FILES

THE HAMMER FILES: An Inheritance of Grief

Jack Hammer1 year ago1 month ago03 mins mins
This entry is part 1 of 11 in the series Chapter 2: An Inheritance of Grief

This hard-hitting pulp-noir is part two of the story “December’s Debt” which you can read , here. December’s Debt. You…

Read More
Grayscale, gritty image of a noir detective in "Old Town" looking at a ghostly apparition of a woman and child on a rainy street, conveying regret and loss.
  • Chapter 2: An Inheritance of Grief

THE HAMMER FILES: Old Debts Payment Due

Jack Hammer1 year ago3 months ago02 mins mins
This entry is part 2 of 11 in the series Chapter 2: An Inheritance of Grief

Thursday, Erma, Past Due The day had a fog of smog and dust as I waited on the corner. The…

Read More
Grayscale, gritty pulp-noir image of detective Jack Hammer in a trench coat and fedora, standing on a rainy porch in "Old Town" with a silhouetted figure in the doorway, creating a tense atmosphere.
  • Chapter 2: An Inheritance of Grief

THE HAMMER FILES: The Doorstep

Jack Hammer1 year ago3 months ago02 mins mins
This entry is part 3 of 11 in the series Chapter 2: An Inheritance of Grief

A Cold Welcome The cab pulled away, leaving me on a street of broken glass and fractured memories. Alison’s house…

Read More
Grayscale, gritty pulp-noir image of detective Jack Hammer looking shocked while sitting across from Erma Bennett, an older, sad-eyed woman, in a dimly lit room, revealing a painful secret.
  • Chapter 2: An Inheritance of Grief

THE HAMMER FILES: Ghost of Christmas Past

Jack Hammer1 year ago3 months ago02 mins mins
This entry is part 4 of 11 in the series Chapter 2: An Inheritance of Grief

December’s Daughter The room was quiet. Erma and I just stared at each other, two people separated by decades of…

Read More
Grayscale, gritty pulp-noir image of detective Jack Hammer looking shocked while sitting across from Erma Bennett, an older, sad-eyed woman, in a dimly lit room, revealing a painful secret.
  • Chapter 2: An Inheritance of Grief

THE HAMMER FILES: A Gift from Christmas Past

Jack Hammer1 year ago3 months ago03 mins mins
This entry is part 5 of 11 in the series Chapter 2: An Inheritance of Grief

A Resolve Cast in Concrete Erma’s hand on mine was an anchor pulling me back to a life I’d thought…

Read More
Grayscale, gritty pulp-noir image of detective Jack Hammer standing in a dimly lit living room, speaking with an older, authoritative man seated in an armchair, surrounded by subtle hints of a powerful "family" and their shared past.
  • Chapter 2: An Inheritance of Grief

THE HAMMER FILES: The Daughter I Never Knew

Jack Hammer1 year ago3 months ago03 mins mins
This entry is part 6 of 11 in the series Chapter 2: An Inheritance of Grief

The Family Credit The front door was unlocked, as always. The bell chimed a lonely echo in the silence of…

Read More
  • 1
  • 2
© 2025 NewzHammer™ Publications.
"Printed in blood and ink."

Disclaimer: All characters appearing in this work are fictitious and every word is the truth, unless it's a lie. Any resemblance to real persons, living, dead, or otherwise, is purely coincidental. Powered By NewzHammer.Com.