Domify-Academy-Bot / pasted_content_4.txt
Domify's picture
Upload 35 files
93c19dc verified
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-PCBW2KGGVZ"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-PCBW2KGGVZ'); </script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Genus AI | Technical Answers & Study Bot</title>
<meta name="title" content="Venus GPT | Instant Technical Answers & Study Bot">
<meta name="description" content="Stuck on a coding or hacking problem? Ask the Domify AI Bot for real-time researched technical answers and study help.">
<meta name="keywords" content="tech study bot, AI coding assistant, cybersecurity research bot, Domify AI, technical answers ,how to code ,bot, Venus GPT">
<meta name="author" content="Dominion Patrick">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "Domify AI Study Bot /Genus GPT",
"url": "https://www.domify-academy.free.nf/bot.html",
"description": "An AI-powered assistant designed to help tech students find instant answers to complex technical questions.",
"applicationCategory": "EducationalApplication",
"operatingSystem": "All"
}
</script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="Guard-472.js" defer></script>
<style>
/* Prevent copy-pasting for humans/bots alike */
body {
-webkit-user-select: none;
user-select: none;
}
/* Allow selection on code blocks or specific areas if needed */
code, .allow-select {
user-select: text;
}
</style>
<meta http-equiv="X-Frame-Options" content="DENY">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<!-- Standard favicon (for browsers) -->
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<!-- Apple Touch Icon (for iOS home screen) -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<!-- SVG favicon (modern browsers + high-res screens) -->
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<!-- Optional: PNG fallback for older browsers -->
<link rel="icon" type="image/png" sizes="32x32" href="/favicon.png">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Inter:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script src="lazy-load.js" defer></script>
<style>
:root {
--bg-gradient: linear-gradient(135deg, #000000, #111111);
--card-bg: #050505;
--accent: #ffba06;
--text-main: #ffffff;
--bot-bubble: #0f0f0f;
--user-bubble: #333333;
--shadow: 0 10px 40px rgba(0,0,0,0.7);
}
body {
font-family: 'manrope'inter,sans-serif,geist, ;
background: var(--bg-gradient);
color: var(--text-main);
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden; /* Prevent body scroll */
}
.main-container {
width: 100%;
max-width: 800px;
height: 95vh;
background: var(--card-bg);
border-radius: 20px;
display: flex;
flex-direction: column;
box-shadow: 0 0 50px rgba(0,0,0,0.8);
border: 1px solid rgba(255, 186, 6, 0.2);
}
/* Header */
.header {
padding: 15px 20px;
border-bottom: 1px solid #333;
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(0,0,0,0.3);
border-radius: 20px 20px 0 0;
}
.header h2 { margin: 0; color: var(--accent); font-size: 1.1rem; letter-spacing: 0.5px; }
.clear-btn {
background: none;
border: 1px solid #ff4444;
color: #ff4444;
padding: 5px 12px;
border-radius: 8px;
cursor: pointer;
font-size: 0.75rem;
transition: all 0.3s;
}
.clear-btn:hover { background: #ff4444; color: white; }
/* Chat Area */
#chatBox {
flex: 1;
padding: 20px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 15px;
scrollbar-width: thin;
scrollbar-color: #444 transparent;
}
.message-row { display: flex; width: 100%; }
.user-row { justify-content: flex-end; }
.bot-row { justify-content: flex-start; }
.bubble {
max-width: 90%;
padding: 12px 18px;
border-radius: 1px;
line-height: 1.5;
font-size: 0.95rem;
position: relative;
}
.user-bubble {
background: var(--user-bubble);
color: #fff;
border-bottom-right-radius: 4px;
font-weight: 600;
box-shadow: 0 4px 15px rgba(255, 186, 6, 0.2);
border-radius:18px;
}
.bot-bubble {
background: var(--bot-bubble);
color: #E1E3EC;
border-bottom-left-radius: 4px;
border: 1px solid #3333331A;
}
/* Loading / Typing */
.typing-indicator {
font-size: 0.8rem;
background: linear-gradient(90deg, #00c6ff 0%, #0072ff 100%);
padding: 0 20px;
height: 20px;
margin-bottom: 5px;
font-style: italic;
display: none; /* Hidden by default */
border-radius:30px;
}
/* Input Area */
.input-area {
padding: 15px;
background: rgba(0,0,0,0.4);
border-radius: 0 0 20px 20px;
display: flex;
gap: 10px;
}
input {
flex: 1;
padding: 14px 20px;
border-radius: 30px;
border: 1px solid #444;
background: #0f0f25;
color: white;
outline: none;
transition: border 0.3s;
}
input:focus { border-color: var(--accent); }
button.send-btn {
background: var(--accent);
border: none;
width: 48px;
height: 48px;
border-radius: 50%;
cursor: pointer;
color: #000;
font-size: 1.2rem;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.2s;
}
button.send-btn:hover { transform: scale(1.05); }
button:disabled { opacity: 0.5; cursor: wait; }
.dis {
font-size:11px;
color:#aaa;
text-align:center;
}
.law{
font-size:11px;
color:#ff4414;
text-align:center;
padding:5px;
}
.bubble {
word-wrap:break-word;
overflow-wrap:break-word;
white-space:pre-wrap;
/* Style for code blocks the bot sends */
.code {
background: rgba(0,0,0,0.3);
padding: 2px 5px;
border-radius: 4px;
font-family: monospace;
color: var(--accent);
}
.chat-media {
width:100%;
border-radius:12px;
margin-bottom:10px;
border: 1px solid #0f0;
box-shadow: 0 0 15px rgba(0,255,0,0.2);
}
.animated-fade-in {
animation:fadeIn 0.5s ease-in;
}
@keyframe fadeIn {
from { opacity : 0; transform:translateY(10px); }
to { opacity : 1; transform :translateY(0);}
}
/* Modal styles */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.7);
backdrop-filter: blur(4px);
}
.modal-content {
background-color: #1e1e2f;
margin: 15% auto;
padding: 20px;
border-radius: 12px;
width: 90%;
max-width: 400px;
border: 1px solid #ffba06;
}
.modal-content h3 {
color: #ffba06;
margin-top: 0;
}
#feedbackText {
width: 100%;
padding: 10px;
border-radius: 8px;
background: #0a0a1a;
color: white;
border: 1px solid #444;
margin: 10px 0;
resize: vertical;
}
.close-modal {
float: right;
font-size: 28px;
cursor: pointer;
color: #aaa;
}
.close-modal:hover {
color: #fff;
}
/* Action buttons container */
.message-actions {
display: flex;
gap: 12px;
margin-top: 8px;
justify-content: flex-start;
}
.action-btn {
background: transparent;
border: none;
cursor: pointer;
font-size: 1.1rem;
padding: 4px 8px;
border-radius: 8px;
transition: all 0.2s ease;
color: #ccc;
}
.action-btn:hover {
background: rgba(255,186,6,0.2);
color: #ffba06;
}
.action-btn.liked {
color: #ff4444;
}
.action-btn.liked:hover {
background: rgba(255,68,68,0.2);
}
</style>
</head>
<body>
<div class="main-container">
<div class="header">
<h2><i class="fas fa-robot"></i> Genus GPT</h2>
<button class="clear-btn" onclick="clearHistory()"><i class="fas fa-trash"></i> Clear Chat</button>
</div>
<div id="chatBox">
</div>
<div class="typing-indicator" id="loadingText">Generating Response...</div>
<div class="input-area">
<input type="text" id="userInput" placeholder="Ask Genus..." onkeypress="if(event.key==='Enter') sendMessage()">
<button class="send-btn" id="sendBtn" onclick="sendMessage()"><i class="fas fa-paper-plane"></i></button>
</div>
<div class="dis"> Genus is AI and can make mistakes.</div>
<div class="law" >Powered by Domify Academy | All Rights Reserved </div>
</div>
<script>
// 1. YOUR SPACE URL
const SCRIPT_URL = "https://domify-domify.hf.space/ask";
// --- 2. Load History on Page Load ---
window.onload = function() {
const history = localStorage.getItem('domifyTechChat');
if (history) {
document.getElementById('chatBox').innerHTML = history;
scrollToBottom();
} else {
// Intro message if no history exists
addMessage("Hello, Am Genus GPT. What would you like to learn today?", 'bot', false);
}
};
async function sendMessage() {
const input = document.getElementById('userInput');
const loadingText = document.getElementById('loadingText');
const sendBtn = document.getElementById('sendBtn');
const question = input.value.trim();
if (!question) return;
addMessage(question, 'user');
input.value = '';
input.disabled = true;
sendBtn.disabled = true;
loadingText.style.display = 'block';
try {
const response = await fetch(SCRIPT_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ question: question })
});
if (!response.ok) throw new Error('Server Busy');
const data = await response.json(); // This now contains {answer, asset, type}
loadingText.style.display = 'none';
// UPGRADE: We pass the WHOLE data object now, not just the answer
if (data.answer) {
renderAIResponse(data);
} else {
addMessage("⚠️ AI is taking longer than expected. Please try again.", 'bot');
}
} catch (e) {
loadingText.style.display = 'none';
addMessage("⚠️ Connection Failed.", 'bot');
} finally {
input.disabled = false;
sendBtn.disabled = false;
input.focus();
}
}
function renderAIResponse(data) {
let rawText = data.answer;
let mediaHtml = "";
// 1. Handle SEARCH Images (v1.0 Logic - DuckDuckGo)
const mediaTag = /\[MEDIA:\s*(.*?)\]/;
const match = rawText.match(mediaTag);
if (match && match[1] && match[1] !== 'none') {
mediaHtml = `<img src="${match[1].trim()}" class="chat-media" onerror="this.remove()">`;
}
// 2. Handle GENERATED Assets (v2.0 Logic - FLUX/Hunyuan)
if (data.asset) {
if (data.type === "image") {
mediaHtml = `<img src="${data.asset}" class="chat-media animated-fade-in">`;
} else if (data.type === "video") {
mediaHtml = `<video controls autoplay class="chat-media"><source src="${data.asset}" type="video/mp4"></video>`;
}
}
// Clean brackets from text so they don't show up in the typewriter
let cleanText = rawText.replace(mediaTag, "").replace(/\[GENERATE_.*?\]/g, "");
// 3. Convert Markdown to HTML
let formattedText = cleanText
.replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>')
.replace(/`(.*?)`/g, '<code>$1</code>');
typeWriter(mediaHtml, formattedText);
}
function typeWriter(media, text) {
const chatBox = document.getElementById('chatBox');
const row = document.createElement('div');
row.className = "message-row bot-row";
const bubble = document.createElement('div');
bubble.className = "bubble bot-bubble";
bubble.innerHTML = media; // Images appear instantly
row.appendChild(bubble);
chatBox.appendChild(row);
let i = 0;
function type() {
if (i < text.length) {
// This 'if' block skips HTML tags so they don't spell out <s-t-r-o-n-g>
if (text.charAt(i) === '<') {
let tagEnd = text.indexOf('>', i);
bubble.innerHTML += text.substring(i, tagEnd + 1);
i = tagEnd + 1;
} else {
// Converts newlines to breaks while typing
bubble.innerHTML += (text.charAt(i) === '\n') ? '<br>' : text.charAt(i);
i++;
}
scrollToBottom();
setTimeout(type, 12); // Slightly slower for readability
} else {
saveChat();
}
}
type();
}
function addMessage(content, sender, save = true) {
const chatBox = document.getElementById('chatBox');
const row = document.createElement('div');
row.className = `message-row ${sender}-row`;
row.innerHTML = `<div class="bubble ${sender}-bubble">${content.replace(/\n/g, '<br>')}</div>`;
chatBox.appendChild(row);
scrollToBottom();
if(save) saveChat();
}
// --- Persistence & Cleanup ---
function saveChat() {
localStorage.setItem('domifyTechChat', document.getElementById('chatBox').innerHTML);
}
function clearHistory() {
if(confirm("Are you sure you want to clear your learning history?")) {
localStorage.removeItem('domifyTechChat');
document.getElementById('chatBox').innerHTML = '';
addMessage("Chat history cleared. How can I help you start fresh?", 'bot', false);
}
}
function scrollToBottom() {
const chatBox = document.getElementById('chatBox');
chatBox.scrollTop = chatBox.scrollHeight;
}
</script>
<script>
(function() {
// --- 1. THE WHITELIST (Good Bots) ---
const goodBots = [
"googlebot", "google-extended", "mediapartners-google",
"adsbot-google", "bingbot", "gptbot", "chatgpt-user",
"anthropic-ai", "claude-bot", "gemini"
];
const userAgent = navigator.userAgent.toLowerCase();
const isGoodBot = goodBots.some(bot => userAgent.includes(bot));
// If it's a known good bot, stop here and let them work (SEO)
if (isGoodBot) {
console.log("Welcome, Good Bot! Proceed to crawl.");
return;
}
// --- 2. THE HUMAN CHECK (Anti-Scraper) ---
let isHuman = false;
// Listen for human interaction
const humanSignal = () => {
isHuman = true;
document.body.classList.remove('site-frozen');
// Remove listeners once human is verified
window.removeEventListener('mousemove', humanSignal);
window.removeEventListener('touchstart', humanSignal);
window.removeEventListener('scroll', humanSignal);
};
window.addEventListener('mousemove', humanSignal);
window.addEventListener('touchstart', humanSignal);
window.addEventListener('scroll', humanSignal);
// --- 3. THE FAIL-SAFE ---
// If no human signal after 3 seconds and NOT a good bot,
// we assume it's a basic scraper and hide content.
setTimeout(() => {
if (!isHuman && !isGoodBot) {
document.body.innerHTML = "<h1>Security Check: Please interact with the page to view content.</h1>";
console.warn("Potential bad bot blocked.");
}
}, 10000);
})();
document.body.style.display = 'none'; // Hide body
document.body.style.display = 'block'; // Show if JS runs
</script>
<script src="Analysis.js" defer></script>
</body>
</html>