How to determine which YouTube videos I watched?

YouTube violated its functionality in order to be able to delete the videos that I saw and subscribed to them.

Now I want to implement this behavior myself using the GreaseMonkey script.

I still remain without one problem, namely: how to determine if I have already clicked on the video?

  • Is it possible to simply delete all video windows containing the visited link (they are purple)?
    This did not work the previous time when I tried. Perhaps I did something wrong?

  • Do I have to rewrite the a tag so that it invokes my script and uses local storage?

  • Is there an easier way to do this?

+4
source share
1 answer
  • In Firefox (when using the Greasemonkey plugin), it became possible to see which links were visited, as this violates the privacy of the end user. Source

  • localStorage definitely an option.


Update Tom Weisman :

 $(function() { $('div#feed h4 a').each(function(index){ var id = $(this).attr('href').split('v=')[1].split('&')[0]; $(this).click(function () { var id = $(this).attr('href').split('v=')[1].split('&')[0]; localStorage.setItem('YT#' + id, '1'); }); if (localStorage.getItem('YT#' + id) == '1') { $(this).parent().parent().parent().parent().parent().parent().parent().remove(); } }); }); 
+2
source

Source: https://habr.com/ru/post/1384464/


All Articles