Skip to content

Commit

Permalink
bug修复
Browse files Browse the repository at this point in the history
  • Loading branch information
jjj201200 committed Mar 2, 2020
1 parent 2977e80 commit c6c08d8
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 287 deletions.
192 changes: 96 additions & 96 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
{
"name": "bilibili-helper-master",
"version": "1.2.16-beta.1",
"description": "bilibili-helper",
"main": "index.js",
"dependencies": {
"color": "^3.0.0",
"fetch-progress": "^1.2.0",
"ffmpeg.js": "^3.1.9001",
"history": "^4.7.2",
"jquery": "^3.4.0",
"lodash": "^4.17.10",
"md5": "^2.2.1",
"mobx": "^5.0.3",
"mobx-react": "^5.2.3",
"mobx-react-router": "^4.0.4",
"moment": "^2.22.2",
"npm": "^6.6.0",
"ocrad.js": "0.0.1",
"ocradjs-browser.js": "^1.0.2",
"prop-types": "^15.6.2",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-router": "^4.3.1",
"react-transition-group": "^1.2.1",
"react-virtualized": "^9.21.0",
"store": "^2.0.12",
"styled-components": "^4.1.2",
"systemjs": "^2.1.1",
"url-parse": "^1.4.3"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-loader": "^7.1.4",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-import": "^1.6.5",
"babel-plugin-lodash": "^3.3.2",
"babel-plugin-styled-components": "^1.4.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-builtin-classes": "^0.6.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
"babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
"babel-plugin-transform-es3-property-literals": "^6.22.0",
"babel-plugin-transform-function-bind": "^6.22.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"clean-webpack-plugin": "^0.1.19",
"concurrently": "^4.1.0",
"copy-webpack-plugin": "^4.5.1",
"css-loader": "^2.1.0",
"cssnano": "^4.0.3",
"eslint": "^5.9.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-react": "^7.11.1",
"html-webpack-plugin": "^4.0.0-alpha",
"json-loader": "^0.5.7",
"load-grunt-tasks": "^3.5.2",
"merge-jsons-webpack-plugin": "^1.0.18",
"mini-css-extract-plugin": "^0.4.0",
"node-sass": "^4.9.0",
"optimize-css-assets-webpack-plugin": "^5.0.0",
"react-hot-loader": "^4.3.3",
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",
"uglifyjs-webpack-plugin": "^1.2.7",
"webpack": "^4.10.2",
"webpack-bundle-analyzer": "^3.1.0",
"webpack-cli": "^3.0.3",
"webpack-dev-server": "^3.1.4",
"write-json-webpack-plugin": "^1.1.0",
"zip-webpack-plugin": "^3.0.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-beta.49"
},
"scripts": {
"grunt": "grunt",
"watch": "webpack --env.DEBUG=true --config=webpack.config.development.js --watch --progress",
"build": "webpack --production --progress",
"build:test": "webpack --env.DEBUG=true --production --progress"
},
"author": "zacyu & drowsyflesh",
"license": "MIT",
"repository": "https://github.com/zacyu/bilibili-helper",
"readme": "/source/README.md"
"name": "bilibili-helper-master",
"version": "1.2.16-beta.2",
"description": "bilibili-helper",
"main": "index.js",
"dependencies": {
"color": "^3.0.0",
"fetch-progress": "^1.2.0",
"ffmpeg.js": "^3.1.9001",
"history": "^4.7.2",
"jquery": "^3.4.0",
"lodash": "^4.17.10",
"md5": "^2.2.1",
"mobx": "^5.0.3",
"mobx-react": "^5.2.3",
"mobx-react-router": "^4.0.4",
"moment": "^2.22.2",
"npm": "^6.6.0",
"ocrad.js": "0.0.1",
"ocradjs-browser.js": "^1.0.2",
"prop-types": "^15.6.2",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-router": "^4.3.1",
"react-transition-group": "^1.2.1",
"react-virtualized": "^9.21.0",
"store": "^2.0.12",
"styled-components": "^4.1.2",
"systemjs": "^2.1.1",
"url-parse": "^1.4.3"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-loader": "^7.1.4",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-import": "^1.6.5",
"babel-plugin-lodash": "^3.3.2",
"babel-plugin-styled-components": "^1.4.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-builtin-classes": "^0.6.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
"babel-plugin-transform-es3-member-expression-literals": "^6.22.0",
"babel-plugin-transform-es3-property-literals": "^6.22.0",
"babel-plugin-transform-function-bind": "^6.22.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx": "^6.24.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"clean-webpack-plugin": "^0.1.19",
"concurrently": "^4.1.0",
"copy-webpack-plugin": "^4.5.1",
"css-loader": "^2.1.0",
"cssnano": "^4.0.3",
"eslint": "^5.9.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-react": "^7.11.1",
"html-webpack-plugin": "^4.0.0-alpha",
"json-loader": "^0.5.7",
"load-grunt-tasks": "^3.5.2",
"merge-jsons-webpack-plugin": "^1.0.18",
"mini-css-extract-plugin": "^0.4.0",
"node-sass": "^4.9.0",
"optimize-css-assets-webpack-plugin": "^5.0.0",
"react-hot-loader": "^4.3.3",
"sass-loader": "^7.0.3",
"style-loader": "^0.21.0",
"uglifyjs-webpack-plugin": "^1.2.7",
"webpack": "^4.10.2",
"webpack-bundle-analyzer": "^3.1.0",
"webpack-cli": "^3.0.3",
"webpack-dev-server": "^3.1.4",
"write-json-webpack-plugin": "^1.1.0",
"zip-webpack-plugin": "^3.0.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-beta.49"
},
"scripts": {
"grunt": "grunt",
"watch": "webpack --env.DEBUG=true --config=webpack.config.development.js --watch --progress",
"build": "webpack --production --progress",
"build:test": "webpack --env.DEBUG=true --production --progress"
},
"author": "zacyu & drowsyflesh",
"license": "MIT",
"repository": "https://github.com/zacyu/bilibili-helper",
"readme": "/source/README.md"
}
3 changes: 3 additions & 0 deletions src/js/components/configPage/List/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const ListItemView = styled.div.attrs({
border-top: none;
margin-top: 0;
}
.sub-list &:nth-of-type(1) {
border-top: ${props => props.noBorder ? 'none' : '1px solid #f2f3f5'};
}
`;

const TitleView = styled.div.attrs({
Expand Down
2 changes: 1 addition & 1 deletion src/js/modules/videoDownload/UI/videoDownload.js
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ export default () => {
return (
<React.Fragment>
<Title>视频下载 - 切换清晰度</Title>
<Description>合并下载会先下载至内存最后弹出另存为窗口。当卡主时,请下载分段</Description>
<Description>合并下载会先下载至内存最后弹出另存为窗口。当卡住时,请下载分段</Description>
<Container>
{loadedVideo && (loadedVideo.durl || loadedVideo.dash) && this.renderFLV()}
{!videoData[currentCid] ? <LinkGroupTitle>
Expand Down
2 changes: 1 addition & 1 deletion src/js/modules/videoDownload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class VideoDownload extends Feature {
const {filename: originFilename, cid} = filenameObject;
const filename = originFilename.replace(/[|"*?:<>]/g, '_');
const targetData = _.find(responseHeaders, (o) => o.name === 'Content-Disposition');
const nameValue = `attachment; filename="${encodeURIComponent(filename)}.${cid}.flv"; filename*=utf-8' '${encodeURIComponent(filename)}.${cid}.flv`.replace('/', '%2f');
const nameValue = `attachment; filename="${encodeURIComponent(filename)}.${cid}.flv"; filename*="utf-8' '${encodeURIComponent(filename)}.${cid}.flv"`.replace('/', '%2f');
if (targetData) {
targetData.value = nameValue;
} else {
Expand Down
32 changes: 16 additions & 16 deletions src/js/modules/videoSubtitleDownload/UI/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ const UIBuilder = () => {
chrome.runtime.sendMessage({command: 'videoSubtitleDownloadDOMInitialized'});
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.command === 'loadSubtitle' && message.url) {
$.ajax({
fetch(message.url, {
mode: 'cors',
method: 'get',
referrer: window.location.href,
headers: {'From': 'bilibili-helper'},
url: message.url,
success: (res) => {
const regExpRes = /<subtitle>(.+)<\/subtitle>/.exec(res);
if (regExpRes.length > 0) {
const subtitleData = JSON.parse(regExpRes[1]).subtitles;
this.setState({subtitleData});
}
},
error: (e) => {
console.error(e);
if (e.status === 403) {
return;
}
},
});
credentials: "include",
}).then(res => res.text()).then(res => {
const regExpRes = /<subtitle>(.+)<\/subtitle>/.exec(res);
if (regExpRes.length > 0) {
const subtitleData = JSON.parse(regExpRes[1]).subtitles;
this.setState({subtitleData});
}
}).catch((e) => {
console.error(e);
if (e.status === 403) {
return;
}
})
sendResponse(true);
}
});
Expand Down
6 changes: 4 additions & 2 deletions src/js/pages/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ class PageConfig extends React.Component {
);
};

isEdge = () => window.navigator.userAgent.indexOf("Edg") > -1;

render() {
const {
// modal state
Expand Down Expand Up @@ -477,8 +479,8 @@ class PageConfig extends React.Component {
<Footer>
<a href="https://github.com/zacyu/bilibili-helper">Github</a>
<a href="https://bilibili-helper.github.io/">Website</a>
<a href="https://chrome.google.com/webstore/detail/kpbnombpnpcffllnianjibmpadjolanh">Chrome
WebStore</a>
{!this.isEdge() && <a href="https://chrome.google.com/webstore/detail/kpbnombpnpcffllnianjibmpadjolanh">Chrome
WebStore</a>}
<span>
Copyright (c) 2018 <a href="mailto:[email protected]">Zac Yu</a>, Google LLC, <a
href="mailto:[email protected]">Drowsy Flesh</a>
Expand Down
2 changes: 1 addition & 1 deletion src/js/utils/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,5 @@ export const fetchFromHelper = (url, options) => {
});
}

return fetch(urlObject.href, options).catch((e)=> console.error(url, e));
return fetch(decodeURIComponent(urlObject.href), options).catch((e)=> console.error(url, e));
};
Loading

0 comments on commit c6c08d8

Please sign in to comment.