Commit 180ce408 authored by sebaro's avatar sebaro

Fix extension, video select

parent ddcdeb4d
......@@ -3,6 +3,10 @@
/* SaveTube Changelog */
#2020.02.10
- Script: fixed file extention when title contains dots
- Script: fixed video selection when DASH download is disabled
#2020.02.09
- Script: support for direct download when browser supports it
- Script: group streams by type
......
// ==UserScript==
// @name SaveTube
// @version 2020.02.09
// @version 2020.02.10
// @description Download videos from video sharing web sites.
// @author sebaro
// @namespace http://sebaro.pro/savetube
......@@ -334,6 +334,11 @@ function createMySaver() {
appendMyElement(saver['videoMenu'], saver['videoItem']);
}
}
else {
for (var videoCode in saver['videoList']) {
if (saver['videoList'][videoCode] == 'DASH') delete saver['videoList'][videoCode];
}
}
}
if (videosExtra.length > 0) {
saver['videoItem'] = createMyElement('option', {value: 'Extra', textContent: 'Extra'});
......@@ -399,7 +404,7 @@ function createMySaver() {
'openpagelink': ['Open Page Link', ['On', 'Off'], true, true],
'autosave': ['Autosave', ['On', 'Off'], true, true],
'showsavelink': ['Show Save Link', ['On', 'Off'], false, true],
'savedash': ['Save DASH', ['On', 'Off'], true, false]
'savedash': ['Save DASH (Video With Audio)', ['On', 'Off'], true, false]
};
/* Options */
......@@ -591,7 +596,7 @@ function saveMyVideo() {
if (this.status === 200 && this.response) {
vdoBlob = new Blob([this.response], {type: mediatypes[vdoExt]});
vdoBlobLnk = page.win.URL.createObjectURL(vdoBlob);
modifyMyElement(vdoLnkBlob, {href: vdoBlobLnk, target: '_blank', download: vdoT});
modifyMyElement(vdoLnkBlob, {href: vdoBlobLnk, target: '_blank', download: vdoT + '.' + vdoExt.toLowerCase()});
vdoLnkBlob.click();
page.win.URL.revokeObjectURL(vdoBlobLnk);
removeMyElement(page.body, vdoLnkBlob);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment