BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup

Join the forum, it's quick and easy

BullyWiiHacks
Welcome dear guest! Very Happy

To start posting and being part of the BWH community, you simply need to register an account or log into an existing one.

If you do not wish to register at all, that's fine but there will be more advertisements. :/

You can probably see and download most content provided for regular members even without an account.

Your contributions will be greatly appreciated though, give it a shot and register today! thumbsup
BullyWiiHacks
Would you like to react to this message? Create an account in a few clicks or log in to continue.
BullyWiiHacks

Gaming, Modding & Programming

Important reminders:

- Click *HERE* for advanced forum search or check out the text field below on the front page for Google before posting
- NO support via private message (use the forum)
- Write meaningful topic titles
Site Translation
Latest topics
» Die Rückkehr zu STEAM und WARFACE
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} EmptyYesterday at 3:54 am by Seth@WiiPlaza

» (Zombies) Drink perks code?
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty2/28/2024, 8:34 am by Bully@WiiPlaza

» First person hand model change?
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty2/28/2024, 4:53 am by Ad3lamac611

» {RELEASE} Field Raider Firefox v1.72 by Seth@WiiPlaza
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty2/21/2024, 8:52 am by naxil

» FREE Language-Learning YouTube Channel, Best Way to Learn Language
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty2/19/2024, 10:40 am by SnB@BWH

» Need help to get command line console code to work
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty2/19/2024, 6:41 am by Bully@WiiPlaza

» Secret CODZ maps in files (verruckt nacht Shi and Der riese)
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty2/19/2024, 6:38 am by Bully@WiiPlaza

» ERROR on the server error no. 20000
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty2/19/2024, 6:33 am by Bully@WiiPlaza

»  YouTube.Auto1337.Firefox-8.1f
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty1/24/2024, 6:57 am by Seth@WiiPlaza

» GCN Action Replay To Gecko CodeType Converter
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Empty1/22/2024, 1:41 pm by SnB@BWH

Search
 
 

Display results as :
 


Rechercher Advanced Search

March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar

Country Statistics
Free counters!

You are not connected. Please login or register

[RELEASE] YouTube-AutoLike-FireFox (v7.3f) {Seth@WiiPIaza}

Go down  Message [Page 1 of 1]

Seth@WiiPlaza

Seth@WiiPlaza
Admin & Coder
Admin & Coder


Code:
//   
//   
//   Build v.7.3f 
//                            Code by Seth@WiiPlaza
//
// script fixes forced pauses on YouTube caused by Ad-Blockers, it also auto-likes every video you watch
//
// Works only on latest versiom Firefox - tested on Version 11 5.6.0esr (64-bit)
//
// inject using the jQuery Firefox injector addon 'run-a-script by mivanchev '   
//      https://github.com/MIvanchev/run-a-script

function clickLikeButton() {
  const likeButtonSelector = '#top-level-buttons-computed > segmented-like-dislike-button-view-model > yt-smartimation > div > div > like-button-view-model > toggle-button-view-model > button';

  function performClick() {
    const likeButton = $(likeButtonSelector);

    if (likeButton.length) {
      likeButton.click();
      console.log('Like button clicked');
    } else {
      console.log('Like button not found');
    }
  }

  function getTitle() {
    const titleElement = $("#title > h1 > yt-formatted-string");
    return titleElement.length ? titleElement.text() : null;
  }

  let currentTitle = getTitle();

  function checkTitleChange() {
    const newTitle = getTitle();

    if (newTitle !== currentTitle) {
      console.log('Video title has changed, re-running the script...');
      performClick();
      currentTitle = newTitle;
    }

    setTimeout(checkTitleChange, 1000);
  }

  setTimeout(performClick, 5000);
  checkTitleChange();
}

function checkAndPlayVideo() {
  var videoElement = $('video');

  if (videoElement.length && videoElement[0].paused) {
    var playButton = $("#movie_player > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > button");

    if (playButton.length) {
      playButton.click();
    }
  }
}

$(document).ready(function () {
  clickLikeButton();
  setInterval(checkAndPlayVideo, 1000);
});


https://github.com/SethWiiPlaza/YouTube-AutoLike-FireFox/releases/tag/Release


_________________
[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Signat10

[RELEASE] YouTube-AutoLike-FireFox (v7.3f)  {Seth@WiiPIaza} Rsz_1r10  

https://github.com/SethWiiPlaza

Bully@WiiPlaza likes this post

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum