@@ -5,7 +5,9 @@ import { addBadge, BADGES } from "./helpers/badge.js";
55import { favoriteScriptsSaver , recentScriptsSaver } from "./helpers/storage.js" ;
66
77const createTitle = ( en , vi ) => ( { name : { en, vi } } ) ;
8- const isTitle = ( script ) => ! script . func && ! script . file && ! script . link ;
8+ const isFunc = ( script ) => script . func && typeof script . func === "function" ;
9+ const isLink = ( script ) => script . link && typeof script . link === "string" ;
10+ const isTitle = ( script ) => ! isFunc ( script ) && ! isLink ( script ) ;
911
1012const specialTabs = [
1113 {
@@ -184,6 +186,7 @@ const tabs = [
184186 ) ,
185187 addBadge (
186188 {
189+ icon : "https://cdn4.iconfinder.com/data/icons/social-messaging-ui-color-shapes-2-free/128/social-facebook-square2-256.png" ,
187190 name : { en : "FB Media Downloader" , vi : "FB Media Downloader" } ,
188191 description : {
189192 en : "Tool download media from facebook automatic" ,
@@ -193,17 +196,6 @@ const tabs = [
193196 } ,
194197 BADGES . hot
195198 ) ,
196- {
197- name : {
198- en : "Relational Database Tools" ,
199- vi : "Giải toán môn PTTK HTTT" ,
200- } ,
201- description : {
202- en : "Solve problems in relational data field" ,
203- vi : "Tính toán các vấn đề trong môn phân tích thiết kế hệ thống thông tin" ,
204- } ,
205- link : "https://github.com/HoangTran0410/PTTK" ,
206- } ,
207199 { name : { en : "--- Extensions ---" , vi : "--- Extensions hay ---" } } ,
208200 {
209201 icon : "https://lh3.googleusercontent.com/2GdtpZt9NWFkfrfLZnWL2gM2UdCOsgpQhhdxSx4wPw5Iz10NcT433g3iHyAAZ8J-ZCyz3gwLKR1kJQC0PidRVKKJ1Ws=w128-h128-e365-rj-sc0x00ffffff" ,
@@ -378,4 +370,4 @@ async function refreshSpecialTabs() {
378370 if ( avaiab ) avaiab . scripts = await getAvailableScriptsInTabs ( tabs ) ;
379371}
380372
381- export { isTitle , refreshSpecialTabs , tabs , specialTabs } ;
373+ export { isTitle , isFunc , isLink , refreshSpecialTabs , tabs , specialTabs } ;
0 commit comments