OpenAI Sora Video Downloader

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

当前为 2024-12-19 提交的版本,查看 最新版本

  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.2
  5. // @author yodaluca23
  6. // @license GNU GPLv3
  7. // @match *://sora.com/*
  8. // @grant GM_registerMenuCommand
  9. // @grant GM_openInTab
  10. // @run-at document-idle
  11. // @namespace https://greasyfork.org/users/1315976
  12. // ==/UserScript==
  13.  
  14. function extractAndOpenVideoURL() {
  15. const targetElement = document.querySelector('.absolute.cursor-default');
  16. if (targetElement) {
  17. const videoElement = targetElement.querySelector('video');
  18. if (videoElement && videoElement.src) {
  19. // Open the video URL in a new tab
  20. GM_openInTab(videoElement.src, {
  21. active: true,
  22. insert: true,
  23. pinned: false
  24. });
  25. }
  26. }
  27. }
  28.  
  29. GM_registerMenuCommand("Download This Sora Video", extractAndOpenVideoURL, "e");