From 6c6cb9ba0dac141fc94d03a5a787c56c24719c45 Mon Sep 17 00:00:00 2001
From: xol69 <128804451+xol69@users.noreply.github.com>
Date: Sat, 29 Apr 2023 23:34:16 +0600
Subject: [PATCH 1/4] Delete ic_autorenew_black_24px.svg
---
icons/ic_autorenew_black_24px.svg | 4 ----
1 file changed, 4 deletions(-)
delete mode 100644 icons/ic_autorenew_black_24px.svg
diff --git a/icons/ic_autorenew_black_24px.svg b/icons/ic_autorenew_black_24px.svg
deleted file mode 100644
index 7bc2949..0000000
--- a/icons/ic_autorenew_black_24px.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
From 3c2a0e02c8f40a31d6a8329b8262fd213704a9d2 Mon Sep 17 00:00:00 2001
From: xol69 <128804451+xol69@users.noreply.github.com>
Date: Sat, 29 Apr 2023 23:34:41 +0600
Subject: [PATCH 2/4] Add files via upload
---
icons/ic_autorenew_black_24px.svg | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 icons/ic_autorenew_black_24px.svg
diff --git a/icons/ic_autorenew_black_24px.svg b/icons/ic_autorenew_black_24px.svg
new file mode 100644
index 0000000..1b31616
--- /dev/null
+++ b/icons/ic_autorenew_black_24px.svg
@@ -0,0 +1,11 @@
+
+
+
From ece70ca4ea8add98ddbfd9b8da21f184e3f77390 Mon Sep 17 00:00:00 2001
From: xol69 <128804451+xol69@users.noreply.github.com>
Date: Sat, 29 Apr 2023 23:44:08 +0600
Subject: [PATCH 3/4] Update content_script.js
---
js/content_script.js | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/js/content_script.js b/js/content_script.js
index 871528c..377bc9f 100644
--- a/js/content_script.js
+++ b/js/content_script.js
@@ -2,7 +2,7 @@ function getYouLoopSVG() {
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('viewBox', '0 0 24 24');
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
- path.setAttribute('d', 'M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z');
+ path.setAttribute('d', 'M20,7.5v10c0,1.4-1.1,2.5-2.5,2.5H12v3l-4-4l4-4v3h5.5c0.3,0,0.5-0.2,0.5-0.5v-10H20z M16,5l-4-4v3H6.5C5.1,4,4,5.1,4,6.5v10h2v-10C6,6.2,6.2,6,6.5,6H12v3L16,5z');
svg.appendChild(path);
return svg;
}
@@ -27,6 +27,7 @@ function insertYouLoopElement() {
const newButton = document.createElement('a');
newButton.classList.add('ytp-button', 'youloop-button');
newButton.title = 'Loop Video';
+ newButton.style.opacity = '0.35'; // set opacity to 35% by default
newButton.appendChild(getYouLoopSVG());
newButton.addEventListener('click', toggleLoopState);
@@ -35,8 +36,15 @@ function insertYouLoopElement() {
function toggleLoopState() {
const video = document.querySelector('video');
- video.loop = !video.loop;
- if (video.loop) video.play();
+ const youloop = document.querySelector('.youloop-button');
+ if (youloop.style.opacity === '0.35') {
+ youloop.style.opacity = '0.8'; // set opacity to 80% when clicked
+ video.loop = true;
+ video.play();
+ } else {
+ youloop.style.opacity = '0.35'; // set opacity to 35% when clicked again
+ video.loop = false;
+ }
updateToggleControls();
}
From 8b540df84c3176b28b5cdf041b4fc9d316426248 Mon Sep 17 00:00:00 2001
From: xol69 <128804451+xol69@users.noreply.github.com>
Date: Sat, 29 Apr 2023 23:45:43 +0600
Subject: [PATCH 4/4] Update youloop.css
---
styles/youloop.css | 1 -
1 file changed, 1 deletion(-)
diff --git a/styles/youloop.css b/styles/youloop.css
index faa06e5..0a2ad5e 100644
--- a/styles/youloop.css
+++ b/styles/youloop.css
@@ -11,6 +11,5 @@ a.youloop-button svg {
}
a.youloop-button.active svg {
- fill: #f12b24;
transform: rotate(90deg);
}