|
105 | 105 | <summary>Click to expand</summary>
|
106 | 106 | <ol>
|
107 | 107 | <li><strong>Clone the Repository</strong>:
|
108 |
| - <br> |
109 |
| - <a href="#" onclick="navigator.clipboard.writeText('git clone https://github.com/Radio125/SCORM-Test-Decoder-Telegram-Bot.git')"> |
110 |
| - <img alt="Copy to clipboard" src="https://img.shields.io/badge/copy%20command-1a73e8?logo=clipboard&style=flat-square"> |
111 |
| - </a> |
112 |
| - ```bash |
113 |
| - git clone https://github.com/Radio125/SCORM-Test-Decoder-Telegram-Bot.git |
114 |
| - ``` |
| 108 | + <button onclick="copyToClipboard('git clone https://github.com/Radio125/SCORM-Test-Decoder-Telegram-Bot.git')">Copy command</button> |
| 109 | + <pre><code>git clone https://github.com/Radio125/SCORM-Test-Decoder-Telegram-Bot.git</code></pre> |
115 | 110 | </li>
|
116 | 111 | <li><strong>Navigate to the Directory</strong>:
|
117 |
| - <br> |
118 |
| - <a href="#" onclick="navigator.clipboard.writeText('cd SCORM-Test-Decoder-Telegram-Bot')"> |
119 |
| - <img alt="Copy to clipboard" src="https://img.shields.io/badge/copy%20command-1a73e8?logo=clipboard&style=flat-square"> |
120 |
| - </a> |
121 |
| - ```bash |
122 |
| - cd SCORM-Test-Decoder-Telegram-Bot |
123 |
| - ``` |
| 112 | + <button onclick="copyToClipboard('cd SCORM-Test-Decoder-Telegram-Bot')">Copy command</button> |
| 113 | + <pre><code>cd SCORM-Test-Decoder-Telegram-Bot</code></pre> |
124 | 114 | </li>
|
125 | 115 | <li><strong>Create a Virtual Environment (optional but recommended)</strong>:
|
126 |
| - <br> |
127 |
| - <a href="#" onclick="navigator.clipboard.writeText('python -m venv venv')"> |
128 |
| - <img alt="Copy to clipboard" src="https://img.shields.io/badge/copy%20command-1a73e8?logo=clipboard&style=flat-square"> |
129 |
| - </a> |
130 |
| - ```bash |
131 |
| - python -m venv venv |
132 |
| - ``` |
| 116 | + <button onclick="copyToClipboard('python -m venv venv')">Copy command</button> |
| 117 | + <pre><code>python -m venv venv</code></pre> |
133 | 118 | </li>
|
134 | 119 | <li><strong>Activate the Virtual Environment</strong>:
|
135 | 120 | <ul>
|
136 | 121 | <li><strong>Windows</strong>:
|
137 |
| - <br> |
138 |
| - <a href="#" onclick="navigator.clipboard.writeText('venv\\Scripts\\activate')"> |
139 |
| - <img alt="Copy to clipboard" src="https://img.shields.io/badge/copy%20command-1a73e8?logo=clipboard&style=flat-square"> |
140 |
| - </a> |
141 |
| - ```bash |
142 |
| - venv\Scripts\activate |
143 |
| - ``` |
| 122 | + <button onclick="copyToClipboard('venv\\Scripts\\activate')">Copy command</button> |
| 123 | + <pre><code>venv\Scripts\activate</code></pre> |
144 | 124 | </li>
|
145 | 125 | <li><strong>macOS/Linux</strong>:
|
146 |
| - <br> |
147 |
| - <a href="#" onclick="navigator.clipboard.writeText('source venv/bin/activate')"> |
148 |
| - <img alt="Copy to clipboard" src="https://img.shields.io/badge/copy%20command-1a73e8?logo=clipboard&style=flat-square"> |
149 |
| - </a> |
150 |
| - ```bash |
151 |
| - source venv/bin/activate |
152 |
| - ``` |
| 126 | + <button onclick="copyToClipboard('source venv/bin/activate')">Copy command</button> |
| 127 | + <pre><code>source venv/bin/activate</code></pre> |
153 | 128 | </li>
|
154 | 129 | </ul>
|
155 | 130 | </li>
|
156 | 131 | <li><strong>Install Dependencies</strong>:
|
157 |
| - <br> |
158 |
| - <a href="#" onclick="navigator.clipboard.writeText('pip install -r requirements.txt')"> |
159 |
| - <img alt="Copy to clipboard" src="https://img.shields.io/badge/copy%20command-1a73e8?logo=clipboard&style=flat-square"> |
160 |
| - </a> |
161 |
| - ```bash |
162 |
| - pip install -r requirements.txt |
163 |
| - ``` |
| 132 | + <button onclick="copyToClipboard('pip install -r requirements.txt')">Copy command</button> |
| 133 | + <pre><code>pip install -r requirements.txt</code></pre> |
164 | 134 | </li>
|
165 | 135 | <li><strong>Run the Bot</strong>:
|
166 |
| - <br> |
167 |
| - <a href="#" onclick="navigator.clipboard.writeText('python bot.py')"> |
168 |
| - <img alt="Copy to clipboard" src="https://img.shields.io/badge/copy%20command-1a73e8?logo=clipboard&style=flat-square"> |
169 |
| - </a> |
170 |
| - ```bash |
171 |
| - python bot.py |
172 |
| - ``` |
| 136 | + <button onclick="copyToClipboard('python bot.py')">Copy command</button> |
| 137 | + <pre><code>python bot.py</code></pre> |
173 | 138 | </li>
|
174 | 139 | </ol>
|
175 | 140 | </details>
|
|
198 | 163 | <summary>Click to expand</summary>
|
199 | 164 | <p>This project is licensed under the MIT License - see the LICENSE file for details.</p>
|
200 | 165 | </details>
|
| 166 | + |
| 167 | +<script> |
| 168 | +function copyToClipboard(text) { |
| 169 | + navigator.clipboard.writeText(text).then(function() { |
| 170 | + console.log('Text copied to clipboard'); |
| 171 | + }).catch(function(error) { |
| 172 | + console.error('Unable to copy text: ', error); |
| 173 | + }); |
| 174 | +} |
| 175 | +</script> |
0 commit comments