Skip to content

Commit

Permalink
修复文件下载重命名失效
Browse files Browse the repository at this point in the history
  • Loading branch information
jjj201200 committed Dec 7, 2020
2 parents 2340f4c + dbac6e4 commit 1f5240b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bilibili-helper-master",
"version": "1.2.26-beta.3",
"version": "1.2.27-beta.1",
"description": "bilibili-helper",
"main": "index.js",
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/js/modules/darkMode/UI/VideoBtn.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default () => {
className: `bilibili-helper-video-dark-mode-btn`,
})`
position: absolute;
right: 14px;
right: 64px;
top: 14px;
border-radius: 4px;
button {
Expand Down
6 changes: 3 additions & 3 deletions src/js/modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {PopupAnchor, PopupAnchorUI} from './popupAnchor';
import {Menu, MenuUI} from './menu';
import {ChatFilter, ChatFilterUI} from 'Modules/chatFilter';
import {VideoDownload, VideoDownloadUI} from 'Modules/videoDownload';
//import {PictureInPicture, PictureInPictureUI} from 'Modules/pictureInPicture';
import {PictureInPicture, PictureInPictureUI} from 'Modules/pictureInPicture';
import {VideoWiden, VideoWidenUI} from 'Modules/videoWiden';
import {VideoSubtitleDownload, VideoSubtitleDownloadUI} from 'Modules/videoSubtitleDownload';
import {VersionManager} from 'Modules/versionManager';
Expand Down Expand Up @@ -53,7 +53,7 @@ export const Features = {
ChatFilter,
VideoDownload,
DoSign,
//PictureInPicture,
PictureInPicture,
VideoWiden,
VideoSubtitleDownload,
VersionManager,
Expand Down Expand Up @@ -85,7 +85,7 @@ export const UIs = {
DynamicCheckUI,
ChatFilterUI,
VideoDownloadUI,
//PictureInPictureUI,
PictureInPictureUI,
VideoWidenUI,
VideoSubtitleDownloadUI,
VideoHideDanmuUI,
Expand Down
4 changes: 2 additions & 2 deletions src/js/modules/videoDownload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class VideoDownload extends Feature {
if (filenameObject) {
const {filename: originFilename, cid} = filenameObject;
const filename = originFilename.replace(/[|"*?:<>]/g, '_');
const targetData = _.find(responseHeaders, (o) => o.name === 'Content-Disposition');
const targetData = _.find(responseHeaders, (o) => o.name.toLowerCase() === 'content-disposition');
const nameValue = `attachment; filename="${encodeURIComponent(filename)}.${cid}.flv"; filename*="utf-8' '${encodeURIComponent(filename)}.${cid}.flv"`.replace('/', '%2f');
if (targetData) {
targetData.value = nameValue;
Expand All @@ -155,7 +155,7 @@ export class VideoDownload extends Feature {
}, {
urls: [
'*://*.acgvideo.com/*',
'*://*.bilivideo.com/*'
'*://*.bilivideo.com/*',
],
}, ['responseHeaders', 'blocking']);
};
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.2.26.3",
"version": "1.2.27.1",
"manifest_version": 2,
"minimum_chrome_version": "56.0.0",
"name": "__MSG_extensionName__",
Expand Down

0 comments on commit 1f5240b

Please sign in to comment.