OpenAI Sora Video Downloader

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name     OpenAI Sora Video Downloader
// @description  Adds a context menu item that opens the raw Sora video in a new tab to download or share.
// @version  1.0.3
// @author       yodaluca23
// @license      GNU GPLv3
// @match        *://sora.com/*
// @match        *://sora.chatgpt.com/*
// @grant    GM_registerMenuCommand
// @grant    GM_openInTab
// @run-at   document-idle
// @namespace https://greasyfork.org/users/1315976
// ==/UserScript==

function extractAndOpenVideoURL() {
    const targetElement = document.querySelector('.absolute.cursor-default');
    if (targetElement) {
      const videoElement = targetElement.querySelector('video');
      if (videoElement && videoElement.src) {
          // Open the video URL in a new tab
          GM_openInTab(videoElement.src, {
              active: true,
              insert: true,
              pinned: false
          });
      }
    }
}

GM_registerMenuCommand("Download This Sora Video", extractAndOpenVideoURL, "e");