Giter Club home page Giter Club logo

youtube-autoskip's Introduction

YouTube AutoSkip

AutoSkip for YouTube (Browser Extension)

Description

AutoSkip for YouTube is a browser extension designed to enhance YouTube viewing experience by automatically skipping ads. I initially intended to use a script that clicked the "Skip ad" button when it appeared. It turns out that it's available in the HTML code from the start so it is possible to skip without waiting. When it detects an ad but fails to find the skip button, this happens with the unskippable ads, it will mute and speed it up so it is almost unnoticeable. I guess this also counts as watching the full ad.

Supported browsers

  1. Chromium

All Chromium browsers (i.e. Chrome, Edge, Brave, Opera) will work the same way, see the installation below.

  1. Safari

You have to build it from scratch or download the universal binary from here.

If you want to build it, you must have Xcode installed and sign it with your developer certificate or allow unsigned extensions every time you close it. Run the following command:

xcrun safari-web-extension-converter /path/to/YouTube-AutoSkip/src --macos-only --app-name "YouTube AutoSkip"

If everything is correct you should see:

Xcode Project Location: /Users/<username>
App Name: YouTube AutoSkip
App Bundle Identifier: com.yourCompany.YouTube-AutoSkip
Platform: macOS
Language: Swift

After that, Xcode should open automatically. Build the app and copy it to Applications folder. Open Safari, allow unsigned extensions (if not signed), and enable the extension from settings.

Installation

  1. Clone the repository or download the ZIP file.
  2. Extract the files (if you downloaded a ZIP).
  3. Open Google Chrome and navigate to chrome://extensions/.
  4. Enable 'Developer Mode'.
  5. Click on 'Load Unpacked' and select the src folder.
  6. Enjoy ad-free YouTube viewing!

How it Works

The extension uses a content script with a MutationObserver to dynamically observe elements such as the "Skip ad" button, as well as various ad formats like banners. When it detects the "Skip ad" button it automatically triggers it. When the button is not available, with unskippable ads, it will verify that ytp-ad-player-overlay exists, mute the audio and set the playback rate to 16x.

Limitations

  • Unskippable Ads: The extension cannot skip ads that do not have the "Skip Ad" option.
  • YouTube Updates: Changes in YouTube's front-end design or ad mechanisms may affect the extension's functionality.

Disclaimer

This project is created for educational purposes and personal use. The author has no responsibility for any disruptions or violations of YouTube's terms of service. Users should employ this extension at their own risk and discretion.

License

This project is open-source and available under the MIT License.

youtube-autoskip's People

Contributors

notarisj avatar

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.