mirror of
https://codeberg.org/ashley/poke
synced 2025-05-30 02:59:43 +00:00
a
This commit is contained in:
parent
3f66e88dae
commit
ce5428eccb
@ -962,54 +962,99 @@ function extractQueryFromUpsellMessage(message) {
|
|||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
%>
|
%>
|
||||||
<% if (answer) { %>
|
<% if (answer) { %>
|
||||||
<div class="container" style="padding: 1em;">
|
<div class="container" style="padding: 1em;">
|
||||||
<h2 style="font-family: 'PokeTube Flex'; font-size: large; text-align: left !important ; font-stretch: ultra-expanded; font-weight: 1000; margin-bottom: -0.1em;">
|
<h2 style="font-family: 'PokeTube Flex'; font-size: large; text-align: left !important; font-stretch: ultra-expanded; font-weight: 1000; margin-bottom: -0.1em;">
|
||||||
Answer to ur question
|
Answer to ur question
|
||||||
</h2>
|
</h2>
|
||||||
<h2 style="font-family: 'PokeTube Flex'; font-size: large; text-align: right !important; font-stretch: ultra-expanded; font-weight: 1000; margin-bottom: -0.1em; margin-top: -1em;">
|
<h2 style="font-family: 'PokeTube Flex'; font-size: large; text-align: right !important; font-stretch: ultra-expanded; font-weight: 1000; margin-bottom: -0.1em; margin-top: -1em;">
|
||||||
<i title="PokeIntellagance! " class="fa-light fa-sparkles"></i>
|
<i title="PokeIntellagance!" class="fa-light fa-sparkles"></i>
|
||||||
</h2>
|
</h2>
|
||||||
<span
|
<span
|
||||||
id="answer-text"
|
id="answer-text"
|
||||||
style="
|
style="
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 7em;
|
font-size: 7em;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
margin-bottom: 1em;
|
||||||
"
|
"
|
||||||
><%= answer %></span>
|
><%= answer %></span>
|
||||||
<button
|
<div style="display: flex; gap: 1em;">
|
||||||
id="copy-btn"
|
<button
|
||||||
style="
|
id="copy-btn"
|
||||||
font-size: 1em;
|
style="
|
||||||
padding: 0.5em 1em;
|
font-size: 1em;
|
||||||
cursor: pointer;
|
padding: 0.5em 1em;
|
||||||
background: #222;
|
cursor: pointer;
|
||||||
color: #fff;
|
background: #222;
|
||||||
border: none;
|
color: #fff;
|
||||||
border-radius: 0.25em;
|
border: none;
|
||||||
"
|
border-radius: 0.25em;
|
||||||
>Copy</button>
|
"
|
||||||
|
>Copy</button>
|
||||||
|
<button
|
||||||
|
id="ask-btn"
|
||||||
|
style="font-size:1em;padding:0.5em 1em;"
|
||||||
|
>Ask ChatGPT</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<style>
|
||||||
|
#copy-btn,
|
||||||
|
#ask-btn {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#ask-btn {
|
||||||
|
background: linear-gradient(45deg, #6a11cb, #2575fc);
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0.5em;
|
||||||
|
padding: 0.6em 1.2em;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 4px 15px rgba(0,0,0,0.2);
|
||||||
|
transition: transform 0.1s ease, box-shadow 0.2s ease;
|
||||||
|
}
|
||||||
|
#ask-btn:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 6px 20px rgba(0,0,0,0.3);
|
||||||
|
}
|
||||||
|
#ask-btn:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
box-shadow: 0 3px 10px rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
;(function() {
|
;(function() {
|
||||||
const btn = document.getElementById('copy-btn');
|
const copyBtn = document.getElementById('copy-btn');
|
||||||
const textEl = document.getElementById('answer-text');
|
const askBtn = document.getElementById('ask-btn');
|
||||||
btn.addEventListener('click', () => {
|
const textEl = document.getElementById('answer-text');
|
||||||
|
|
||||||
|
copyBtn.addEventListener('click', () => {
|
||||||
const text = textEl.innerText || textEl.textContent;
|
const text = textEl.innerText || textEl.textContent;
|
||||||
navigator.clipboard.writeText(text).then(() => {
|
navigator.clipboard.writeText(text).then(() => {
|
||||||
btn.textContent = 'Copied!';
|
copyBtn.textContent = 'Copied!';
|
||||||
setTimeout(() => { btn.textContent = 'Copy'; }, 1500);
|
setTimeout(() => { copyBtn.textContent = 'Copy'; }, 1500);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
askBtn.addEventListener('click', () => {
|
||||||
|
const userQuery = prompt('What would you like to ask ChatGPT?');
|
||||||
|
if (userQuery) {
|
||||||
|
window.location.href = `/chat?query=${encodeURIComponent(userQuery)}`;
|
||||||
|
}
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<% } else if (showUpsell) { %>
|
<% } else if (showUpsell) { %>
|
||||||
|
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- self harm -->
|
<!-- self harm -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user