Skip to content

Commit 6ea98fa

Browse files
committed
Download naming + timer issue fix
1 parent 377be5d commit 6ea98fa

File tree

8 files changed

+19
-12
lines changed

8 files changed

+19
-12
lines changed

build/background.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/download.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"description":"__MSG_extDesc__","version":"3.1.12","manifest_version":3,"name":"__MSG_extName__","default_locale":"en","background":{"service_worker":"background.bundle.js"},"action":{"default_icon":"assets/img/icon-34.png"},"icons":{"128":"assets/img/icon-128.png"},"host_permissions":["<all_urls>"],"content_scripts":[{"matches":["<all_urls>"],"js":["contentScript.bundle.js"],"css":["assets/fonts/fonts.css"]}],"web_accessible_resources":[{"resources":["content.styles.css","blank.mp4","playground.html","editor.html","assets/*","setup.html","worker.js","vendor/*","recorder.html","recorderoffscreen.html","sandbox.html","wrapper.html","camera.html","permissions.html","region.html","waveform.html","playground.html","editorfallback.html","download.html","*"],"matches":["<all_urls>"]}],"oauth2":{"client_id":"560517327251-m7n1k3kddknu7s9s4ejvrs1bj91gutd7.apps.googleusercontent.com","scopes":["https://www.googleapis.com/auth/drive.file"]},"cross_origin_embedder_policy":{"value":"require-corp"},"cross_origin_opener_policy":{"value":"same-origin"},"content_security_policy":{"sandbox":"sandbox allow-scripts allow-modals allow-popups; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; object-src 'self';worker-src 'self' blob: ;","extension_pages":"script-src 'self' 'wasm-unsafe-eval'; object-src 'self'; media-src 'self' data: blob: *;"},"sandbox":{"pages":["editor.html"]},"commands":{"start-recording":{"suggested_key":{"default":"Alt+Shift+G"},"description":"Start recording"},"cancel-recording":{"suggested_key":{"default":"Alt+Shift+X"},"description":"Cancel recording"},"pause-recording":{"suggested_key":{"default":"Alt+Shift+M"},"description":"Pause/Resume recording"}},"permissions":["identity","activeTab","storage","unlimitedStorage","downloads","tabs","tabCapture","scripting"],"optional_permissions":["offscreen","desktopCapture","alarms"]}
1+
{"description":"__MSG_extDesc__","version":"3.1.13","manifest_version":3,"name":"__MSG_extName__","default_locale":"en","background":{"service_worker":"background.bundle.js"},"action":{"default_icon":"assets/img/icon-34.png"},"icons":{"128":"assets/img/icon-128.png"},"host_permissions":["<all_urls>"],"content_scripts":[{"matches":["<all_urls>"],"js":["contentScript.bundle.js"],"css":["assets/fonts/fonts.css"]}],"web_accessible_resources":[{"resources":["content.styles.css","blank.mp4","playground.html","editor.html","assets/*","setup.html","worker.js","vendor/*","recorder.html","recorderoffscreen.html","sandbox.html","wrapper.html","camera.html","permissions.html","region.html","waveform.html","playground.html","editorfallback.html","download.html","*"],"matches":["<all_urls>"]}],"oauth2":{"client_id":"560517327251-m7n1k3kddknu7s9s4ejvrs1bj91gutd7.apps.googleusercontent.com","scopes":["https://www.googleapis.com/auth/drive.file"]},"cross_origin_embedder_policy":{"value":"require-corp"},"cross_origin_opener_policy":{"value":"same-origin"},"content_security_policy":{"sandbox":"sandbox allow-scripts allow-modals allow-popups; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; object-src 'self';worker-src 'self' blob: ;","extension_pages":"script-src 'self' 'wasm-unsafe-eval'; object-src 'self'; media-src 'self' data: blob: *;"},"sandbox":{"pages":["editor.html"]},"commands":{"start-recording":{"suggested_key":{"default":"Alt+Shift+G"},"description":"Start recording"},"cancel-recording":{"suggested_key":{"default":"Alt+Shift+X"},"description":"Cancel recording"},"pause-recording":{"suggested_key":{"default":"Alt+Shift+M"},"description":"Pause/Resume recording"}},"permissions":["identity","activeTab","storage","unlimitedStorage","downloads","tabs","tabCapture","scripting"],"optional_permissions":["offscreen","desktopCapture","alarms"]}

build/sandbox.bundle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "__MSG_extName__",
44
"description": "__MSG_extDesc__",
55
"default_locale": "en",
6-
"version": "3.1.12",
6+
"version": "3.1.13",
77
"background": {
88
"service_worker": "background.bundle.js"
99
},

src/pages/Background/index.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,18 @@ const handleAlarm = async (alarm) => {
179179
const { recording } = await chrome.storage.local.get(["recording"]);
180180
if (recording) {
181181
stopRecording();
182-
const { recordingTab } = await chrome.storage.local.get(["recordingTab"]);
183-
sendMessageTab(recordingTab, { type: "stop-recording-tab" });
182+
184183
const { activeTab } = await chrome.storage.local.get(["activeTab"]);
185-
sendMessageTab(activeTab, { type: "stop-recording-tab" });
186-
const currentTab = await getCurrentTab();
187-
sendMessageTab(currentTab.id, { type: "stop-recording-tab" });
184+
185+
// Check if actual tab
186+
chrome.tabs.get(activeTab, (t) => {
187+
if (t) {
188+
sendMessageTab(activeTab, { type: "stop-recording-tab" });
189+
} else {
190+
sendMessageTab(tab.id, { type: "stop-recording-tab" });
191+
chrome.storage.local.set({ activeTab: tab.id });
192+
}
193+
});
188194
}
189195
chrome.alarms.clear("recording-alarm");
190196
}

src/pages/Download/Download.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ const Download = () => {
4141
if (message.type === "download-video") {
4242
const base64 = message.base64;
4343
const blob = base64ToUint8Array(base64);
44-
const title = message.title;
44+
const title = message.title.replace(/[\/\\:?~<>|*"]/g, "_");
4545
const url = URL.createObjectURL(blob);
46+
4647
chrome.downloads
4748
.download({
4849
url: url,

src/pages/Sandbox/context/ContentState.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ const ContentState = (props) => {
809809
// The title must not have these characters " : ? ~ < > * |
810810
// Replace them with a space
811811
const title =
812-
contentStateRef.current.title.replace(/[:?~<>|*]/g, " ") + ext;
812+
contentStateRef.current.title.replace(/[\/\\:?~<>|*]/g, " ") + ext;
813813

814814
// Check if user is on Brave browser
815815
if ((navigator.brave && (await navigator.brave.isBrave())) || false) {

0 commit comments

Comments
 (0)