Coder Social home page Coder Social logo

insin / control-panel-for-youtube Goto Github PK

View Code? Open in Web Editor NEW
58.0 2.0 1.0 547 KB

Browser extension which gives you more control over YouTube by adding missing options and UI improvements - for desktop & mobile browsers

Home Page: https://jbscript.dev/control-panel-for-youtube

JavaScript 78.26% CSS 7.97% HTML 9.37% Swift 3.69% Shell 0.71%
browser-extension content-blocker productivity skip-ads youtube

control-panel-for-youtube's Introduction

Recent Releases

  • 2024-04-08control-panel-for-twitter v3.24.0
    Browser extension which gives you more control over your Twitter timeline and adds missing features and UI improvements - available for desktop and mobile browsers
    v3.24.0 release notes
    • Added an option to hide Jobs (enabled by default)
    • Added a "Show under focused tweets" sub-option to "Hide Bookmark button under tweets", which lets you show the bookmark button under focused tweets while hiding it elsewhere
    • Added a "Number of followers" sub-option to "Show people with over 1 million followers", which lets you show replies from people with 1K, 10K or 100K followers instead, as Premium is now being forced on certain users
    • Hide Premium upsells now hides the Highlights and Articles tabs in your own profile if you're not subscribed to Premium
    • Simplified the name of the option which hides sidebar contents to just "Hide sidebar contents"
    • Renamed a number of "Twitter Blue" options to "Premium"
    • Fixed getting Tweet and user info from React state - fixes restoring links under Tweets and showing/hiding blue check replies based on follower count

    Available in the following extension stores:

    Apple App Store Chrome Web Store Firefox Add-ons Edge Add-ons

  • 2024-03-18astro-lazy-youtube-embed v0.4.0
    Embed YouTube videos with a static placeholder which only embeds when you click
    v0.4.0 release notes

    Added

    • Added a thumbnail prop, enabling use of the alternate screenshot thumbnails YouTube provides
    • Added a cookie flag prop to opt-in to using www.youtube.com/embed instead of www.youtube-nocookie.com/embed
    • Added JSDoc to props to improve editor DX

    Changed

    • The embed now uses www.youtube-nocookie.com/embed by default
    • The static embed thumbnail <img> now uses loading="lazy" by default
    • The static embed now uses a black background, so there isn't a flash of gradient when the thumbnail <img> lazy-loads
    • The static embed now uses i.ytimg.com instead of img.youtube.com for the thumbnail <img>, as per the YouTube site and its API
    • The modestbranding embed parameter was deprecated by YouTube on August 15, 2023 and now has no effect - removed it from the embedParams defaults and marked it as deprecated
    • The thumbnailRes prop now also supports passing the mq/hq/sd abbreviations YouTube uses

    Fixed

    • Fixed overriding defaulted <iframe> attributes - Astro doesn't merge attributes on HTML elements, so user-supplied attributes need to come first
  • 2024-03-07control-panel-for-youtube v1.1.0
    Browser extension which gives you more control over YouTube by adding missing options and UI improvements - for desktop & mobile browsers
    v1.1.0 release notes
    • Fixed Firefox permission issues (the extension was disabled by default after install on all platforms, it had to be manually enabled every time in Firefox for Android, and the Permissions page was completely blank in Firefox for Android so permissions couldn't be granted) by using Manifest Version 2 instead for the Firefox version
    • Improved the Japanese translation (thanks @Catastravia)
    • Fixed disconnectObservers() only disconnecting page observers

    hideShareThanksClip:

    • Added a new option to hide the Share/Thanks/Clip buttons under a video (not enabled by default)

    hideChannels:

    • You can now hide a channel while watching one of its videos - a "Hide channel" item is added to the video's ⋯ menu
    • This becomes an "Unhide channel" menu item if the channel is already hidden

    hideOpenApp:

    • Fixed hiding "Open App" links when using YouTube in Japanese

    hideSponsored:

    • Fixed related videos being hidden in the mobile version at tablet sizes when they contained an ad

    Available in the following extension stores:

    Mac App Store Chrome Web Store Mozilla Add-ons Edge Add-ons

  • 2023-10-19comments-owl-for-hacker-news v2.2.0
    Browser extension which makes it easer to follow comment threads on Hacker News across multiple visits, allows you to annotate and mute users, and other UI tweaks and mobile UX improvements
    v2.2.0 release notes
    • Added an option to disable or require confirmation for hiding on list pages
    • Added an option to increase the contrast of submission text (enabled by default)

    Available in the following extension stores:

    Apple App Store Firefox Chrome

  • 2021-11-24rllmuk-ignore-topics v1.2
    Hide topics and forums you're not interested in on the Rllmuk forum
    v1.2 release notes
    • Added support for the Fluid view
    • Added a collapse control for the Fluid sidebar

control-panel-for-youtube's People

Contributors

insin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

control-panel-for-youtube's Issues

Extend support for mobileGridView to landscape orientation

The default styling for Search and Subscriptions is the landscape list view - YouTube uses a @media (orientation: portrait) query to override this with the version you see in portrait mode, which is what mobileGridView builds on to turn it into a grid view.

In order to allow use of the grid view in landscape orientation, we need to override the default styling to undo the list view, but this is extremely specific and likely to be brittle.

Some WIP:

/*
 * Undo default styling to make Subcription items display as list items in landscape
 * Very flaky, needs to be media queried
 */
 ytm-media-item {
  margin: 0 !important;
  padding: 0 12px !important;
  display: block !important;
}
.media-item-thumbnail-container {
  padding: 0 12px !important;
}
.video-thumbnail-container-large {
  margin: 0 -12px !important;
  width: auto !important;
  height: auto !important;
  padding-bottom: 56.25% !important;
  border-radius: 0 !important;
}
lazy-list ytm-media-item .details {
  margin: 4px 0 0 0 !important;
  flex-direction: row !important;
}
lazy-list ytm-media-item .media-channel {
  display: block !important;
  order: unset !important;
  margin-top: 8px !important;
  flex-grow: 0 !important;
  width: auto !important;
}
.media-item-info {
  flex-grow: 1 !important;
  margin-left: 12px !important;
}
lazy-list ytm-media-item .media-item-metadata {
  margin-top: 8px !important;
}

Instead of trying to undo this manually, we could try to find the appropriate @media (orientation: portrait) rules in YouTube's stylesheets at runtime and add copies of them without the query or with a landscape query instead.

Investigation: queues - random videos being added to the end?

While paying attention to people's gripes with YouTube on Hacker News and r/youtube, I noticed multiple people complaining that when they use the queues feature, they're getting random videos added to the end of their queue when Auto-play is on.

They didn't say if they were using the web version or the app - is there anything we need to do here?

Create a feature showcase video

Since we have 🦀 Real Time Config Change 🦀, let's use it to show off the features in version 1.

Turn of all Control Panel for YouTube features then walk through YouTube section by section, turning features on as we go, then toggling everything off and on again at the end of each section to show what a difference it makes (which is much harder to get across in a screenshot)

Hide Playlists in search results

An easy way to find some of these for testing - do a search which mostly returns one channel and hide that channel, e.g. destiny 2 jez and hide @Th3Jez

Improved japanese translation

I'm sorry if this is the wrong place. (I'm newbie)

My suggestion includes two modifications.
• Correcting the spelling discrepancies, e.g., オートプレイ to 自動再生.
• Correcting unnatural expressions to natural, e.g., ギャップ to 隙間.

messages.json

Always use the mini sidebar on desktop

If you only ever use the Home/Subsriptions/You nav items on desktop (and you're hiding the rest of it with tidyGuideSidebar), the large sidebar is a waste of space

Pseudocode I was playing about with:

if ytd-mini-guide-renderer[mini-guide-visible] and tp-yt-app-drawer[opened]
    #guide-button.click()

Extend support for fillGaps to mobileGridView

When using the mobile grid view, gaps are created across sections by videos being hidden

An easy way to create gaps for testing - do a search which mostly returns one channel and hide that channel, e.g. destiny 2 jez and hide @Th3Jez

Counteracting reaction faces and other clickbait in video thumbnails

Replace the default thumbnail with one of the other thumbnails available for each video.

Globally, or only in specific sections where you're seeing algorithmic/random content?

Definitely in Home, especially if you're logged out.

For specific channels - activated via a menu item on videos - e.g. you might subscribe to someone because you enjoy their videos, but they do the reaction face thing because of the algorithm

Disable Auto-play in playlists

When watching a video in a playlist, YouTube hides the Auto-play control in the player, and doesn't respect it if you had turned it off

On desktop, we can force playlist Auto-play off like so:

// Disable Autoplay in playlists
let $playlistManager = document.querySelector('yt-playlist-manager')
Object.defineProperty($playlistManager, 'canAutoAdvance_', {
  get() { return !config.disablePlaylistAutoplay },
  set() {},
  enumerable: true,
  configurable: true,
})

We can either un-hide the Auto-play control in the video toolbar and use its state in the code above, or add our own control to the playlist UI next to the existing repeat and shuffle controls it have.

I haven't found a similar way to control playlist Auto-play on mobile yet, so we might need to do it the hard way.

Note

This requires access to DOM expandos, so we'd need to inject content.js as a <script> instead

Hide "continue watching" pop-up in YouTube Premium

There is a pop-up in the bottom right corner asking you to continue watching the video you previously left off. As far as I know, this is a YouTube Premium feature that you apparently cannot disable. It would be perfect if this element can be hidden.

Add “Hide pause overlay” for non-embedded videos

I love the idea of hiding the pause overlay (specifically the seek bar, player controls, etc.) on videos, so that they behave the same as when the video is playing. Currently only embedded videos are supported. Would be great if this available for regular videos.

EDIT: Just to clarify something: Ideally, the player controls would only be hidden when the video is paused, and not when the video is stopped/hasn’t been started yet. Some “hide controls on pause” add-ons do that, and I’ve had to disable them for that reason.

hideChannels: add /watch page functionality

From a feature request thread on Twitter: https://twitter.com/Narull/status/1762343885790224709

  • Allow a channel to be hidden from one of its videos - add a "Hide channel" menu item to the video's ᠁ menu

  • If the user ends up on the /watch page for a video from a channel they hid (e.g. from their watch history, or an external search result, or if they have Auto-play enabled and it sent them there…), automatically pause the video and display some kind of overlay which needs to be clicked/tapped to remove the overlay and resume playing

    Un-hiding a channel while the overlay is displayed should also remove the overlay

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.