Files
blog/check_fold2.py
T

19 lines
595 B
Python
Raw Normal View History

2026-05-25 13:55:45 +08:00
import re
path = 'e:/GitHub/blog/public/js/bundle.min.6c8518518bf5af8d666e1b391ef3cf4caaaca7537fd1961891ed292d86eb3fed.js'
with open(path, 'r', encoding='utf-8') as f:
content = f.read()
# Find initCodeFold definition
idx = content.find('window.initCodeFold=function')
if idx == -1:
print("initCodeFold definition not found!")
else:
# Extract a larger chunk
end_idx = content.find('window.initCodeCopy', idx)
if end_idx == -1:
end_idx = idx + 2000
chunk = content[idx:end_idx]
print(f"Chunk length: {len(chunk)} chars")
print("=" * 60)
print(chunk)