Created
March 11, 2026 17:19
-
-
Save HoughIO/d4ef2e4055d2cadf15e7eddf30d86eb3 to your computer and use it in GitHub Desktop.
KittyCam Daily Report UI
This file contains hidden or 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
| #!/bin/bash | |
| # Add view tracking to the main page | |
| # Run AFTER upgrade-daily-report.sh | |
| echo "📊 Adding view tracking to frontend..." | |
| # Add view logging to the index.html init function | |
| sudo sed -i 's|async function init(){|async function init(){\n // Log view\n fetch("/api/log-view", {method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({page:"live"})}).catch(()=>{});|' /opt/kittycam/web/index.html | |
| echo "✅ View tracking added!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment