Greasy Fork is available in English.

Disable Instagram Video Loop

Disable the looping of Instagram videos.

  1. // ==UserScript==
  2. // @name Disable Instagram Video Loop
  3. // @namespace https://greatest.deepsurf.us/en/users/85671-jcunews
  4. // @description Disable the looping of Instagram videos.
  5. // @author jcunews
  6. // @version 1.0.1
  7. // @license GNU AGPLv3
  8. // @match *://www.instagram.com/*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12.  
  13. (function(vael) {
  14. function disableLoop() {
  15. this.loop = false;
  16. }
  17. vael = HTMLVideoElement.prototype.addEventListener;
  18. HTMLVideoElement.prototype.addEventListener = function(typ) {
  19. var res = vael.apply(this, arguments);
  20. if (typ === "play") vael.call(this, typ, disableLoop);
  21. return res;
  22. };
  23. })();