diff --git a/README.md b/README.md index 6a30cca7..44402ca0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Donate? Muốn hỗ trợ mình 1 ly cafe <3 [Donate here](https://github.com/Ho ## Change logs - Lịch sử cập nhât -Verion hiện tại: v1.2 +Verion hiện tại: v1.1 v1.2 **v1.3** (27/11/2022) [Change logs / Lịch sử cập nhật](/md/CHANGELOGS.md) @@ -27,7 +27,7 @@ Verion hiện tại: v1.2 ## Screenshots - Ảnh chụp màn hình -![screenshot](./assets/screenshots/Screen%20Shot%202022-11-05%20at%2012.10.00.png) +![screenshot](./assets/screenshots/Screen%20Shot%202022-11-27%20at%2022.05.00.png) ## Contribute - Đóng góp diff --git a/_metadata/generated_indexed_rulesets/_ruleset1 b/_metadata/generated_indexed_rulesets/_ruleset1 new file mode 100644 index 00000000..f6d3b65b Binary files /dev/null and b/_metadata/generated_indexed_rulesets/_ruleset1 differ diff --git a/assets/screenshots/Screen Shot 2022-11-27 at 22.05.00.png b/assets/screenshots/Screen Shot 2022-11-27 at 22.05.00.png new file mode 100644 index 00000000..48138d12 Binary files /dev/null and b/assets/screenshots/Screen Shot 2022-11-27 at 22.05.00.png differ diff --git a/backup/content.js b/backup/content.js deleted file mode 100644 index 34d53d29..00000000 --- a/backup/content.js +++ /dev/null @@ -1,8 +0,0 @@ -// function injectFile(filePath) { -// var s = document.createElement("script"); -// s.src = chrome.runtime.getURL(filePath); -// s.onload = function () { -// this.remove(); -// }; -// (document.head || document.documentElement).appendChild(s); -// } diff --git a/empty_script.js b/empty_script.js index e36a1b85..51b23fef 100644 --- a/empty_script.js +++ b/empty_script.js @@ -8,8 +8,15 @@ export default { en: "", vi: "", }, + + // Chọn 1 trong 2 cách, xoá cách không dùng: + + // Cách 1: Mở link web trong tab mới, không cần dùng func + link: "", + + // Cách 2: Chạy script blackList: [], whiteList: [], - + runInExtensionContext: false, func: function () {}, }; diff --git a/manifest.json b/manifest.json index b7f9395f..8472550a 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Useful Scripts", "description": "Scripts that can make your life faster and better", - "version": "1.2", + "version": "1.3", "icons": { "16": "./assets/icon16.png", "32": "./assets/icon32.png", @@ -16,10 +16,64 @@ "permissions": [ "tabs", "scripting", - "storage" + "storage", + "cookies", + "debugger", + "declarativeNetRequest", + "declarativeNetRequestFeedback", + "declarativeNetRequestWithHostAccess" ], "host_permissions": [ "" ], - "options_page": "./pages/options/options.html" + "options_page": "./pages/options/options.html", + "content_scripts": [ + { + "matches": [ + "" + ], + "js": [ + "scripts/content-scripts/document_start.js" + ], + "run_at": "document_start" + }, + { + "matches": [ + "" + ], + "js": [ + "scripts/content-scripts/document_idle.js" + ], + "run_at": "document_idle" + }, + { + "matches": [ + "" + ], + "js": [ + "scripts/content-scripts/document_end.js" + ], + "run_at": "document_end" + } + ], + "web_accessible_resources": [ + { + "resources": [ + "scripts/content-scripts/*.js", + "scripts/content-scripts/*.css" + ], + "matches": [ + "" + ] + } + ], + "declarative_net_request": { + "rule_resources": [ + { + "id": "ruleset_1", + "enabled": true, + "path": "scripts/net-request-rules/rules.json" + } + ] + } } \ No newline at end of file diff --git a/md/CHANGELOGS.md b/md/CHANGELOGS.md index dfe8e46a..d764346a 100644 --- a/md/CHANGELOGS.md +++ b/md/CHANGELOGS.md @@ -1,26 +1,94 @@ ## Change logs +
+ v1.3 - 27/11/2022 + +- 28 scripts mới: + + 1. getLinkLuanxt + 2. getFavicon + 3. download_audio + 4. nhaccuatui_downloader + 5. zingmp3_downloadMusic + 6. zingmp3_oldLayout + 7. download_video2 + 8. download_image + 9. fb_checkToken + 10. fb_getTokenBussinessLocation + 11. fb_getTokenBusinessStudio + 12. fb_getTokenCampaigns + 13. fb_getTokenLocmai + 14. fb_videoDownloader + 15. insta_getUserInfo + 16. instantgram + 17. tiktok_downloadVideo + 18. douyin_downloadVideo + 19. getAllEmailsInWeb + 20. screenshotFullPage + 21. webToPDF + 22. transfer_sh + 23. jsonformatter + 24. shortenURL + 25. unshorten + 26. viewBrowserInfo + 27. injectScriptToWebsite + 28. visualEvent + +- Fix/Update các scripts: + + 1. archiveToday + 2. checkWebDie + 3. darkModePDF + 4. doutube_downloadWatchingVideo + 5. doutube_getAllVideoInUserProfile + 6. fb_downloadAlbumMedia + 7. fb_getAvatarFromUid + 8. fb_getTimelineAlbumId + 9. fb_getTokenMFacebook + 10. fb_getUid + 11. googleCache + 12. openWaybackUrl + 13. search_sharedAccount + 14. shortenURL + 15. showTheImages + 16. textToQRCode + 17. viewCookies + 18. youtube_downloadVideo + +- Fix/Update extension: + - **hot tab**: hiển thị tất cả scripts có badge 'hot' + - **new tab**: hiển thị tất cả scripts badge 'new' + - **open extension in external popup**: Mở extension sang popup window mới, ko bị tắt popup khi chuyển trang + - **content-script**: document_start, document_idle, document_end + - **useful-scripts-utils**: hỗ trợ dev trong quá trình hack web, tạo script mới :)) + - **runInExtensionContext**: script chạy trong extension context sẽ có nhiều quyền hơn, khi fetch không bị lỗi cors, truy cập được các quyền dành riêng cho extension, ... + - **loading UI**: giao diện loading, dành cho các script runInExtensionContext=true + +
+
v1.2 - 08/11/2022 - 9 scripts mới: - 1. archiveToday - 2. cssSelectorViewer - 3. download_video2 - 4. getAllEmailsInWeb - 5. payWallKiller - 6. showHiddenFields - 7. showTheImages - 8. viewWebMetaInfo - 9. whois - 10. youtube nonstop + + 1. archiveToday + 2. cssSelectorViewer + 3. download_video2 + 4. getAllEmailsInWeb + 5. payWallKiller + 6. showHiddenFields + 7. showTheImages + 8. viewWebMetaInfo + 9. whois + 10. youtube nonstop - Fix các scripts: - 1. perfomanceAnalyzer - 2. remove cookies - 3. view cookies - 4. viewPartialSource - 5. youtube_downloadVideo + + 1. perfomanceAnalyzer + 2. remove cookies + 3. view cookies + 4. viewPartialSource + 5. youtube_downloadVideo - Fix extension: - await in lang.js (bug crash on cent browser) diff --git a/md/LIST_SCRIPTS_EN.md b/md/LIST_SCRIPTS_EN.md index 07480b2b..f60362bc 100644 --- a/md/LIST_SCRIPTS_EN.md +++ b/md/LIST_SCRIPTS_EN.md @@ -1,231 +1,275 @@ -### Search +### Search - 1. [What font](/scripts/whatFont.js) + 1. [What font](/scripts/whatFont.js): Check font used in webpage - 2. [Find alternative web](/scripts/similarWeb.js) + 2. [Find alternative web](/scripts/similarWeb.js): SimilarWeb - Access behind-the-scenes analytics for every site online - 3. [Find shared login](/scripts/search_sharedAccount.js) + 3. [Find shared login](/scripts/search_sharedAccount.js): Get free shared account on internet - 4. [View website stack](/scripts/whatWebsiteStack.js) + 4. [View website stack](/scripts/whatWebsiteStack.js): Technology that current website is using - 5. [Who.is](/scripts/whois.js) + 5. [Who.is](/scripts/whois.js): Want to find out who owns a domain? Click on this! - 6. [See web meta info (SEO)](/scripts/viewWebMetaInfo.js) + 6. [See web meta info (SEO)](/scripts/viewWebMetaInfo.js): Instantly shows meta information about the current site in an on-page iFrame. - 7. [Where to find papers/books/pdf/...](/scripts/search_paperWhere.js) + 7. [Where to find papers/books/pdf/...](/scripts/search_paperWhere.js): Learn more and more - 8. [Dowfor - Check web die](/scripts/checkWebDie.js) + 8. [Dowfor - Check web die](/scripts/checkWebDie.js): Check web die using downforeveryoneorjustme - 9. [DownDetector - Check web die](/scripts/downDetector.js) + 9. [DownDetector - View report web crash](/scripts/downDetector.js): View web bug reports - 10. [Open wayback url](/scripts/openWaybackUrl.js) + 10. [Open wayback url](/scripts/openWaybackUrl.js): Open wayback url for website - 11. [Archive the current Page online](/scripts/archiveToday.js) + 11. [Archive the current Page online](/scripts/archiveToday.js): Creates an archive of the current page on archive.today. -### Download +### Download - 12. [Download video 2 - use external website](/scripts/download_video2.js) + 12. [Get audio/video (luanxt)](/scripts/getLinkLuanxt.js): Support zingmp3 nhaccuatui youtube. Using API from luanxt.com - 13. [Download video](/scripts/download_video.js) + 13. [Download favicon from website](/scripts/getFavicon.js): Get favicon link of current website - 14. [Image Downloader](/scripts/download_image.js) +--- Music --- - 15. [Show all images in new frame](/scripts/showTheImages.js) + 14. [Show all audio in website](/scripts/download_audio.js): Will display all audio in website, easy to download/get link. -### Google + 15. [Nhaccuatui music/lyric downloader](/scripts/nhaccuatui_downloader.js): Download the song that be playing in Nhaccuatui - 16. [Check total indexed pages](/scripts/search_totalIndexedPages.js) + 16. [Zingmp3 music dowloader (API)](/scripts/zingmp3_downloadMusic.js): Download music on mp3.zing.vn and zingmp3.vn using zingmp3 API - 17. [Google site search](/scripts/search_googleSite.js) + 17. [Zingmp3 old/new layout](/scripts/zingmp3_oldLayout.js): Toggle UI zingmp3 old/new - 18. [Google shortcuts](/scripts/googleShortcuts.js) +--- Videos --- - 19. [View Google cache of website](/scripts/googleCache.js) + 18. [Download video](/scripts/download_video.js): Can be used on almost any website -### Facebook + 19. [Download video 2 - use external website](/scripts/download_video2.js): Download video from youtube, reddit, twitter, vidmax, liveleak, dailymotion, metacafe, ... + +--- Photos --- + + 20. [Show all images in new frame](/scripts/showTheImages.js): Will even show hidden images as well as pulling them out of a slider/rotator. + + 21. [Image Downloader](/scripts/download_image.js): Download all images in viewport + +### Google + + 22. [Check total indexed pages](/scripts/search_totalIndexedPages.js): Know how many pages of current website is indexed in Google + + 23. [Google site search](/scripts/search_googleSite.js): Search in google while limiting the search result to currently opened webpage. + + 24. [Google shortcuts](/scripts/googleShortcuts.js): Create new google doc/sheet/slide/form/site/keep/calendar + + 25. [View Google cache of website](/scripts/googleCache.js): View blocked website + +### Facebook --- UI --- - 20. [Toggle light fb newfeed](/scripts/fb_toggleLight.js) + 26. [Toggle light fb newfeed](/scripts/fb_toggleLight.js): Hide Navigator bar and complementary bar --- Access Token --- - 21. [Get fb token full permission (ffb.vn)](/scripts/fb_getTokenFfb.js) + 27. [Check fb access token](/scripts/fb_checkToken.js): Check type, permissions, created date, expired date, ... + + 28. [Get fb token from cookie (ffb.vn)](/scripts/fb_getTokenFfb.js): Post your fb cookie to ffb.vn API + + 29. [Get fb token EAAG (business_locations)](/scripts/fb_getTokenBussinessLocation.js): Get fb token EAAG from business.facebook.com - 22. [Get fb Token (business.facebook.com)](/scripts/fb_getTokenBusiness.js) + 30. [Get fb token EAAc (studio)](/scripts/fb_getTokenBusinessStudio.js): Get facebook access token from business.facebook.com - 23. [Get fb Token (www.facebook.com)](/scripts/fb_getTokenFacebook.js) + 31. [Get fb token EAAB (campaigns)](/scripts/fb_getTokenCampaigns.js): Get fb token EAAG from www.facebook.com campaigns - 24. [Get fb Token (m.facebook.com)](/scripts/fb_getTokenMFacebook.js) + 32. [Get fb token EAAB (instagram)](/scripts/fb_getTokenFacebook.js): Get facebook access token from www.facebook.com + + 33. [Get fb Token (m.facebook.com)](/scripts/fb_getTokenMFacebook.js): Get facebook access token from m.facebook.com + + 34. [Get fb token (locmai)](/scripts/fb_getTokenLocmai.js): --- Get ID --- - 25. [Get fb User ID](/scripts/fb_getUid.js) + 35. [Get fb User ID](/scripts/fb_getUid.js): Get id of user in current website + + 36. [Get fb Page ID](/scripts/fb_getPageId.js): Get id of page in current website - 26. [Get fb Page ID](/scripts/fb_getPageId.js) + 37. [Get fb Group ID](/scripts/fb_getGroupId.js): Get id of group in current website - 27. [Get fb Group ID](/scripts/fb_getGroupId.js) + 38. [Get fb Album ID](/scripts/fb_getAlbumId.js): Get id of album in current website - 28. [Get fb Album ID](/scripts/fb_getAlbumId.js) + 39. [Get id of fb timeline album](/scripts/fb_getTimelineAlbumId.js): Get timeline album id of page/user in current website - 29. [Get timeline Album ID of fb page](/scripts/fb_getTimelineAlbumId.js) + 40. [Get all fb Video ID](/scripts/fb_getAllVideoId.js): Get id of all video in current website - 30. [Get all fb Video ID](/scripts/fb_getAllVideoId.js) + 41. [Get all fb Album ID](/scripts/fb_getAllAlbumId.js): Get all id of album in current website - 31. [Get all fb Album ID](/scripts/fb_getAllAlbumId.js) + 42. [Get fb User ID from url](/scripts/fb_getUidFromUrl.js): Get id of user from entered url - 32. [Get fb User ID from url](/scripts/fb_getUidFromUrl.js) + 43. [Get all fb User ID from search page](/scripts/fb_getAllUidFromFbSearch.js): Get id of all user from fb search page - 33. [Get all fb User ID from search page](/scripts/fb_getAllUidFromFbSearch.js) + 44. [Get all fb User ID from Friends page](/scripts/fb_getAllUidFromFriendsPage.js): Get id of all user from friends page - 34. [Get all fb User ID from Friends page](/scripts/fb_getAllUidFromFriendsPage.js) + 45. [Get all fb User ID from group](/scripts/fb_getAllUidOfGroupMembers.js): Get id of all user from group members - 35. [Get all fb User ID from group](/scripts/fb_getAllUidOfGroupMembers.js) +--- Download --- + + 46. [Facebook - Download video/reel/watch](/scripts/fb_videoDownloader.js): Download facebook video/reel/watch + + 47. [Get avatar from fb user id](/scripts/fb_getAvatarFromUid.js): Get avatar from list user ids + + 48. [Download fb album media links](/scripts/fb_downloadAlbumMedia.js): Download photo/video links from album + +### Instagram + + 49. [Get token insta](/scripts/insta_getToken.js): Get instagram access token + + 50. [Get insta user info (uid, avatar, ...)](/scripts/insta_getUserInfo.js): Get uid, avatar, name, ... --- Download --- - 36. [Get avatar from fb user id](/scripts/fb_getAvatarFromUid.js) + 51. [Instantgram - Download full-size image](/scripts/instantgram.js): Download full-size instagram image in 1 click - 37. [Get download link of current fb video](/scripts/fb_downloadCurrentVideo.js) + 52. [Get all media of insta user](/scripts/insta_getAllUserMedia.js): Get all media of instagram user - 38. [Download fb album media links](/scripts/fb_downloadAlbumMedia.js) + 53. [Get all images in insta newfeed](/scripts/insta_getAllImagesInNewFeed.js): Get all images in newfeed -### Instagram + 54. [Get all images in insta user profile](/scripts/insta_getAllImagesInUserProfile.js): Get all images in user profile - 39. [Enable download instagram photos/videos](/scripts/insta_enableDownloadImage.js) +### Youtube - 40. [Get token insta](/scripts/insta_getToken.js) + 55. [Download youtube video (bypass 18+)](/scripts/youtube_downloadVideo.js): Bypass age restriction, without login - 41. [Get your insta User ID](/scripts/insta_getUid.js) + 56. [Picture in Picture](/scripts/pictureInPicture.js): Watch videos in a floating window - 42. [Get all media of insta user](/scripts/insta_getAllUserMedia.js) + 57. [Toggle light youtube](/scripts/youtube_toggleLight.js): Toggle light on/off to focus to youtube video - 43. [Get all images in insta newfeed](/scripts/insta_getAllImagesInNewFeed.js) + 58. [View youtube video dislikes](/scripts/youtube_viewDislikes.js): Know how many dislike does youtube video have - 44. [Get all images in insta user profile](/scripts/insta_getAllImagesInUserProfile.js) + 59. [Youtube nonstop](/scripts/youtube_nonstop.js): Kiss the annoying "Video paused. Continue watching?" confirmation goodbye! -### Youtube + 60. [Youtube popup player](/scripts/youtube_popupPlayer.js): Open current youtube video in new popup player - 45. [Download youtube video (bypass 18+)](/scripts/youtube_downloadVideo.js) +### Tiktok - 46. [Picture in Picture](/scripts/pictureInPicture.js) + 61. [Tiktok - Download video (Snaptik)](/scripts/tiktok_downloadVideo.js): Download tiktok video using Snaptik API - 47. [Toggle light youtube](/scripts/youtube_toggleLight.js) + 62. [Douyin - Download videos](/scripts/douyin_downloadVideo.js): Show all downloadable videos in current douyin webpage - 48. [View youtube video dislikes](/scripts/youtube_viewDislikes.js) +--- Doutu.be --- - 49. [Youtube nonstop](/scripts/youtube_nonstop.js) + 63. [Enable download all video](/scripts/doutube_enableDownloadVideo.js): Enable download button for all video - 50. [Youtube popup player](/scripts/youtube_popupPlayer.js) + 64. [Download video doutu.be](/scripts/doutube_downloadWatchingVideo.js): Download video doutu.be that you are watching -### Github + 65. [Download doutu.be story](/scripts/doutube_downloadWatchingStory.js): Download story that you are watching - 51. [Go to first commit](/scripts/github_goToFirstCommit.js) + 66. [Get all video from user doutu.be profile](/scripts/doutube_getAllVideoInUserProfile.js): Get all video in doutu.be user profile - 52. [Open repo in github.dev](/scripts/githubdev.js) +### Github - 53. [Open repo in github1s.com](/scripts/github1s.js) + 67. [Go to first commit](/scripts/github_goToFirstCommit.js): Go to first commit of github repo -### Doutu.be + 68. [Open repo in github.dev](/scripts/githubdev.js): Open current repo in github.dev - 54. [Enable download all video](/scripts/doutube_enableDownloadVideo.js) + 69. [Open repo in github1s.com](/scripts/github1s.js): Open current repo in github1s.com - 55. [Download video doutu.be](/scripts/doutube_downloadWatchingVideo.js) +### Automation - 56. [Download doutu.be story](/scripts/doutube_downloadWatchingStory.js) + 70. [Text to QR Code](/scripts/textToQRCode.js): Convert text to QR Code - 57. [Get all video from user doutu.be profile](/scripts/doutube_getAllVideoInUserProfile.js) + 71. [URL to QR Code](/scripts/webToQRCode.js): Convert current website URL to QR Code -### PDF + 72. [Extract all Emails from website](/scripts/getAllEmailsInWeb.js): Extracts all emails and displays them in a popup iFrame (enable popups!) - 58. [Darkmode for pdf](/scripts/darkModePDF.js) + 73. [Screenshot full webpage](/scripts/screenshotFullPage.js): Taking a screenshot of an entire webpage - 59. [Web to PDF](/scripts/webToPDF.js) + 74. [Web to PDF](/scripts/webToPDF.js): Convert current website to PDF -### QR Code + 75. [Transfer.sh - Share file faster](/scripts/transfer_sh.js): Upload file and get URL to share - 60. [Text to QR Code](/scripts/textToQRCode.js) + 76. [JSON formatter](/scripts/jsonformatter.js): Open web tool for beautify JSON in new tab - 61. [URL to QR Code](/scripts/webToQRCode.js) + 77. [Performance Analyzer](/scripts/performanceAnalyzer.js): Check performance metrics of website -### Automation + 78. [Scroll to very end](/scripts/scrollToVeryEnd.js): Scoll to end, then wait for load data, then scroll again... Mouse click to cancel - 62. [Extract all Emails from website](/scripts/getAllEmailsInWeb.js) +### Password - 63. [Performance Analyzer](/scripts/performanceAnalyzer.js) + 79. [Password generator](/scripts/passwordGenerator.js): You only have to remember 1 password - 64. [Scroll to very end](/scripts/scrollToVeryEnd.js) + 80. [Find shared login](/scripts/search_sharedAccount.js): Get free shared account on internet -### Password + 81. [Password field toggle](/scripts/passwordFieldToggle.js): Toggle password field to text field to view hidden password - 65. [Password generator](/scripts/passwordGenerator.js) +### Unlock - 66. [Find shared login](/scripts/search_sharedAccount.js) + 82. [Shorten URL](/scripts/shortenURL.js): Support tinyurl, tnyim, cuttly, bitly, j2team, ... - 67. [Password field toggle](/scripts/passwordFieldToggle.js) + 83. [Unshorten link](/scripts/unshorten.js): Get origin URL of shortened url -### Unlock + 84. [View browser information](/scripts/viewBrowserInfo.js): OS name, browser name, version, userAgent, ... - 68. [Show hidden fields](/scripts/showHiddenFields.js) + 85. [Show hidden fields](/scripts/showHiddenFields.js): Reveals hidden fields on a webpage. Find things like tokens, etc - 69. [View cookies](/scripts/viewCookies.js) + 86. [View cookies](/scripts/viewCookies.js): View cookies saved in current website - 70. [Remove cookies](/scripts/removeCookies.js) + 87. [Remove cookies](/scripts/removeCookies.js): Remove cookies from current website - 71. [Re-Enable text selection](/scripts/enableTextSelection.js) + 88. [Re-Enable text selection](/scripts/enableTextSelection.js): Enable text selection for website - 72. [Re-Enable context menu (right click)](/scripts/reEnableContextMenu.js) + 89. [Re-Enable context menu (right click)](/scripts/reEnableContextMenu.js): Enable context menu for website - 73. [Bypass Paywalls](/scripts/paywallKiller.js) + 90. [Inject script to website](/scripts/injectScriptToWebsite.js): -### Web UI + 91. [Bypass Paywalls](/scripts/paywallKiller.js): - 74. [Toggle edit page](/scripts/toggleEditPage.js) +### Web UI - 75. [Scroll by dragging](/scripts/scrollByDrag.js) + 92. [Darkmode for pdf](/scripts/darkModePDF.js): Enable/Disable darkmode for PDF + + 93. [Toggle edit page](/scripts/toggleEditPage.js): Edit all text in website + + 94. [Scroll by dragging](/scripts/scrollByDrag.js): Use this will turn the cursor into a scroller and use it again will return it back to normal. + + 95. [Run Stat.js](/scripts/runStatJs.js): Run stat.js in current website --- View --- - 76. [View all images in web](/scripts/listAllImagesInWeb.js) + 96. [Show all javascript events](/scripts/visualEvent.js): Visual Event - Visually show Javascript events on a page + + 97. [View all images in web](/scripts/listAllImagesInWeb.js): View all images in web - 77. [View all links](/scripts/viewAllLinks.js) + 98. [View all links](/scripts/viewAllLinks.js): Show all links and anchor text of current page. - 78. [View scripts used](/scripts/viewScriptsUsed.js) + 99. [View scripts used](/scripts/viewScriptsUsed.js): View all scripts used in current website - 79. [View stylesheet used](/scripts/viewStylesUsed.js) + 100. [View stylesheet used](/scripts/viewStylesUsed.js): View all stylesheet used in current website - 80. [CSS selector viewer](/scripts/cssSelectorViewer.js) + 101. [CSS selector viewer](/scripts/cssSelectorViewer.js): Inspect css at specific element on the web - 81. [View source code of selected area](/scripts/viewPartialSource.js) + 102. [View source code of selected area](/scripts/viewPartialSource.js): Just select the area and use this bookmarklet --- Remove --- - 82. [Remove all colors in web](/scripts/removeColours.js) + 103. [Remove all colors in web](/scripts/removeColours.js): Remove all colours in the web - 83. [Remove stylesheet](/scripts/removeStylesheet.js) + 104. [Remove stylesheet](/scripts/removeStylesheet.js): Remove all stylesheet from website - 84. [Remove images](/scripts/removeImages.js) + 105. [Remove images](/scripts/removeImages.js): Remove all images from website - 85. [Remove bloat (iframe, embed)](/scripts/removeBloat.js) + 106. [Remove bloat (iframe, embed)](/scripts/removeBloat.js): Remove iframe, embeds, applets from website --- Table --- - 86. [Add sort to table](/scripts/table_addSortTable.js) + 107. [Add sort to table](/scripts/table_addSortTable.js): Add sort functions to table - 87. [Add number columns](/scripts/table_addNumberColumn.js) + 108. [Add number columns](/scripts/table_addNumberColumn.js): Add number columns to table - 88. [Swap rows and columns](/scripts/table_swapRowAndColumn.js) + 109. [Swap rows and columns](/scripts/table_swapRowAndColumn.js): Swap rows and columns (transpose) --- More --- - 89. [Highlight internal/external link](/scripts/internalOrExternalLink.js) - - 90. [Get window size](/scripts/getWindowSize.js) - - 91. [Let it snow](/scripts/letItSnow.js) - -### More + 110. [Highlight internal/external link](/scripts/internalOrExternalLink.js): +Red = Internal_link ++Orange = Currently_opened_link ++Blue = External_link - 92. [Shorten URL (j2team)](/scripts/shortenURL.js) + 111. [Get window size](/scripts/getWindowSize.js): Alerts the width and height in pixels of the inner window. - 93. [Run Stat.js](/scripts/runStatJs.js) + 112. [Let it snow](/scripts/letItSnow.js): Make website like it snowing \ No newline at end of file diff --git a/md/LIST_SCRIPTS_VI.md b/md/LIST_SCRIPTS_VI.md index b9386418..a03a354d 100644 --- a/md/LIST_SCRIPTS_VI.md +++ b/md/LIST_SCRIPTS_VI.md @@ -1,231 +1,275 @@ -### Tìm kiếm +### Tìm kiếm - 1. [Kiểm tra font chữ](/scripts/whatFont.js) + 1. [Kiểm tra font chữ](/scripts/whatFont.js): Kiểm tra xem từng phần tử trong web dùng font chữ gì - 2. [Tìm trang web tương tự](/scripts/similarWeb.js) + 2. [Tìm trang web tương tự](/scripts/similarWeb.js): SimilarWeb - Phân tích chi tiết cho mọi trang web trực tuyến - 3. [Tìm tài khoản miễn phí](/scripts/search_sharedAccount.js) + 3. [Tìm tài khoản miễn phí](/scripts/search_sharedAccount.js): Tìm tài khoản được chia sẻ trên mạng cho trang web hiện tại - 4. [Web dùng công nghệ gì?](/scripts/whatWebsiteStack.js) + 4. [Web dùng công nghệ gì?](/scripts/whatWebsiteStack.js): Xem những công nghệ/thư viện trang web đang dùng - 5. [Who.is](/scripts/whois.js) + 5. [Who.is](/scripts/whois.js): Muốn biết ai đang giữ domain này? Click ngay! - 6. [Xem thông tin meta của web (SEO)](/scripts/viewWebMetaInfo.js) + 6. [Xem thông tin meta của web (SEO)](/scripts/viewWebMetaInfo.js): Xem thông tin meta của website trực tiếp trong trang web - 7. [Tìm bài báo/sách/pdf/...ở đâu?](/scripts/search_paperWhere.js) + 7. [Tìm bài báo/sách/pdf/...ở đâu?](/scripts/search_paperWhere.js): Học, học nữa, học mãi - 8. [Dowfor - Kiểm tra web die](/scripts/checkWebDie.js) + 8. [Dowfor - Kiểm tra web die](/scripts/checkWebDie.js): Dùng bên thứ 3 để kiểm tra xem website có bị die thật không - 9. [DownDetector - Kiểm tra web die](/scripts/downDetector.js) + 9. [DownDetector - Thống kê sự cố web](/scripts/downDetector.js): Xem thống kê các báo cáo về sự cố web - 10. [Xem wayback url của website](/scripts/openWaybackUrl.js) + 10. [Xem wayback url của website](/scripts/openWaybackUrl.js): Giúp xem nội dung website trong quá khứ - 11. [Lưu trữ online trang hiện tại](/scripts/archiveToday.js) + 11. [Lưu trữ online trang hiện tại](/scripts/archiveToday.js): Lưu trang web hiện tại lên archive.today -### Tải xuống +### Tải xuống - 12. [Tải video 2 - dùng web ngoài](/scripts/download_video2.js) + 12. [Tải nhạc/video (luanxt)](/scripts/getLinkLuanxt.js): Hỗ trợ zingmp3 nhaccuatui youtube. Sử dụng API của luanxt.com - 13. [Tải video](/scripts/download_video.js) + 13. [Tải favicon của trang web](/scripts/getFavicon.js): Lấy link favicon của trang web - 14. [Image Downloader - Tải hình ảnh](/scripts/download_image.js) +--- Nhạc --- - 15. [Hiển thị mọi hình ảnh trong khung mới](/scripts/showTheImages.js) + 14. [Hiển thị mọi audio trong trang web](/scripts/download_audio.js): Hiển thị tất cả tag audio/âm thanh trong trang web, giúp dễ dàng tải xuống/lấy link. -### Google + 15. [Nhaccuatui tải nhạc/lời](/scripts/nhaccuatui_downloader.js): Tải bài nhạc / lời bài hát đang nghe trên Nhaccuatui - 16. [Xem các pages được google quét](/scripts/search_totalIndexedPages.js) + 16. [Zingmp3 tải nhạc (API)](/scripts/zingmp3_downloadMusic.js): Tải nhạc trên mp3.zing.vn và zingmp3.vn thông qua zingmp3 API - 17. [Tìm kiếm trên trang web này](/scripts/search_googleSite.js) + 17. [Zingmp3 giao diện cũ/mới](/scripts/zingmp3_oldLayout.js): Bật/tắt giao diện zingmp3 mới/cũ - 18. [Google phím tắt](/scripts/googleShortcuts.js) +--- Video --- - 19. [Xem Google cache của trang web](/scripts/googleCache.js) + 18. [Tải video](/scripts/download_video.js): Dùng được cho gần như tất cả trang web -### Facebook + 19. [Tải video 2 - dùng web ngoài](/scripts/download_video2.js): Tải video từ youtube, reddit, twitter, vidmax, liveleak, dailymotion, metacafe, ... + +--- Ảnh --- + + 20. [Hiển thị mọi hình ảnh trong khung mới](/scripts/showTheImages.js): Sẽ thấy đươc ảnh bị ẩn, dễ dàng chuột phải để tải về + + 21. [Image Downloader - Tải hình ảnh](/scripts/download_image.js): Tải tất cả hình ảnh đang thấy trong trang web + +### Google + + 22. [Xem các pages được google quét](/scripts/search_totalIndexedPages.js): Biết có bao nhiêu trang con của website hiện tại đã được quét bởi Google + + 23. [Tìm kiếm trên trang web này](/scripts/search_googleSite.js): Sử dụng google site search + + 24. [Google phím tắt](/scripts/googleShortcuts.js): Tạo mới google doc/sheet/slide/form/site/keep/calendar + + 25. [Xem Google cache của trang web](/scripts/googleCache.js): Phù hơp để xem các trang web bị block + +### Facebook --- Giao diện --- - 20. [Bật/tắt đèn fb newfeed](/scripts/fb_toggleLight.js) + 26. [Bật/tắt đèn fb newfeed](/scripts/fb_toggleLight.js): Ẩn giao diện 2 bên newfeed, giúp tập trung vào newfeed --- Access Token --- - 21. [Lấy token fb đủ quyền (ffb.vn)](/scripts/fb_getTokenFfb.js) + 27. [Kiểm tra fb access token](/scripts/fb_checkToken.js): Kiểm tra loại, quyền, ngày tạo, ngày hết hạn, ... + + 28. [Lấy fb token từ cookie (ffb.vn)](/scripts/fb_getTokenFfb.js): Gửi cookie fb lên API của ffb.vn + + 29. [Lấy fb token EAAG (business_locations)](/scripts/fb_getTokenBussinessLocation.js): Lấy fb token EAAG từ business.facebook.com - 22. [Lấy fb token (business.facebook.com)](/scripts/fb_getTokenBusiness.js) + 30. [Lấy fb token EAAc (studio)](/scripts/fb_getTokenBusinessStudio.js): Lấy facebook access token từ trang business.facebook.com - 23. [Lấy fb Token (www.facebook.com)](/scripts/fb_getTokenFacebook.js) + 31. [Lấy fb token EAAB (campaigns)](/scripts/fb_getTokenCampaigns.js): Lấy fb token EAAG từ www.facebook.com campaigns - 24. [Lấy fb token (m.facebook.com)](/scripts/fb_getTokenMFacebook.js) + 32. [Lấy fb token EAAB (instagram)](/scripts/fb_getTokenFacebook.js): Lấy facebook access token từ trang www.facebook.com + + 33. [Lấy fb token (m.facebook.com)](/scripts/fb_getTokenMFacebook.js): Lấy facebook access token từ trang m.facebook.com + + 34. [Lấy fb token (locmai)](/scripts/fb_getTokenLocmai.js): --- Lấy ID --- - 25. [Lấy fb User ID](/scripts/fb_getUid.js) + 35. [Lấy fb User ID](/scripts/fb_getUid.js): Lấy id của user trong trang web hiện tại + + 36. [Lấy fb Page ID](/scripts/fb_getPageId.js): Lấy id của page trong trang web hiện tại - 26. [Lấy fb Page ID](/scripts/fb_getPageId.js) + 37. [Lấy fb Group ID](/scripts/fb_getGroupId.js): Lấy id của group trong trang web hiện tại - 27. [Lấy fb Group ID](/scripts/fb_getGroupId.js) + 38. [Lấy fb Album ID](/scripts/fb_getAlbumId.js): Lấy id của album trong trang web hiện tại - 28. [Lấy fb Album ID](/scripts/fb_getAlbumId.js) + 39. [Tìm id của album fb chứa mọi ảnh tải lên](/scripts/fb_getTimelineAlbumId.js): Tìm album chứa tất cả ảnh trên dòng thời gian của page/user hiện tại - 29. [Tìm timeline album id của fb page](/scripts/fb_getTimelineAlbumId.js) + 40. [Tìm tất cả fb video id](/scripts/fb_getAllVideoId.js): Tìm tất cả video id trong trang web - 30. [Tìm tất cả fb video id](/scripts/fb_getAllVideoId.js) + 41. [Lấy tất cả fb album id](/scripts/fb_getAllAlbumId.js): Lấy tất cả album id có trong trang web - 31. [Lấy tất cả fb album id](/scripts/fb_getAllAlbumId.js) + 42. [Lấy fb User ID từ URL](/scripts/fb_getUidFromUrl.js): Lấy id của user từ URL truyền vào - 32. [Lấy fb User ID từ URL](/scripts/fb_getUidFromUrl.js) + 43. [Lấy tất cả fb user ID từ trang tìm kiếm](/scripts/fb_getAllUidFromFbSearch.js): Lấy id của tất cả user từ trang tìm kiếm người dùng - 33. [Lấy tất cả fb user ID từ trang tìm kiếm](/scripts/fb_getAllUidFromFbSearch.js) + 44. [Lấy tất cả fb user id từ danh sách bạn bè](/scripts/fb_getAllUidFromFriendsPage.js): Lấy tất cả user ID từ trang danh sách bạn bè - 34. [Lấy tất cả fb user id từ danh sách bạn bè](/scripts/fb_getAllUidFromFriendsPage.js) + 45. [Lấy tất cả fb user ID từ group](/scripts/fb_getAllUidOfGroupMembers.js): Lấy id của tất cả user từ group - 35. [Lấy tất cả fb user ID từ group](/scripts/fb_getAllUidOfGroupMembers.js) +--- Tải xuống --- + + 46. [Facebook - Tải video/reel/watch](/scripts/fb_videoDownloader.js): Tải facebook video/reel/watch + + 47. [Tải avatar từ fb user id](/scripts/fb_getAvatarFromUid.js): Tải danh sách avatar từ danh sách user id + + 48. [Tải link ảnh/video từ album fb](/scripts/fb_downloadAlbumMedia.js): Tải về danh sách link ảnh/video + +### Instagram + + 49. [Lấy token insta](/scripts/insta_getToken.js): Lấy instagram access token + + 50. [Lấy insta thông tin user (uid, avatar, ...)](/scripts/insta_getUserInfo.js): Lấy uid, avatar, tên, ... --- Tải xuống --- - 36. [Tải avatar từ fb user id](/scripts/fb_getAvatarFromUid.js) + 51. [Instantgram - Tải ảnh chất lượng cao](/scripts/instantgram.js): Tải ảnh instagram chất lượng cao bằng 1 click - 37. [Tải video fb đang xem](/scripts/fb_downloadCurrentVideo.js) + 52. [Tải về tất cả media của insta user](/scripts/insta_getAllUserMedia.js): Tải về tất cả ảnh/video của người dùng insta - 38. [Tải link ảnh/video từ album fb](/scripts/fb_downloadAlbumMedia.js) + 53. [Tải về tất cả ảnh insta newfeed](/scripts/insta_getAllImagesInNewFeed.js): Tải về tất cả ảnh đang có trên newfeed -### Instagram + 54. [Tải tất cả ảnh insta user profile](/scripts/insta_getAllImagesInUserProfile.js): Tải tất cả ảnh có trong profile của user bất kỳ - 39. [Cho phép chuột phải tải ảnh/video instagram](/scripts/insta_enableDownloadImage.js) +### Youtube - 40. [Lấy token insta](/scripts/insta_getToken.js) + 55. [Tải video youtube (bypass 18+)](/scripts/youtube_downloadVideo.js): Tải cả video giới hạn độ tuổi, không cần đăng nhập - 41. [Lấy insta user id của bạn](/scripts/insta_getUid.js) + 56. [Picture in Picture](/scripts/pictureInPicture.js): Xem video trong cửa sổ nổi - 42. [Tải về tất cả media của insta user](/scripts/insta_getAllUserMedia.js) + 57. [Tắt/Mở đèn youtube](/scripts/youtube_toggleLight.js): Tắt/Mở đèn để tập trung xem video youtube - 43. [Tải về tất cả ảnh insta newfeed](/scripts/insta_getAllImagesInNewFeed.js) + 58. [Xem lượng dislike video youtube](/scripts/youtube_viewDislikes.js): Biết số lượt dislikes (không thích) video youtube - 44. [Tải tất cả ảnh insta user profile](/scripts/insta_getAllImagesInUserProfile.js) + 59. [Youtube nonstop](/scripts/youtube_nonstop.js): Phát youtube không còn bị làm phiền bởi popup 'Video đã tạm dừng. Bạn có muốn xem tiếp?' của youtube. -### Youtube + 60. [Xem youtube trong popup](/scripts/youtube_popupPlayer.js): Xem video youtube hiện tại trong cửa sổ popup mới - 45. [Tải video youtube (bypass 18+)](/scripts/youtube_downloadVideo.js) +### Tiktok - 46. [Picture in Picture](/scripts/pictureInPicture.js) + 61. [Tiktok - Tải video (Snaptik)](/scripts/tiktok_downloadVideo.js): Tải tiktok video sử dụng Snaptik API - 47. [Tắt/Mở đèn youtube](/scripts/youtube_toggleLight.js) + 62. [Douyin - Tải videos](/scripts/douyin_downloadVideo.js): Hiển thị mọi video có thể tải trong trang douyin hiện tại - 48. [Xem lượng dislike video youtube](/scripts/youtube_viewDislikes.js) +--- Doutu.be --- - 49. [Youtube nonstop](/scripts/youtube_nonstop.js) + 63. [Bật tải mọi video](/scripts/doutube_enableDownloadVideo.js): Bật chức năng download cho mọi video trong trang - 50. [Xem youtube trong popup](/scripts/youtube_popupPlayer.js) + 64. [Tải video doutu.be](/scripts/doutube_downloadWatchingVideo.js): Tải video doutu.be bạn đang xem -### Github + 65. [Tải story doutu.be](/scripts/doutube_downloadWatchingStory.js): Tải story bạn đang xem - 51. [Đi tới commit đầu tiên](/scripts/github_goToFirstCommit.js) + 66. [Tải tất cả video từ doutu.be profile](/scripts/doutube_getAllVideoInUserProfile.js): Tải tất cả video từ profile của user doutu.be bất kỳ - 52. [Mở repo trong github.dev](/scripts/githubdev.js) +### Github - 53. [Mở repo trong github1s.com](/scripts/github1s.js) + 67. [Đi tới commit đầu tiên](/scripts/github_goToFirstCommit.js): Đi tới commit đầu tiên của repo github -### Doutu.be + 68. [Mở repo trong github.dev](/scripts/githubdev.js): Mở repo hiện tại trong trang github.dev để xem code - 54. [Bật tải mọi video](/scripts/doutube_enableDownloadVideo.js) + 69. [Mở repo trong github1s.com](/scripts/github1s.js): Mở repo hiện tại trong trang github1s.com để xem code - 55. [Tải video doutu.be](/scripts/doutube_downloadWatchingVideo.js) +### Tự động hoá - 56. [Tải story doutu.be](/scripts/doutube_downloadWatchingStory.js) + 70. [Chuyển chữ thành QRCode](/scripts/textToQRCode.js): Nhập vào chữ và nhận về QRCode tương ứng - 57. [Tải tất cả video từ doutu.be profile](/scripts/doutube_getAllVideoInUserProfile.js) + 71. [Lấy QRCode cho web hiện tại](/scripts/webToQRCode.js): Chuyển URL của trang web sang QR Code -### PDF + 72. [Trích xuất mọi emails từ trang web](/scripts/getAllEmailsInWeb.js): Trích xuất tất cả emails trong web và hiện trong popup mới - 58. [Chế độ tối cho PDF](/scripts/darkModePDF.js) + 73. [Chụp ảnh toàn bộ web](/scripts/screenshotFullPage.js): Tạo ảnh chụp màn hình toàn bộ website - 59. [In web ra PDF](/scripts/webToPDF.js) + 74. [In web ra PDF](/scripts/webToPDF.js): Chuyển trang web hiện tại thành PDF -### QR Code + 75. [Transfer.sh - Chia sẻ file nhanh](/scripts/transfer_sh.js): Tải file lên và nhận về link để chia sẻ - 60. [Chuyển chữ thành QRCode](/scripts/textToQRCode.js) + 76. [JSON formatter](/scripts/jsonformatter.js): Mở công cụ làm đẹp JSON trong tab mới - 61. [Lấy QRCode cho web hiện tại](/scripts/webToQRCode.js) + 77. [Phân tích hiệu suất](/scripts/performanceAnalyzer.js): Phân tích hiệu suất website không cần biết code -### Tự động hoá + 78. [Cuộn trang xuống cuối cùng](/scripts/scrollToVeryEnd.js): Cuộn tới khi nào không còn data load thêm nữa (trong 5s) thì thôi. Click chuột để huỷ. - 62. [Trích xuất mọi emails từ trang web](/scripts/getAllEmailsInWeb.js) +### Mật khẩu - 63. [Phân tích hiệu suất](/scripts/performanceAnalyzer.js) + 79. [Tạo mật khẩu cho trang web](/scripts/passwordGenerator.js): Bạn chỉ còn cần phải nhớ 1 mật khẩu - 64. [Cuộn trang xuống cuối cùng](/scripts/scrollToVeryEnd.js) + 80. [Tìm tài khoản miễn phí](/scripts/search_sharedAccount.js): Tìm tài khoản được chia sẻ trên mạng cho trang web hiện tại -### Mật khẩu + 81. [Tắt/mở xem mật khẩu bị ẩn](/scripts/passwordFieldToggle.js): Bạn sẽ xem được mật khẩu bị ẩn trong khung đăng nhập - 65. [Tạo mật khẩu cho trang web](/scripts/passwordGenerator.js) +### Mở khoá - 66. [Tìm tài khoản miễn phí](/scripts/search_sharedAccount.js) + 82. [Rút gọn link](/scripts/shortenURL.js): Hỗ trợ tinyurl, tnyim, cuttly, bitly, j2team, ... - 67. [Tắt/mở xem mật khẩu bị ẩn](/scripts/passwordFieldToggle.js) + 83. [Giải mã link rút gọn](/scripts/unshorten.js): Lấy link gốc của link rút gọn -### Mở khoá + 84. [Xem thông tin trình duyệt](/scripts/viewBrowserInfo.js): Hệ điều hành, tên trình duyệt, version, userAgent, ... - 68. [Hiện các thành phần web bị ẩn](/scripts/showHiddenFields.js) + 85. [Hiện các thành phần web bị ẩn](/scripts/showHiddenFields.js): Web thường ẩn mốt số thành phần như token, id, form, ... - 69. [Xem cookies](/scripts/viewCookies.js) + 86. [Xem cookies](/scripts/viewCookies.js): Xem cookies được lưu trong website hiện tại - 70. [Xoá Cookies](/scripts/removeCookies.js) + 87. [Xoá Cookies](/scripts/removeCookies.js): Xoá cookies trang hiện tại - 71. [Bật text selection](/scripts/enableTextSelection.js) + 88. [Bật text selection](/scripts/enableTextSelection.js): Dùng cho web nào không cho phép bôi đen văn bản - 72. [Bật lại menu chuột phải](/scripts/reEnableContextMenu.js) + 89. [Bật lại menu chuột phải](/scripts/reEnableContextMenu.js): Dùng cho web nào không cho phép bật menu chuột phải - 73. [Xem miễn phí trang tin tức trả phí](/scripts/paywallKiller.js) + 90. [Nhúng script vào trang web](/scripts/injectScriptToWebsite.js): -### Giao diện + 91. [Xem miễn phí trang tin tức trả phí](/scripts/paywallKiller.js): - 74. [Bật/tắt chế độ chỉnh sửa website](/scripts/toggleEditPage.js) +### Giao diện - 75. [Cuộn web bằng cách kéo thả](/scripts/scrollByDrag.js) + 92. [Chế độ tối cho PDF](/scripts/darkModePDF.js): Bật/Tắt chế độ tối cho PDF bạn đang xem + + 93. [Bật/tắt chế độ chỉnh sửa website](/scripts/toggleEditPage.js): Cho phép chỉnh sửa mọi văn bản trong website + + 94. [Cuộn web bằng cách kéo thả](/scripts/scrollByDrag.js): Bấm vào sẽ biến con trỏ thành con lăn và bấm lại nó sẽ đưa con trỏ trở lại bình thường + + 95. [Chạy stats.js](/scripts/runStatJs.js): Tính toán FPS website --- Xem --- - 76. [Xem mọi hình ảnh có trong website](/scripts/listAllImagesInWeb.js) + 96. [Xem tất cả tất cả javascript events](/scripts/visualEvent.js): Visual Event - Hiển thị tất cả javascript events xuất hiện trong trang web + + 97. [Xem mọi hình ảnh có trong website](/scripts/listAllImagesInWeb.js): Xem danh sách hình ảnh trong tab mới - 77. [Xem tất cả link](/scripts/viewAllLinks.js) + 98. [Xem tất cả link](/scripts/viewAllLinks.js): Liệt kê tất cả đường link có trong website - 78. [Xem tất cả scripts](/scripts/viewScriptsUsed.js) + 99. [Xem tất cả scripts](/scripts/viewScriptsUsed.js): Mở danh sách scripts đươc dùng bởi trang web trong tab mới - 79. [Xem tất cả stylesheet](/scripts/viewStylesUsed.js) + 100. [Xem tất cả stylesheet](/scripts/viewStylesUsed.js): Mở danh sách css được dùng bởi website trong tab mới - 80. [Trình kiểm tra css cục bộ](/scripts/cssSelectorViewer.js) + 101. [Trình kiểm tra css cục bộ](/scripts/cssSelectorViewer.js): Kiểm tra mã css cho thành phần bất kỳ trong trang web - 81. [Xem mã nguồn của phần bôi đen](/scripts/viewPartialSource.js) + 102. [Xem mã nguồn của phần bôi đen](/scripts/viewPartialSource.js): Mở mã nguồn của phần được bôi đen trong tab mới --- Xoá --- - 82. [Xoá màu website](/scripts/removeColours.js) + 103. [Xoá màu website](/scripts/removeColours.js): Xoá mọi màu có trong website - 83. [Xoá stylesheet](/scripts/removeStylesheet.js) + 104. [Xoá stylesheet](/scripts/removeStylesheet.js): Xem trang web sẽ ra sao khi không có css - 84. [Xoá mọi hình ảnh](/scripts/removeImages.js) + 105. [Xoá mọi hình ảnh](/scripts/removeImages.js): Chỉ để lại văn bản, giúp tập trung hơn - 85. [Xoá mọi iframe/embed](/scripts/removeBloat.js) + 106. [Xoá mọi iframe/embed](/scripts/removeBloat.js): Xoá mọi thứ gây xao nhãng (quảng cáo, web nhúng, ..) --- Bảng --- - 86. [Thêm sắp xếp cho bảng](/scripts/table_addSortTable.js) + 107. [Thêm sắp xếp cho bảng](/scripts/table_addSortTable.js): Thêm nút chức năng sắp xếp cho từng cột trong table - 87. [Thêm cột số thứ tự](/scripts/table_addNumberColumn.js) + 108. [Thêm cột số thứ tự](/scripts/table_addNumberColumn.js): Thêm cột STT vào bên trái bảng - 88. [Đổi chỗ hàng và cột](/scripts/table_swapRowAndColumn.js) + 109. [Đổi chỗ hàng và cột](/scripts/table_swapRowAndColumn.js): Hàng thành cột và cột thành hàng --- Khác --- - 89. [Tô màu cho link](/scripts/internalOrExternalLink.js) - - 90. [Lấy kích thước trang web](/scripts/getWindowSize.js) - - 91. [Hiệu ứng tuyết rơi](/scripts/letItSnow.js) - -### Khác + 110. [Tô màu cho link](/scripts/internalOrExternalLink.js): +Đỏ: cùng domain ++Cam: hiện tại ++Xanh: khác domain - 92. [Rút gọn link (j2team)](/scripts/shortenURL.js) + 111. [Lấy kích thước trang web](/scripts/getWindowSize.js): đơn vị pixels - 93. [Chạy stats.js](/scripts/runStatJs.js) + 112. [Hiệu ứng tuyết rơi](/scripts/letItSnow.js): Thêm hiệu ứng tuyết rơi vào trang web \ No newline at end of file diff --git a/md/exportScriptsToMd.js b/md/exportScriptsToMd.js index c6ae1375..a614cf75 100644 --- a/md/exportScriptsToMd.js +++ b/md/exportScriptsToMd.js @@ -4,9 +4,7 @@ function generateMd(lang = "vi") { let index = 1; let md = tabs .map((tab) => { - let _p = document.createElement("p"); - _p.innerHTML = tab.name[lang]; - let title = _p.innerText; + let title = tab.name[lang]; let scripts = tab.scripts ?.map((script) => { @@ -15,7 +13,7 @@ function generateMd(lang = "vi") { } return `\n ${index++}. [${script.name[lang]}](/scripts/${ script.id - }.js)`; + }.js): ${script.description[lang]}`; }) .join("\n"); diff --git a/pages/viewScriptSource/index.html b/pages/viewScriptSource/index.html index d5d16881..d8dcd31a 100644 --- a/pages/viewScriptSource/index.html +++ b/pages/viewScriptSource/index.html @@ -5,13 +5,12 @@ - Document + viewsource://useful-scripts - + diff --git a/pages/viewScriptSource/libs/highlight_linenum.js b/pages/viewScriptSource/libs/highlight_linenum.js new file mode 100644 index 00000000..a5f9f204 --- /dev/null +++ b/pages/viewScriptSource/libs/highlight_linenum.js @@ -0,0 +1 @@ +!function(r,o){"use strict";var e,i="hljs-ln",l="hljs-ln-line",h="hljs-ln-code",s="hljs-ln-numbers",c="hljs-ln-n",m="data-line-number",a=/\r\n|\r|\n/g;function u(e){for(var n=e.toString(),t=e.anchorNode;"TD"!==t.nodeName;)t=t.parentNode;for(var r=e.focusNode;"TD"!==r.nodeName;)r=r.parentNode;var o=parseInt(t.dataset.lineNumber),a=parseInt(r.dataset.lineNumber);if(o==a)return n;var i,l=t.textContent,s=r.textContent;for(a
{6}',[l,s,c,m,h,o+n.startFrom,0{1}',[i,r])}return e}(e.innerHTML,o)}function v(e){var n=e.className;if(/hljs-/.test(n)){for(var t=g(e.innerHTML),r=0,o="";r{1}\n',[n,0 { - document.querySelector("#copy-btn").onclick = copy; - let sharedData; try { sharedData = JSON.parse(localStorage.viewScriptSource_sharedData); @@ -10,17 +8,19 @@ window.onload = () => { let comment = `// ${name}\n// ${description}\n\n`; let sourceCode = source.replace("function ", "function " + (id || "_")); + document.querySelector("#copy-btn").onclick = () => copy(sourceCode); + document.title = title; document.querySelector("code").innerHTML = comment + sourceCode; hljs.highlightAll(); + hljs.initLineNumbersOnLoad(); } } catch (e) {} // delete localStorage.viewScriptSource_sharedData; }; -function copy() { - var copyText = document.querySelector("code").innerText; - navigator.clipboard.writeText(copyText); +function copy(text) { + navigator.clipboard.writeText(text); alert("Copied"); } diff --git a/popup/helpers/badge.js b/popup/helpers/badge.js index c7a22cfe..c5555da0 100644 --- a/popup/helpers/badge.js +++ b/popup/helpers/badge.js @@ -2,21 +2,25 @@ export const addBadge = (script, ...badges) => ({ ...script, badges: badges }); export const BADGES = { hot: { + id: "hot", text: { en: "hot", vi: "hot" }, color: "#fff", backgroundColor: "#d40", }, beta: { + id: "beta", text: { en: "beta", vi: "beta" }, color: "#000", backgroundColor: "#dd0", }, new: { + id: "new", text: { en: "new", vi: "mới" }, color: "#fff", backgroundColor: "#44d", }, unstable: { + id: "unstable", text: { en: "unstable", vi: "chưa ổn định" }, color: "#fff", backgroundColor: "#a77", diff --git a/popup/helpers/category.js b/popup/helpers/category.js index a7b33817..cccb6729 100644 --- a/popup/helpers/category.js +++ b/popup/helpers/category.js @@ -24,6 +24,22 @@ export const CATEGORY = { vi: ` Có thể dùng`, }, }, + hot: { + id: "hot", + style: { textDecoration: "underline" }, + name: { + en: ` Hot`, + vi: ` Nổi bật`, + }, + }, + new: { + id: "new", + style: { textDecoration: "underline" }, + name: { + en: ` New`, + vi: ` Mới`, + }, + }, search: { id: "search", name: { @@ -66,6 +82,13 @@ export const CATEGORY = { vi: ` Youtube`, }, }, + tiktok: { + id: "tiktok", + name: { + en: ` Tiktok`, + vi: ` Tiktok`, + }, + }, github: { id: "github", name: { @@ -73,21 +96,6 @@ export const CATEGORY = { vi: ` Github`, }, }, - doutube: { id: "doutube", name: { en: "Doutu.be", vi: "Doutu.be" } }, - pdf: { - id: "pdf", - name: { - en: ` PDF`, - vi: ` PDF`, - }, - }, - qrcode: { - id: "qrcode", - name: { - en: ` QR Code`, - vi: ` QR Code`, - }, - }, automation: { id: "automation", name: { @@ -116,13 +124,6 @@ export const CATEGORY = { vi: ` Giao diện`, }, }, - more: { - id: "more", - name: { - en: ` More`, - vi: ` Khác`, - }, - }, recommend: { id: "recommend", style: { textDecoration: "underline" }, diff --git a/popup/helpers/scriptHelpers.js b/popup/helpers/scriptHelpers.js deleted file mode 100644 index 8a7006d7..00000000 --- a/popup/helpers/scriptHelpers.js +++ /dev/null @@ -1,51 +0,0 @@ -import { allScripts } from "../../scripts/index.js"; -import { getCurrentURL } from "./utils.js"; - -export async function getAvailableScripts() { - let url = await getCurrentURL(); - let avai = []; - for (let script of Object.values(allScripts)) { - if (await checkBlackWhiteList(script, url)) { - avai.push(script); - } - } - - return avai; -} - -export const GlobalBlackList = ["edge://*", "chrome://*"]; -export async function checkBlackWhiteList(script, url = null) { - if (!url) { - url = await getCurrentURL(); - } - - let w = script.whiteList, - b = script.blackList, - hasWhiteList = w?.length > 0, - hasBlackList = b?.length > 0, - inWhiteList = w?.findIndex((_) => isUrlMatchPattern(url, _)) >= 0, - inBlackList = b?.findIndex((_) => isUrlMatchPattern(url, _)) >= 0, - inGlobalBlackList = - GlobalBlackList.findIndex((_) => isUrlMatchPattern(url, _)) >= 0; - - let willRun = - !inGlobalBlackList && - ((!hasWhiteList && !hasBlackList) || - (hasWhiteList && inWhiteList) || - (hasBlackList && !inBlackList)); - - return willRun; -} - -export function isUrlMatchPattern(url, pattern) { - let curIndex = 0, - visiblePartsInPattern = pattern.split("*").filter((_) => _ !== ""); - - for (let p of visiblePartsInPattern) { - let index = url.indexOf(p, curIndex); - if (index < 0) return false; - curIndex = index + p.length; - } - - return true; -} diff --git a/popup/helpers/utils.js b/popup/helpers/utils.js index bb8222ad..d8adecd9 100644 --- a/popup/helpers/utils.js +++ b/popup/helpers/utils.js @@ -1,50 +1,5 @@ import { t } from "./lang.js"; -export const getTabId = async () => { - let tabArray = await chrome.tabs.query({ currentWindow: true, active: true }); - return tabArray[0].id; -}; - -export const runScript = async (func, tabId) => { - return chrome.scripting.executeScript({ - target: { tabId: tabId }, - func: func, - world: "MAIN", - }); -}; - -export const runScriptFile = (scriptFile, tabId) => { - return chrome.scripting.executeScript({ - target: { tabId: tabId }, - files: [scriptFile], - world: "MAIN", - }); -}; - -export const runScriptInCurrentTab = async (func) => { - const tabId = await getTabId(); - return await runScript(func, tabId); -}; - -export const runScriptFileInCurrentTab = async (scriptFile) => { - const tabId = await getTabId(); - return await runScriptFile(scriptFile, tabId); -}; - -export const openUrlInNewTab = async (url) => { - return chrome.tabs.create({ url }); -}; - -export const openUrlAndRunScript = async (url, func) => { - let tab = await openUrlInNewTab(url); - return await runScript(func, tab.id); -}; - -export async function getCurrentURL() { - let tabs = await chrome.tabs.query({ active: true, currentWindow: true }); - return tabs[0].url; -} - export function viewScriptSource(script) { localStorage.viewScriptSource_sharedData = JSON.stringify({ name: t(script.name), @@ -59,4 +14,4 @@ export function viewScriptSource(script) { height: 450, width: 700, }); -} +} \ No newline at end of file diff --git a/popup/index.js b/popup/index.js index 20a126ec..a9836240 100644 --- a/popup/index.js +++ b/popup/index.js @@ -1,17 +1,20 @@ -import { allScripts } from "../scripts/index.js"; -import { checkForUpdate } from "./helpers/checkForUpdate.js"; -import { getFlag, t, toggleLang } from "./helpers/lang.js"; -import { viewScriptSource, runScriptInCurrentTab } from "./helpers/utils.js"; import { checkBlackWhiteList, GlobalBlackList, -} from "./helpers/scriptHelpers.js"; + isExtensionInSeperatedPopup, + openExtensionInSeparatedPopup, + runScriptInCurrentTab, +} from "../scripts/helpers/utils.js"; +import { allScripts } from "../scripts/index.js"; +import { checkForUpdate } from "./helpers/checkForUpdate.js"; +import { getFlag, t, toggleLang } from "./helpers/lang.js"; import { openModal } from "./helpers/modal.js"; import { activeTabIdSaver, favoriteScriptsSaver, recentScriptsSaver, } from "./helpers/storage.js"; +import { viewScriptSource } from "./helpers/utils.js"; import { isFunc, isLink, @@ -24,6 +27,7 @@ import { const tabDiv = document.querySelector("div.tab"); const contentDiv = document.querySelector("div.content"); const flagImg = document.querySelector("img#flag"); +const openInNewTabBtn = document.querySelector("#open-in-new-tab"); async function initLanguage() { flagImg.setAttribute("src", await getFlag()); @@ -242,7 +246,8 @@ async function runScript(script) { let willRun = await checkBlackWhiteList(script); if (willRun) { recentScriptsSaver.add(script); - runScriptInCurrentTab(script.func); + if (script.runInExtensionContext) script.func(); + else runScriptInCurrentTab(script.func); } else { let w = script?.whiteList?.join(", "); let b = [...(script?.blackList || []), ...GlobalBlackList]?.join(", "); @@ -264,7 +269,20 @@ async function runScript(script) { } } +function initOpenInNewTabBtn() { + if (isExtensionInSeperatedPopup()) { + document.title = "Useful Scripts"; + openInNewTabBtn.remove(); + } else { + openInNewTabBtn.onclick = () => { + openExtensionInSeparatedPopup(); + window.close(); + }; + } +} + (async function () { + initOpenInNewTabBtn(); await initLanguage(); await createTabs(); await checkForUpdate(); diff --git a/popup/popup.html b/popup/popup.html index fe4b150d..4a49d4a5 100644 --- a/popup/popup.html +++ b/popup/popup.html @@ -31,7 +31,11 @@

- + + +