-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgemini.html
More file actions
85 lines (82 loc) · 3.09 KB
/
gemini.html
File metadata and controls
85 lines (82 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="./gemini_favicon.png" sizes="any" type="image/png" />
<title>DevolveAI</title>
<link rel="stylesheet" href="styles.css" />
<!-- Link to the CSS file -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
crossorigin="anonymous"
/>
</head>
<body>
<!-- Empty div to display generated text -->
<div style="display: flex; flex-direction: row">
<div style="display: flex; flex-direction: column">
<a href="./index.php" style="width: 20em"
><img src="devolve.png" alt="devolve logo" id="logo"
/></a>
<div id="textBox">
<button id="copyText">
<img
id="copyID"
class="copyIcon"
alt="Clipboard"
onclick="copyText()"
/>
</button>
<div id="generatedText"></div>
</div>
<div id="explanation-box">
<div id="explanation"></div>
</div>
</div>
<div class="menu">
<a href="./index.php" class="menu-item">Upload</a>
<span class="arrow"><i class="fas fa-arrow-down"></i></span>
<a href="./assembly.html" class="menu-item">Assembly</a>
<span class="arrow"><i class="fas fa-arrow-down"></i></span>
<a href="#" class="menu-item current-page">Devolve</a>
<span class="arrow"><i class="fas fa-arrow-down"></i></span>
<a href="./refine.html" class="menu-item">Refine</a>
<span class="arrow"><i class="fas fa-arrow-down"></i></span>
<a href="#" id="downloadLink" class="menu-item">Download</a>
</div>
</div>
<div class="loader"></div>
<!-- Include the JavaScript file -->
<script type="module" src="gemini.js"></script>
<script>
function copyText() {
// Select the text inside the element
const textToCopy = document.getElementById('generatedText');
const range = document.createRange();
range.selectNode(textToCopy);
window.getSelection().removeAllRanges(); // Clear current selection
window.getSelection().addRange(range); // Select the text
// Copy the selected text
document.execCommand('copy');
// Deselect the text
window.getSelection().removeAllRanges();
// Change the icon to indicate copied
let iconElement = document.getElementById('copyID');
iconElement.classList.add('copyIconClicked');
iconElement.classList.remove('copyIcon');
}
// Add event listener for Enter key
document
.getElementById('inputText')
.addEventListener('keypress', function (e) {
// Check if Enter key is pressed (key code 13)
if (e.key === 'Enter') {
e.preventDefault(); // Prevent form submission
document.getElementById('submitBtn').click(); // Trigger click event on submit button
}
});
</script>
</body>
</html>