-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ffa8844
Showing
7 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
let primaryTarget, primaryStyle, playerTarget, playerHeight, playerInterval | ||
|
||
window.addEventListener('load', (event) => { | ||
console.log('YouTube - Scrollable Playlist: Loading') | ||
|
||
playerInterval = setInterval(() => { | ||
primaryTarget = document.querySelector("#primary") | ||
playerTarget = primaryTarget?.querySelector("#player") | ||
|
||
if(playerTarget) { | ||
console.log('YouTube - Scrollable Playlist: playerTarget -->', playerTarget) | ||
clearInterval(playerInterval); | ||
load(); | ||
|
||
window.addEventListener('resize', function(event) { | ||
load(); | ||
}, true); | ||
} | ||
}, 100); | ||
}); | ||
|
||
function load() { | ||
primaryTarget = document.querySelector("#primary") | ||
primaryStyle = primaryTarget.currentStyle || window.getComputedStyle(primaryTarget) | ||
|
||
playerTarget = primaryTarget.querySelector("#player") | ||
playerHeight = playerTarget.offsetHeight | ||
|
||
let secondaryTarget = document.querySelector("#secondary") | ||
secondaryTarget.style.height = `${playerHeight + parseInt(primaryStyle.paddingTop)}px` | ||
secondaryTarget.style.overflow = `auto` | ||
|
||
console.log('YouTube - Scrollable Playlist: Loaded') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "YouTube - Scrollable Playlist", | ||
"description": "It'll make playlist scrollable for: https://www.youtube.com/", | ||
"version": "1.0.0", | ||
"icons": { "128": "logo_128.png" }, | ||
"content_scripts": [ | ||
{ | ||
"matches": ["*://www.youtube.com/*", "*://youtube.com/*"], | ||
"js": ["jquery.min.js", "main.js"] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Instruction: | ||
- Visit: chrome://extensions/ | ||
- Enable Developer mode ==o | ||
- Click [Load unpacked] button | ||
- Select extracted folder | ||
- Extension: "YouTube Scrollable Playlist" should be listed | ||
- You can always disable this from extesion detials |