We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd8127e commit ef6087bCopy full SHA for ef6087b
src/popup/popup.css
@@ -40,7 +40,7 @@ body {
40
background-color: var(--background-color);
41
font-size: calc(var(--font-size-base) * var(--scale-factor));
42
font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, sans-serif;
43
- padding: 0 calc(20px * var(--scale-factor));
+ padding: calc(25px*var(--scale-factor)) calc(20px * var(--scale-factor));
44
width: calc(400px * var(--scale-factor));
45
margin: 0;
46
line-height: 1.5;
@@ -298,9 +298,10 @@ pre[class*="language-"] {
298
}
299
300
#clear-code-btn {
301
- margin-left: calc(10px * var(--scale-factor));
+ margin-left: calc(5px * var(--scale-factor));
302
303
304
+
305
/* Settings */
306
#settings-icon {
307
width: calc(24px * var(--scale-factor));
@@ -326,6 +327,7 @@ pre[class*="language-"] {
326
327
328
#settings-menu {
329
text-align: center;
330
+ padding: calc(15px * var(--scale-factor)) 0;
331
332
333
.video-container {
src/popup/popup.js
@@ -0,0 +1,23 @@
1
+// Add code to highlight response after it's displayed
2
+document.addEventListener('DOMContentLoaded', function() {
3
+ // Function to make the response visible and highlighted
4
+ function watchForResponseContent() {
5
+ const responseElement = document.getElementById('analyze-code-response');
6
+ if (responseElement) {
7
+ // Create a MutationObserver to detect when content is added
8
+ const observer = new MutationObserver(function(mutations) {
9
+ mutations.forEach(function(mutation) {
10
+ if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
11
+ // Make sure the element is visible by removing the 'hidden' class
12
+ responseElement.classList.remove('hidden');
13
+ }
14
+ });
15
16
17
+ // Start observing the response element
18
+ observer.observe(responseElement, { childList: true, subtree: true });
19
20
21
22
+ watchForResponseContent();
23
+});
src/popup/popup.ts
@@ -307,9 +307,17 @@ function initCopyButton(): void {
const copyButton = elements['copyCodeBtn'];
308
if (!copyButton) return;
309
copyButton.onclick = async () => {
310
- setInfoMessage('Copied Code', 3000);
311
- // change icon to check-icon.png
312
- copyButton
+ setInfoMessage('Copied Code', 1000);
+ // Change icon to check-icon.png
+ const copyButtonImg = copyButton.querySelector('img');
313
+ if (copyButtonImg) {
314
+ copyButtonImg.src = '../assets/images/check-icon.png';
315
+ // After 1 second, change the icon back to the copy icon
316
+ setTimeout(() => {
317
+ copyButtonImg.src = '../assets/images/copy-icon.png';
318
+ }, 1000);
319
320
321
if (fixCodeResponse && fixCodeResponse.textContent) {
322
await navigator.clipboard.writeText(fixCodeResponse.textContent);
323
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments