Skip to content

Commit

Permalink
2.4.5
Browse files Browse the repository at this point in the history
autoplay next aded
  • Loading branch information
SuperZombi committed Oct 22, 2022
1 parent 6f56a0e commit a9a5354
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 14 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Picture-in-Picture-for-Youtube
<img src="https://shields.io/badge/version-v2.4.4.1-blue">
<img src="https://shields.io/badge/version-v2.4.5-blue">

### Chrome extension

Expand Down Expand Up @@ -65,19 +65,22 @@ Activates the Picture-in-Picture button and other useful features.

## List of changes:

##### 2.4.4.1:
* Support for different youtube versions

#### 2.4.4:
* Return of some old functions and bug fixes

#### 2.4.3:
* Updated with the new visual changes of YouTube
#### 2.4.5:
* Autoplay next video in shorts

<br/>
<details>
<summary>Other</summary>

##### 2.4.4.1:
* Support for different youtube versions

#### 2.4.4:
* Return of some old functions and bug fixes

#### 2.4.3:
* Updated with the new visual changes of YouTube

##### 2.4.2.1:
* Maximum volume bug fixed

Expand Down
4 changes: 4 additions & 0 deletions chrome/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"message": "10 sec"
},

"autoplayNext": {
"message": "Autoplay"
},

"hideSponsor": {
"message": "Hide «Sponsor» button"
}, "hideThanksTooltip": { "message": "../images/tooltips/en/sponsor.png" },
Expand Down
4 changes: 4 additions & 0 deletions chrome/_locales/ru/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"message": "10 сек"
},

"autoplayNext": {
"message": "Автовоспроизведение"
},

"hideSponsor": {
"message": "Скрыть кнопку «Спонсировать»"
}, "hideSponsorTooltip": { "message": "../images/tooltips/ru/sponsor.png" },
Expand Down
4 changes: 4 additions & 0 deletions chrome/_locales/uk/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
"10s": {
"message": "10 сек"
},

"autoplayNext": {
"message": "Автовідтворення"
},

"hideSponsor": {
"message": "Сховати кнопку «Спонсорувати»"
Expand Down
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manifest_version": 3,
"version": "2.4.4.1",
"version": "2.4.5",
"name": "__MSG_extName__",
"description": "__MSG_extDesc__",
"default_locale": "en",
Expand Down
7 changes: 6 additions & 1 deletion chrome/menu/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@
<a class="cursor">__MSG_showTimeline__</a>
</label>

<label style="margin-top:8px;">
<input class="form-check-input" type="checkbox" name="autoNext">
<a class="cursor">__MSG_autoplayNext__</a>
</label>


<button id="openShortcuts" class="cursor">__MSG_Hotkeys__</button>

Expand Down Expand Up @@ -166,7 +171,7 @@
</a>

<span style="margin-top:2px;">
<img src="https://shields.io/badge/version-v2.4.4.1-blue">
<img src="https://shields.io/badge/version-v2.4.5-blue">
<img id="update" style="display:none; margin-left:4px" src="../images/update.svg" height="20px">
</span>
</p>
Expand Down
8 changes: 7 additions & 1 deletion chrome/script.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var Settings = {}
chrome.storage.sync.get({ changeIcon: true, animation: "default",
hideSponsor: false, hideButtonLabels: false, hideClips: false, hideDownload: false,
maximumVolume: false,
maximumVolume: false, autoNext: false,
speedometer: false, fullscreen: false, showTimeline: false,
shortcuts: {} }, results => { Settings = results; });
var fisrt_load = true;
Expand Down Expand Up @@ -421,6 +421,12 @@ function main(){
if (Settings.showTimeline){
addControls_and_progressBar(video)
}
if (Settings.autoNext){
video.removeAttribute("loop")
video.addEventListener("ended", _=>{
document.querySelector("#navigation-button-down button").click()
})
}
if (Object.keys(Settings.shortcuts).length > 0){
window.addEventListener("keydown", HotKeysWorker, true)
}
Expand Down
17 changes: 15 additions & 2 deletions pip.user.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a9a5354

Please sign in to comment.