Git Product home page Git Product logo

dae-ne / youtube-browser-extension Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 695 KB

Enhance your YouTube experience with this Chrome extension! Transform your browsing with ad-blocking features, UI improvements, and greater control over Shorts and video playback.

License: GNU General Public License v3.0

JavaScript 9.07% CSS 4.44% HTML 1.51% Shell 0.75% TypeScript 81.09% SCSS 3.13%
chrome-extension youtube-extension browser-extension adblocker chrome extension youtube

youtube-browser-extension's Introduction

Features

  • Shorts To Video Button - adds a button to the shorts page that allows you to watch the short as a standard video.
  • Auto Loop Video - sets the loop property of the video after clicking the shorts to video button.
  • Shorts UI Tweaks - some UI improvements for the shorts page, especially for vertical screens.
  • Auto Skip Ads - automatically skips ads when they appear on a video.
  • Hide Sponsored Shorts - hides sponsored shorts from the shorts page.
  • Hide Masthead Ads - hides the masthead ads on the homepage.
  • Hide In-Feed Ads - hides in-feed ads (except for homepage, because it would break the layout).
  • Hide Player Ads - hides player ads on the watch page.

Options

You can toggle the features on and off on the options page. To access the options page, right-click the extension icon in the browser toolbar and select Options Alternatively, you can left-click the icon to opened the options page, but this method only works if YouTube is currently open in the active tab. Otherwise, the icon will simply open the YouTube homepage.

For now only dark mode is available.

options

How to install?

For now it's Chrome only.

  1. Open the latest release (e.g.: 0.1.0) and download the youtube_extension_<VERSION>.zip, where <VERSION> is the version number (e.g.: youtube_extension_0.1.0.zip).
  2. Unzip the downloaded file to a new directory.
  3. In Chrome, go to the chrome://extensions/ page.
  4. Turn on the developer mode in the top right corner.
  5. Click the Load unpacked button and select the unzipped directory with the extension.
  6. You can add the extension to the browser toolbar by clicking the puzzle icon in the top right corner and then clicking the pin icon next to the extension name.
  7. Right-click the extension icon in the toolbar and select Options to open the options page. Enable or disable the features as you wish.

Local development

  1. Clone the repository to your local machine.
  2. Set git hooks by running the npm run prepare command.
  3. Install the dependencies using the npm install command.
  4. Build the project using the npm run build command.
  5. Open the Chrome browser and go to the chrome://extensions/ page.
  6. Turn on the developer mode in the top right corner.
  7. Click the Load unpacked button and select the dist directory from the cloned repository.

How to add a new feature?

  1. Create a new directory in the features directory with the feature name.
  2. Create a file with the feature class in the new directory. The class should extend the Feature class from the feature.ts file and implement methods.
  3. Create an SCSS file in the new directory if the feature requires custom CSS. It will be picked up automatically on build.
  4. Add new actions to the actions.ts file.
  5. Register the new actions in a constructor of the new feature class (using the constructor of the Feature base class, see other features for a reference).
  6. Add the new feature to exports in the features/index.ts file.
  7. Import the new feature in the youtube-extension.ts and add it to the action handler.
  8. Add sending messages from the background script to the content script in the background.ts file (handleTabUpdate and disableFeatures methods).
  9. If the feature requires some settings, append the Options type (currently in the types.ts), add data to the options/data.json, and handle the new options in the background script. Also update the default-settings.ts. Don't forget to update the JSON schemas for the updated JSON files.
  10. Update the README.md file with the new feature.

License

See the LICENSE file for details.

youtube-browser-extension's People

Contributors

dae-ne avatar

Watchers

Lucian avatar  avatar

youtube-browser-extension's Issues

Fix actions bar (shorts) for mobile and when the comments section is opened

It seems that buttons on the action bar have different margins on the version outside and inside the player area. In one case, margin-top is used, and in the other, margin-bottom.

The scope of this task includes improving the way the action bar's position changes for different screen sizes and with/without the comments section displayed, as well as using the proper margins.

Cases with the action bar inside the player:

  • mobile
  • when the comments section is open
  • screen ratio 12/16 (implemented in this extension)

Acceptance criteria
For the 3 cases above, the action bar is shown correctly with correct margins.

Update the shorts to video button

For now, the "shorts to video" button just works, but it's far from perfect. Check hot the other action buttons work and do something similar.

What should be done:

  • general updates (make the button similar to other action buttons)
  • update how the icon is displayed + color
  • add a toolbar

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.