Skip to content

Commit

Permalink
v1.15.4 - 播放时自动显示下载按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Sep 28, 2018
1 parent 56c56de commit 1a4437b
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 13 deletions.
12 changes: 11 additions & 1 deletion biliTwin.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @match *://www.bilibili.com/bangumi/play/ep*
// @match *://www.bilibili.com/bangumi/play/ss*
// @match *://www.bilibili.com/watchlater/
// @version 1.15.3
// @version 1.15.4
// @author qli5
// @copyright qli5, 2014+, 田生, grepmusic, zheng qian, ryiwamoto, xmader
// @license Mozilla Public License 2.0; http://www.mozilla.org/MPL/2.0/
Expand Down Expand Up @@ -8824,6 +8824,16 @@ class BiliTwin extends BiliUserJS {
BiliTwin.outdatedEngineClearance();
BiliTwin.firefoxClearance();

const video = document.querySelector("video");
video.addEventListener('play', () => {
let event = new MouseEvent('contextmenu', {
'bubbles': true
});

video.dispatchEvent(event);
video.dispatchEvent(event);
},{once:true});

const twin = new BiliTwin();

while (1) {
Expand Down
29 changes: 20 additions & 9 deletions biliTwinBabelCompiled.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @match *://www.bilibili.com/bangumi/play/ep*
// @match *://www.bilibili.com/bangumi/play/ss*
// @match *://www.bilibili.com/watchlater/
// @version 1.15.3
// @version 1.15.4
// @author qli5
// @copyright qli5, 2014+, 田生, grepmusic, zheng qian, ryiwamoto, xmader
// @license Mozilla Public License 2.0; http://www.mozilla.org/MPL/2.0/
Expand Down Expand Up @@ -158,7 +158,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
// @match *://www.bilibili.com/bangumi/play/ep*
// @match *://www.bilibili.com/bangumi/play/ss*
// @match *://www.bilibili.com/watchlater/
// @version 1.15.3
// @version 1.15.4
// @author qli5
// @copyright qli5, 2014+, 田生, grepmusic, zheng qian, ryiwamoto, xmader
// @license Mozilla Public License 2.0; http://www.mozilla.org/MPL/2.0/
Expand Down Expand Up @@ -8338,7 +8338,7 @@ var BiliTwin = function (_BiliUserJS) {
key: 'init',
value: function () {
var _ref101 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee72() {
var twin;
var video, twin;
return regeneratorRuntime.wrap(function _callee72$(_context73) {
while (1) {
switch (_context73.prev = _context73.next) {
Expand All @@ -8354,22 +8354,33 @@ var BiliTwin = function (_BiliUserJS) {
BiliTwin.outdatedEngineClearance();
BiliTwin.firefoxClearance();

video = document.querySelector("video");

video.addEventListener('play', function () {
var event = new MouseEvent('contextmenu', {
'bubbles': true
});

video.dispatchEvent(event);
video.dispatchEvent(event);
}, { once: true });

twin = new BiliTwin();

case 5:
case 7:
if (!1) {
_context73.next = 10;
_context73.next = 12;
break;
}

_context73.next = 8;
_context73.next = 10;
return twin.runCidSession();

case 8:
_context73.next = 5;
case 10:
_context73.next = 7;
break;

case 10:
case 12:
case 'end':
return _context73.stop();
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bilitwin",
"version": "1.15.3",
"version": "1.15.4",
"description": "bilibili/哔哩哔哩:超清FLV下载,FLV合并,原生MP4下载,弹幕ASS下载,MKV打包,播放体验增强,原生appsecret,不借助其他网站",
"main": "bilitwin.user.js",
"directories": {
Expand Down
10 changes: 10 additions & 0 deletions src/bilitwin.entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,16 @@ class BiliTwin extends BiliUserJS {
BiliTwin.outdatedEngineClearance();
BiliTwin.firefoxClearance();

const video = document.querySelector("video")
video.addEventListener('play', () => {
let event = new MouseEvent('contextmenu', {
'bubbles': true
});

video.dispatchEvent(event)
video.dispatchEvent(event)
},{once:true});

const twin = new BiliTwin();

while (1) {
Expand Down
2 changes: 1 addition & 1 deletion src/bilitwin.meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @match *://www.bilibili.com/bangumi/play/ep*
// @match *://www.bilibili.com/bangumi/play/ss*
// @match *://www.bilibili.com/watchlater/
// @version 1.15.3
// @version 1.15.4
// @author qli5
// @copyright qli5, 2014+, 田生, grepmusic, zheng qian, ryiwamoto, xmader
// @license Mozilla Public License 2.0; http://www.mozilla.org/MPL/2.0/
Expand Down

0 comments on commit 1a4437b

Please sign in to comment.