OpenAI Sora Video Downloader

Adds a context menu item that opens the raw Sora video in a new tab to download or share.

  1. // ==UserScript==
  2. // @name OpenAI Sora Video Downloader
  3. // @description Adds a context menu item that opens the raw Sora video in a new tab to download or share.
  4. // @version 1.0.3
  5. // @author yodaluca23
  6. // @license GNU GPLv3
  7. // @match *://sora.com/*
  8. // @match *://sora.chatgpt.com/*
  9. // @grant GM_registerMenuCommand
  10. // @grant GM_openInTab
  11. // @run-at document-idle
  12. // @namespace https://greasyfork.org/users/1315976
  13. // ==/UserScript==
  14.  
  15. function extractAndOpenVideoURL() {
  16. const targetElement = document.querySelector('.absolute.cursor-default');
  17. if (targetElement) {
  18. const videoElement = targetElement.querySelector('video');
  19. if (videoElement && videoElement.src) {
  20. // Open the video URL in a new tab
  21. GM_openInTab(videoElement.src, {
  22. active: true,
  23. insert: true,
  24. pinned: false
  25. });
  26. }
  27. }
  28. }
  29.  
  30. GM_registerMenuCommand("Download This Sora Video", extractAndOpenVideoURL, "e");