Skip to content

Commit 13bcaba

Browse files
Update help.html
1 parent 8c6814b commit 13bcaba

1 file changed

Lines changed: 22 additions & 34 deletions

File tree

help.html

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
a:hover{border-color:#e5c97a}
2020
</style>
2121
<link href="/logo/favicon-32.png?v=3" rel="icon" sizes="32x32" type="image/png"/><link href="/logo/favicon-16.png?v=3" rel="icon" sizes="16x16" type="image/png"/><link href="/logo/apple-touch-icon.png?v=3" rel="apple-touch-icon" sizes="180x180"/><link href="/logo/favicon.ico?v=3" rel="icon"/><link href="/logo/site.webmanifest?v=3" rel="manifest"/><style>.brand-logo{height:108px;width:auto;vertical-align:middle}
22-
@media (max-width:640px){.brand-logo{height:84px}}</style><style>
23-
/* Feedback widget (standalone, no site-wide dependencies) */
22+
@media (max-width:640px){.brand-logo{height:84px}}</style>
23+
<style>
2424
.feedback{margin-top:28px;padding:16px;border:1px solid rgba(255,255,255,.15);border-radius:12px;background:rgba(255,255,255,.03)}
2525
.feedback h2{margin:.4em 0 .6em;color:#e5c97a}
2626
.feedback p.note{font-size:13px;opacity:.9;margin:.2em 0 1em}
@@ -41,10 +41,10 @@
4141
.feedback .status{font-size:13px;opacity:.95}
4242
.feedback .status.ok{color:#b7f397}
4343
.feedback .status.err{color:#ffb4a8}
44-
@media (max-width:600px){
45-
.feedback{padding:14px}
46-
}
44+
@media (max-width:600px){ .feedback{padding:14px} }
4745
</style>
46+
47+
<script>window.FEEDBACK_ENDPOINT="https://cryptobot-ai-1.onrender.com/api/feedback";window.FEEDBACK_DISABLE_MAILTO=1;</script>
4848
</head><body>
4949
<div class="wrap">
5050
<h1>Help / FAQ</h1>
@@ -69,6 +69,7 @@ <h2>Limits &amp; availability</h2>
6969
<p>Watchlist is <em>lite</em> in MVP: coverage for <strong>ETH/BSC/Polygon</strong>, reasonable caps per user, and guardrails to prevent spam. Pro tiers increase limits.</p>
7070
<p class="note">Need more? Contact us to unlock higher limits and faster cadence.</p>
7171
</div>
72+
7273
<section id="feedback" class="feedback">
7374
<h2>Questions & feedback</h2>
7475
<p class="note">Leave your email and message. We'll reply within 24–48h.</p>
@@ -86,6 +87,8 @@ <h2>Questions & feedback</h2>
8687
</form>
8788
<p class="note">By submitting, you agree that we may contact you about this request. No wallets or private keys — ever.</p>
8889
</section>
90+
91+
8992
<script>
9093
(function(){
9194
var form = document.getElementById('feedbackForm');
@@ -111,38 +114,23 @@ <h2>Questions & feedback</h2>
111114
ts: new Date().toISOString()
112115
};
113116

114-
var endpoints = [];
115-
if(window.FEEDBACK_ENDPOINT) endpoints.push(window.FEEDBACK_ENDPOINT);
116-
endpoints.push('/api/feedback');
117-
118-
var posted = false;
119-
for (var i=0;i<endpoints.length;i++){
120-
var ep = endpoints[i];
121-
if(!ep) continue;
122-
try{
123-
var res = await fetch(ep, {
124-
method:'POST',
125-
headers:{'Content-Type':'application/json'},
126-
body: JSON.stringify(payload)
127-
});
128-
if (res.ok){
129-
posted = true;
130-
break;
131-
}
132-
}catch(_){ /* ignore and try next */ }
133-
}
117+
var ep = window.FEEDBACK_ENDPOINT;
118+
if(!ep){ say('Feedback endpoint is not configured.', false); return; }
134119

135-
if(!posted){
136-
// Fallback to mailto
137-
var mail = 'contact@metridex.com';
138-
var subject = encodeURIComponent('Metridex feedback');
139-
var body = encodeURIComponent('Email: ' + email + '\n\n' + msg);
140-
window.location.href = 'mailto:' + mail + '?subject=' + subject + '&body=' + body;
120+
try{
121+
var res = await fetch(ep, { method:'POST', headers:{'Content-Type':'application/json'}, body: JSON.stringify(payload) });
122+
if(res.ok){
123+
form.reset();
124+
say('Thanks! Your message has been sent.', true);
125+
}else{
126+
var txt = 'Error ' + res.status + '. Try again later or email contact@metridex.com';
127+
say(txt, false);
128+
}
129+
}catch(err){
130+
say('Network error. Try again later.', false);
141131
}
142-
143-
form.reset();
144-
say('Thanks! Your message has been sent.', true);
145132
});
146133
})();
147134
</script>
135+
148136
</body></html>

0 commit comments

Comments
 (0)