🏠 Home 

Play QuickTime MOV in Plugin (for stand-alone .mov)

For Firefox 45+, replaces the HTML5 video player with a plugin for a .mov file opened stand-alone


Installer dette script?
  1. // ==UserScript==
  2. // @name Play QuickTime MOV in Plugin (for stand-alone .mov)
  3. // @description For Firefox 45+, replaces the HTML5 video player with a plugin for a .mov file opened stand-alone
  4. // @author Jefferson "jscher2000" Scher
  5. // @namespace JeffersonScher
  6. // @copyright Copyright 2016 Jefferson Scher
  7. // @license BSD 3-clause
  8. // @include http*://*/*.mov
  9. // @include http*://*/*.mov?*
  10. // @include http*://*/*.mov#*
  11. // @include file:///*/*.mov
  12. // @version 0.5
  13. // @grant none
  14. // ==/UserScript==
  15. /*
  16. To enable this script for local file:/// URLs you need to use about:config to switch the following
  17. preference from false to true: extensions.greasemonkey.fileIsGreaseable
  18. */
  19. // Check for video/quicktime plugin support
  20. if (!navigator.mimeTypes['video/quicktime']){
  21. window.alert("Sorry, no plugin found to play QuickTime video!");
  22. } else {
  23. // Create object
  24. var obj = document.createElement('object');
  25. obj.setAttribute('type', "video/quicktime");
  26. obj.setAttribute('data', window.location.href);
  27. obj.setAttribute('autoplay', 'true');
  28. obj.setAttribute('style', 'width:90%; height:90%; display:block; margin-left:auto; margin-right:auto;');
  29. // Replace body with object
  30. document.body.innerHTML = '<p style="color:#3dd">Inserting QuickTime player below...</p>';
  31. document.body.appendChild(obj);
  32. }