Skip to content

Commit

Permalink
fix: #528
Browse files Browse the repository at this point in the history
  • Loading branch information
xifangczy committed Oct 22, 2024
1 parent e564a8b commit 8043a55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/m3u8.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ $("#m3u8DL").click(function () {
const m3u8dlArg = getM3u8DlArg();
$m3u8dlArg.val(m3u8dlArg);
navigator.clipboard.writeText(m3u8dlArg);
const m3u8dl = 'm3u8dl://' + (G.m3u8dl == 1 ? Base64.encode(m3u8dlArg) : m3u8dlArg);
const m3u8dl = 'm3u8dl:' + (G.m3u8dl == 1 ? Base64.encode(m3u8dlArg) : m3u8dlArg);
if (m3u8dl.length >= 2046) {
alert(i18n.M3U8DLparameterLong);
}
Expand Down
2 changes: 1 addition & 1 deletion js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function testTag() {
title: $("#title").val(),
}
const result = templates($("#testTextarea").val() ?? "", data);
const m3u8dl = 'm3u8dl://' + Base64.encode(result);
const m3u8dl = 'm3u8dl:' + Base64.encode(result);
$("#tagTestResult").html(`${result}<br><br><a href="${m3u8dl}" class="test_url">${m3u8dl}</a>`);
}
$("#showTestTag").bind("click", function () {
Expand Down
4 changes: 2 additions & 2 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function AddMedia(data, currentTab = true) {
if (G.m3u8dl && (isM3U8(data) || isMPD(data))) {
if (!data.url.startsWith("blob:")) {
const m3u8dlArg = templates(G.m3u8dlArg, data);
const url = 'm3u8dl://' + (G.m3u8dl == 1 ? Base64.encode(m3u8dlArg) : m3u8dlArg);
const url = 'm3u8dl:' + (G.m3u8dl == 1 ? Base64.encode(m3u8dlArg) : m3u8dlArg);
if (url.length >= 2046) {
navigator.clipboard.writeText(m3u8dlArg);
Tips(i18n.M3U8DLparameterLong, 2000);
Expand Down Expand Up @@ -407,7 +407,7 @@ $('#DownFile').click(function () {
for (let data of checkedData) {
if (G.m3u8dl && (data.parsing == "m3u8" || data.parsing == "mpd") && !data.url.startsWith("blob:")) {
const m3u8dlArg = templates(G.m3u8dlArg, data);
const url = 'm3u8dl://' + (G.m3u8dl == 1 ? Base64.encode(m3u8dlArg) : m3u8dlArg);
const url = 'm3u8dl:' + (G.m3u8dl == 1 ? Base64.encode(m3u8dlArg) : m3u8dlArg);
chrome.tabs.create({ url: url });
continue;
}
Expand Down

0 comments on commit 8043a55

Please sign in to comment.