File tree Expand file tree Collapse file tree 4 files changed +49
-3
lines changed Expand file tree Collapse file tree 4 files changed +49
-3
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ const tabs = [
135
135
} ,
136
136
{
137
137
...CATEGORY . tiktok ,
138
- scripts : [ s . tiktok_downloadVideo ] ,
138
+ scripts : [ s . tiktok_downloadVideo , s . douyin_downloadVideo ] ,
139
139
} ,
140
140
{
141
141
...CATEGORY . github ,
Original file line number Diff line number Diff line change
1
+ export default {
2
+ icon : "https://www.douyin.com/favicon.ico" ,
3
+ name : {
4
+ en : "Douyin - Download videos" ,
5
+ vi : "Douyin - Tải videos" ,
6
+ } ,
7
+ description : {
8
+ en : "Show all downloadable videos in current douyin webpage" ,
9
+ vi : "Hiển thị mọi video có thể tải trong trang douyin hiện tại" ,
10
+ } ,
11
+ blackList : [ ] ,
12
+ whiteList : [ "https://www.douyin.com/*" ] ,
13
+
14
+ func : function ( ) {
15
+ let videos = Array . from ( document . querySelectorAll ( "video" ) ) ;
16
+
17
+ if ( ! videos . length ) {
18
+ alert ( "Không tìm thấy video nào." ) ;
19
+ return ;
20
+ }
21
+
22
+ let html = `
23
+ <div style="display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;right:0;bottom:0;background:#000e;z-index:9999999">
24
+ <div style="margin:auto;background:#eee;position:relative;padding:20px;overflow:auto;max-height:90vh;">
25
+ ${ videos
26
+ . map ( ( video ) => {
27
+ return (
28
+ `<video controls style="max-width:50vw">` +
29
+ video . innerHTML +
30
+ `</video>`
31
+ ) ;
32
+ } )
33
+ . join ( "<br/>" ) }
34
+ <button
35
+ onclick="this.parentElement.parentElement.remove()"
36
+ style="position:absolute;top:0;right:0;background:red;cursor:pointer;padding:5px 10px;color:white">Close</button>
37
+ </div>
38
+ </div>` ;
39
+
40
+ let div = document . createElement ( "div" ) ;
41
+ div . innerHTML = html ;
42
+ document . body . appendChild ( div ) ;
43
+ } ,
44
+ } ;
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ import visualEvent from "./visualEvent.js";
112
112
import fb_videoDownloader from "./fb_videoDownloader.js" ;
113
113
import viewBrowserInfo from "./viewBrowserInfo.js" ;
114
114
import tiktok_downloadVideo from "./tiktok_downloadVideo.js" ;
115
+ import douyin_downloadVideo from "./douyin_downloadVideo.js" ;
115
116
116
117
// inject badges
117
118
const allScripts = {
@@ -233,6 +234,7 @@ const allScripts = {
233
234
fb_videoDownloader : addBadge ( fb_videoDownloader , BADGES . new ) ,
234
235
viewBrowserInfo : addBadge ( viewBrowserInfo , BADGES . new ) ,
235
236
tiktok_downloadVideo : addBadge ( tiktok_downloadVideo , BADGES . new ) ,
237
+ douyin_downloadVideo : addBadge ( douyin_downloadVideo , BADGES . new ) ,
236
238
} ;
237
239
238
240
// inject id to all scripts
Original file line number Diff line number Diff line change 8
8
export default {
9
9
icon : "https://www.tiktok.com/favicon.ico" ,
10
10
name : {
11
- en : "Download tiktok video (Snaptik)" ,
12
- vi : "Tải video tiktok (Snaptik)" ,
11
+ en : "Tiktok - Download video (Snaptik)" ,
12
+ vi : "Tiktok - Tải video (Snaptik)" ,
13
13
} ,
14
14
description : {
15
15
en : "Download tiktok video using Snaptik API" ,
You can’t perform that action at this time.
0 commit comments