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 = [
135135 } ,
136136 {
137137 ...CATEGORY . tiktok ,
138- scripts : [ s . tiktok_downloadVideo ] ,
138+ scripts : [ s . tiktok_downloadVideo , s . douyin_downloadVideo ] ,
139139 } ,
140140 {
141141 ...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";
112112import fb_videoDownloader from "./fb_videoDownloader.js" ;
113113import viewBrowserInfo from "./viewBrowserInfo.js" ;
114114import tiktok_downloadVideo from "./tiktok_downloadVideo.js" ;
115+ import douyin_downloadVideo from "./douyin_downloadVideo.js" ;
115116
116117// inject badges
117118const allScripts = {
@@ -233,6 +234,7 @@ const allScripts = {
233234 fb_videoDownloader : addBadge ( fb_videoDownloader , BADGES . new ) ,
234235 viewBrowserInfo : addBadge ( viewBrowserInfo , BADGES . new ) ,
235236 tiktok_downloadVideo : addBadge ( tiktok_downloadVideo , BADGES . new ) ,
237+ douyin_downloadVideo : addBadge ( douyin_downloadVideo , BADGES . new ) ,
236238} ;
237239
238240// inject id to all scripts
Original file line number Diff line number Diff line change 88export default {
99 icon : "https://www.tiktok.com/favicon.ico" ,
1010 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)" ,
1313 } ,
1414 description : {
1515 en : "Download tiktok video using Snaptik API" ,
You can’t perform that action at this time.
0 commit comments