mirror of
https://github.com/hyzendust/Sharepoint-Downloader.git
synced 2026-06-30 20:32:20 +02:00
Refactor background logic and enhance popup interface for SharePoint Video Downloader
This commit is contained in:
169
popup.html
169
popup.html
@@ -1,73 +1,120 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Video Manifest Capture</title>
|
||||
<link rel="stylesheet" href="popup.css">
|
||||
<!-- Optional: Add Font Awesome for icons (uncomment if using) -->
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> -->
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="title">MTH Video Manifest Capture</h1>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<h2>Manifest Details</h2>
|
||||
<div class="manifest-section">
|
||||
<label>Cleaned URL:</label>
|
||||
<head>
|
||||
<title>SharePoint Video Downloader</title>
|
||||
<link rel="stylesheet" href="popup.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="title">SharePoint Video Downloader</h1>
|
||||
|
||||
<!-- Current Tab URL — best approach for yt-dlp -->
|
||||
<div class="card">
|
||||
<h2>Current Page (Recommended)</h2>
|
||||
<p class="hint">
|
||||
Use the current SharePoint page URL with yt-dlp + browser cookies.
|
||||
This is the easiest method.
|
||||
</p>
|
||||
<div class="text-container">
|
||||
<p id="manifestUrl" class="text">No manifest captured yet.</p>
|
||||
<p id="tabUrl" class="text">Loading…</p>
|
||||
</div>
|
||||
<div class="btn-row">
|
||||
<button id="copyTabYtdlp" class="btn secondary small">
|
||||
Copy yt-dlp Command
|
||||
</button>
|
||||
<button id="copyTabUrl" class="btn toggle small">Copy URL</button>
|
||||
</div>
|
||||
<button id="toggleUrl" class="btn toggle">Expand</button>
|
||||
</div>
|
||||
|
||||
<div class="options-section">
|
||||
<label>Quality:</label>
|
||||
<select id="quality" class="select">
|
||||
<option value="best">Best</option>
|
||||
<option value="1080p">1080p</option>
|
||||
<option value="720p">720p</option>
|
||||
<option value="480p">480p</option>
|
||||
</select>
|
||||
|
||||
<label>Format:</label>
|
||||
<select id="format" class="select">
|
||||
<option value="mp4">MP4</option>
|
||||
<option value="mkv">MKV</option>
|
||||
<option value="ts">TS</option>
|
||||
</select>
|
||||
|
||||
<label>Output Filename:</label>
|
||||
<input id="filename" type="text" class="input" placeholder="video_YYYYMMDD_HHMMSS">
|
||||
<button id="refresh" class="btn primary">
|
||||
<i class="fas fa-refresh"></i> Save Settings
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="manifest-section">
|
||||
<label>FFmpeg Command:</label>
|
||||
<div class="text-container">
|
||||
<p id="ffmpegCommand" class="text">FFmpeg command will appear here.</p>
|
||||
<!-- Options -->
|
||||
<div class="card">
|
||||
<h2>Options</h2>
|
||||
<div class="options-section">
|
||||
<label>Browser:</label>
|
||||
<select id="browser" class="select">
|
||||
<option value="edge">Edge</option>
|
||||
<option value="chrome">Chrome</option>
|
||||
<option value="firefox">Firefox</option>
|
||||
<option value="brave">Brave</option>
|
||||
</select>
|
||||
|
||||
<label>Quality:</label>
|
||||
<select id="quality" class="select">
|
||||
<option value="best">Best</option>
|
||||
<option value="1080p">1080p</option>
|
||||
<option value="720p">720p</option>
|
||||
<option value="480p">480p</option>
|
||||
</select>
|
||||
|
||||
<label>Format:</label>
|
||||
<select id="format" class="select">
|
||||
<option value="mp4">MP4</option>
|
||||
<option value="mkv">MKV</option>
|
||||
<option value="ts">TS</option>
|
||||
</select>
|
||||
|
||||
<label>Filename:</label>
|
||||
<input
|
||||
id="filename"
|
||||
type="text"
|
||||
class="input"
|
||||
placeholder="auto (timestamp)"
|
||||
/>
|
||||
</div>
|
||||
<button id="toggleFffmpeg" class="btn toggle">Expand</button>
|
||||
<button id="copyFffmpegBtn" class="btn secondary small">
|
||||
<i class="fas fa-copy"></i> Copy FFmpeg
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="manifest-section">
|
||||
<label>yt-dlp Command:</label>
|
||||
<div class="text-container">
|
||||
<p id="ytdlpCommand" class="text">yt-dlp command will appear here.</p>
|
||||
<!-- Captured manifests -->
|
||||
<div class="card">
|
||||
<h2>
|
||||
Captured Stream URLs
|
||||
<button
|
||||
id="refresh"
|
||||
class="btn toggle small"
|
||||
style="display: inline; margin-left: 8px; padding: 3px 8px"
|
||||
>
|
||||
Refresh
|
||||
</button>
|
||||
<button
|
||||
id="clearAll"
|
||||
class="btn toggle small"
|
||||
style="display: inline; margin-left: 4px; padding: 3px 8px"
|
||||
>
|
||||
Clear
|
||||
</button>
|
||||
</h2>
|
||||
<div id="manifestList" class="manifest-list">
|
||||
<p class="empty-msg">
|
||||
Play a video on SharePoint to capture stream URLs.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Selected manifest commands -->
|
||||
<div class="card" id="commandsCard" style="display: none">
|
||||
<h2>Download Commands</h2>
|
||||
|
||||
<div class="manifest-section">
|
||||
<label>FFmpeg:</label>
|
||||
<div class="text-container">
|
||||
<p id="ffmpegCommand" class="text">Select a captured URL above.</p>
|
||||
</div>
|
||||
<button id="copyFfmpegBtn" class="btn secondary small">
|
||||
Copy FFmpeg
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="manifest-section">
|
||||
<label>yt-dlp:</label>
|
||||
<div class="text-container">
|
||||
<p id="ytdlpCommand" class="text">Select a captured URL above.</p>
|
||||
</div>
|
||||
<button id="copyYtdlpBtn" class="btn secondary small">
|
||||
Copy yt-dlp
|
||||
</button>
|
||||
</div>
|
||||
<button id="toggleYtdlp" class="btn toggle">Expand</button>
|
||||
<button id="copyYtdlpBtn" class="btn secondary small">
|
||||
<i class="fas fa-copy"></i> Copy yt-dlp
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<script src="popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user