Skip to content

Commit a08e218

Browse files
authored
README.md
1 parent 8a5acac commit a08e218

File tree

1 file changed

+24
-49
lines changed

1 file changed

+24
-49
lines changed

README.md

+24-49
Original file line numberDiff line numberDiff line change
@@ -105,71 +105,36 @@
105105
<summary>Click to expand</summary>
106106
<ol>
107107
<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>
115110
</li>
116111
<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>
124114
</li>
125115
<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>
133118
</li>
134119
<li><strong>Activate the Virtual Environment</strong>:
135120
<ul>
136121
<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>
144124
</li>
145125
<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>
153128
</li>
154129
</ul>
155130
</li>
156131
<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>
164134
</li>
165135
<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>
173138
</li>
174139
</ol>
175140
</details>
@@ -198,3 +163,13 @@
198163
<summary>Click to expand</summary>
199164
<p>This project is licensed under the MIT License - see the LICENSE file for details.</p>
200165
</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

Comments
 (0)