```
chore: enhance .gitignore and remove obsolete documentation files - Reorganize .gitignore with categorized sections for better maintainability - Add comprehensive ignore patterns for Python, Node.js, databases, logs, and build artifacts - Add project-specific ignore rules for coordinator, explorer, and deployment files - Remove outdated documentation: BITCOIN-WALLET-SETUP.md, LOCAL_ASSETS_SUMMARY.md, README-CONTAINER-DEPLOYMENT.md, README-DOMAIN-DEPLOYMENT.md ```
This commit is contained in:
84
scripts/test/verify_toggle_removed.py
Executable file
84
scripts/test/verify_toggle_removed.py
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Verify that the data mode toggle button is removed from the explorer
|
||||
"""
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
def main():
|
||||
print("🔍 Verifying Data Mode Toggle is Removed")
|
||||
print("=" * 60)
|
||||
|
||||
# Get the explorer page
|
||||
print("\n1. Checking explorer page...")
|
||||
try:
|
||||
response = requests.get("https://aitbc.bubuit.net/explorer/")
|
||||
if response.status_code == 200:
|
||||
print("✅ Explorer page loaded")
|
||||
else:
|
||||
print(f"❌ Failed to load page: {response.status_code}")
|
||||
return
|
||||
except Exception as e:
|
||||
print(f"❌ Error: {e}")
|
||||
return
|
||||
|
||||
# Check for data mode toggle elements
|
||||
print("\n2. Checking for data mode toggle...")
|
||||
|
||||
html_content = response.text
|
||||
|
||||
# Check for toggle button
|
||||
if 'dataModeBtn' in html_content:
|
||||
print("❌ Data mode toggle button still present!")
|
||||
return
|
||||
else:
|
||||
print("✅ Data mode toggle button removed")
|
||||
|
||||
# Check for mode-button class
|
||||
if 'mode-button' in html_content:
|
||||
print("❌ Mode button class still found!")
|
||||
return
|
||||
else:
|
||||
print("✅ Mode button class removed")
|
||||
|
||||
# Check for data-mode-toggle
|
||||
if 'data-mode-toggle' in html_content:
|
||||
print("❌ Data mode toggle component still present!")
|
||||
return
|
||||
else:
|
||||
print("✅ Data mode toggle component removed")
|
||||
|
||||
# Check JS file
|
||||
print("\n3. Checking JavaScript file...")
|
||||
try:
|
||||
js_response = requests.get("https://aitbc.bubuit.net/explorer/assets/index-7nlLaz1v.js")
|
||||
if js_response.status_code == 200:
|
||||
js_content = js_response.text
|
||||
|
||||
if 'initDataModeToggle' in js_content:
|
||||
print("❌ Data mode toggle initialization still in JS!")
|
||||
return
|
||||
else:
|
||||
print("✅ Data mode toggle initialization removed")
|
||||
|
||||
if 'dataMode:"mock"' in js_content:
|
||||
print("❌ Mock data mode still configured!")
|
||||
return
|
||||
elif 'dataMode:"live"' in js_content:
|
||||
print("✅ Live data mode confirmed")
|
||||
else:
|
||||
print(f"❌ Failed to load JS: {js_response.status_code}")
|
||||
except Exception as e:
|
||||
print(f"❌ Error checking JS: {e}")
|
||||
|
||||
print("\n" + "=" * 60)
|
||||
print("✅ Data mode toggle successfully removed!")
|
||||
print("\n🎉 The explorer now:")
|
||||
print(" • Uses live data only")
|
||||
print(" • Has no mock/live toggle button")
|
||||
print(" • Shows real blockchain data")
|
||||
print(" • Is cleaner and more professional")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user