first commit

This commit is contained in:
nxxy335top
2026-05-18 17:29:18 +08:00
parent e85fbd62f4
commit a0c64736eb
119 changed files with 13527 additions and 1228 deletions
+29
View File
@@ -0,0 +1,29 @@
(function(){
var result = {};
var hero = document.querySelector(".hero");
if (hero) {
var h1 = hero.querySelector("h1");
var subtitle = hero.querySelector(".hero-subtitle, .subtitle, h2, p");
result.heroTitle = h1 ? h1.textContent.trim() : "no h1 found";
result.heroSubtitle = subtitle ? subtitle.textContent.trim() : "no subtitle found";
result.heroHTML = hero.innerHTML.substring(0, 500);
} else {
result.hero = "not found";
}
var footer = document.querySelector("footer, .footer, #footer");
if (footer) {
result.footerText = footer.textContent.trim().substring(0, 300);
result.footerHeight = getComputedStyle(footer).height;
result.footerMarginBottom = getComputedStyle(footer).marginBottom;
result.footerPaddingBottom = getComputedStyle(footer).paddingBottom;
} else {
result.footer = "not found";
}
var body = document.body;
result.bodyMarginBottom = getComputedStyle(body).marginBottom;
result.bodyPaddingBottom = getComputedStyle(body).paddingBottom;
result.htmlMarginBottom = getComputedStyle(document.documentElement).marginBottom;
result.documentHeight = document.documentElement.scrollHeight;
result.windowHeight = window.innerHeight;
return JSON.stringify(result);
})()