Remove Facebook Play Next Popup

Removes the annoying UP NEXT popup from Facebook videos and cancels the next video play automatically.

目前为 2018-06-25 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Remove Facebook Play Next Popup
  3. // @description Removes the annoying UP NEXT popup from Facebook videos and cancels the next video play automatically.
  4. // @version 0.1
  5. // @author Ariel Jannai
  6. // @namespace https://github.com/arieljannai/tampermonkey-scripts
  7. // @supportURL https://github.com/arieljannai/tampermonkey-scripts/issues
  8. // @match https://www.facebook.com/*/videos/*
  9. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. 'use strict';
  15.  
  16. (function waitForUpNextToDisaply() {
  17. var selector = $("div:contains('UP NEXT')").eq(-8)
  18. if(selector.length === 1) {
  19. // remove the popup and cancel the play next
  20. selector.remove();
  21. console.log('popup removed!');
  22. return;
  23. }
  24. else {
  25. setTimeout(function() {
  26. waitForUpNextToDisaply();
  27. }, 500);
  28. }
  29. })();