Skip to content

Commit be7defb

Browse files
committed
fix comments
1 parent d85dd69 commit be7defb

21 files changed

+49
-28
lines changed

pages/viewScriptSource/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ window.onload = () => {
44
let sharedData;
55
try {
66
sharedData = JSON.parse(localStorage.viewScriptSource_sharedData);
7-
const { name, source, description } = sharedData;
7+
const { name, source, description, id } = sharedData;
88
if (name && source) {
99
document.title = "Useful-script / " + name + " / " + description;
1010
document.querySelector("code").innerHTML = source.replace(
11-
"function",
12-
"function _"
11+
"function ",
12+
"function " + (id || "_")
1313
);
1414
hljs.highlightAll();
1515
}

popup/helpers/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export async function getCurrentURL() {
4949
export function viewScriptSource(script) {
5050
localStorage.viewScriptSource_sharedData = JSON.stringify({
5151
name: t(script.name),
52+
id: script.id,
5253
description: t(script.description),
5354
source: script.func?.toString(),
5455
});

popup/tabs.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const tabs = [
3333
s.search_sharedAccount,
3434
s.whatWebsiteStack,
3535
s.search_paperWhere,
36-
s.search_totalIndexedPages,
3736
s.checkWebDie,
3837
s.downDetector,
3938
s.openWaybackUrl,
@@ -45,7 +44,12 @@ const tabs = [
4544
},
4645
{
4746
...CATEGORY.google,
48-
scripts: [s.search_googleSite, s.googleShortcuts, s.googleCache],
47+
scripts: [
48+
s.search_totalIndexedPages,
49+
s.search_googleSite,
50+
s.googleShortcuts,
51+
s.googleCache,
52+
],
4953
},
5054
{
5155
...CATEGORY.facebook,

scripts/download_video.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ export default {
1111
blackList: ["www.youtube.com"],
1212
whiteList: [],
1313

14-
// Source code extracted from https://chrome.google.com/webstore/detail/video-downloader-professi/elicpjhcidhpjomhibiffojpinpmmpil
1514
func: function () {
15+
// Source code extracted from https://chrome.google.com/webstore/detail/video-downloader-professi/elicpjhcidhpjomhibiffojpinpmmpil
16+
1617
function scanPage() {
1718
var url = document.location.href;
1819
allUrlsList = [];

scripts/fb_downloadCurrentVideo.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ export default {
1010
blackList: [],
1111
whiteList: ["www.facebook.com"],
1212

13-
// Tải video đang xem - khi đang trong trang web video, dạng: https://www.facebook.com/watch?v=254222479732213
14-
// Nếu bạn muốn tải HD thì dùng snapsave: https://snapsave.app/vn
1513
func: function () {
14+
// Tải video đang xem - khi đang trong trang web video, dạng: https://www.facebook.com/watch?v=254222479732213
15+
// Nếu bạn muốn tải HD thì dùng snapsave: https://snapsave.app/vn
16+
1617
const found = (check) => {
1718
if (check && check[0]) {
1819
const url = window.location.href.replace(

scripts/fb_getAlbumId.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ export default {
1111
blackList: [],
1212
whiteList: ["www.facebook.com"],
1313

14-
// Lấy album id - khi đang xem 1 album, ví dụ https://www.facebook.com/media/set/?vanity=ColourfulSpace&set=a.945632905514659
1514
func: function () {
15+
// Lấy album id - khi đang xem 1 album, ví dụ https://www.facebook.com/media/set/?vanity=ColourfulSpace&set=a.945632905514659
16+
1617
const list_a = document.querySelectorAll("a");
1718
for (let a of [location, ...Array.from(list_a)]) {
1819
const page_album_id = /(?<=\/photos\/a\.)(.\d+?)(?=\/)/.exec(a.href);

scripts/fb_getAllAlbumId.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ export default {
1010
blackList: [],
1111
whiteList: ["www.facebook.com"],
1212

13-
// Lấy tất cả album id có trong trang web - Khi đang xem 1 danh sách album của user/group/page
1413
func: function () {
14+
// Lấy tất cả album id có trong trang web - Khi đang xem 1 danh sách album của user/group/page
15+
1516
const list_a = document.querySelectorAll("a");
1617
const list_id = [];
1718
for (let a of [location, ...Array.from(list_a)]) {

scripts/fb_getAllUidFromFriendsPage.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ export default {
1010
blackList: [],
1111
whiteList: ["www.facebook.com"],
1212

13-
// Lấy tất cả uid từ trang facebook search bạn bè
14-
// Ví dụ: https://www.facebook.com/search/people/?q=*a&epa=FILTERS&filters=eyJmcmllbmRzIjoie1wibmFtZVwiOlwidXNlcnNfZnJpZW5kc19vZl9wZW9wbGVcIixcImFyZ3NcIjpcIjEwMDA2NDI2NzYzMjI0MlwifSJ9
15-
// Link trên được tạo từ web: https://sowsearch.info/
1613
func: async function () {
14+
// Lấy tất cả uid từ trang facebook search bạn bè
15+
// Ví dụ: https://www.facebook.com/search/people/?q=*a&epa=FILTERS&filters=eyJmcmllbmRzIjoie1wibmFtZVwiOlwidXNlcnNfZnJpZW5kc19vZl9wZW9wbGVcIixcImFyZ3NcIjpcIjEwMDA2NDI2NzYzMjI0MlwifSJ9
16+
// Link trên được tạo từ web: https://sowsearch.info/
17+
1718
const _getUidFromUrl = async (url) => {
1819
var response = await fetch(url);
1920
if (response.status == 200) {

scripts/fb_getAllUidOfGroupMembers.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ export default {
1010
blackList: [],
1111
whiteList: ["www.facebook.com"],
1212

13-
// Lấy tất cả id của member trong group
14-
// source: https://gist.github.com/thinhbuzz/d8ba04c66f69dc78265b9a9ce5a118c0?fbclid=IwAR37QPDL1zlGWIv_pPq4UydYbFcQKlw7Dio-dP-jtztSJODGPD1RoIGFzZU#file-group-uuid-js-L1
1513
func: async function () {
14+
// Lấy tất cả id của member trong group
15+
// source: https://gist.github.com/thinhbuzz/d8ba04c66f69dc78265b9a9ce5a118c0?fbclid=IwAR37QPDL1zlGWIv_pPq4UydYbFcQKlw7Dio-dP-jtztSJODGPD1RoIGFzZU#file-group-uuid-js-L1
16+
1617
// function sleep(ms) {
1718
// return new Promise((resolve) => setTimeout(resolve, ms));
1819
// }

scripts/fb_getGroupId.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ export default {
1010
blackList: [],
1111
whiteList: ["www.facebook.com"],
1212

13-
// Lấy group id - trường hợp url của group hiển thị tên chứ ko hiển thị id. Ví dụ: https://www.facebook.com/groups/j2team.community.girls
1413
func: async function () {
14+
// Lấy group id - trường hợp url của group hiển thị tên chứ ko hiển thị id. Ví dụ: https://www.facebook.com/groups/j2team.community.girls
15+
1516
const group_name = document.title;
1617
const found = (check) => {
1718
if (check && check[0]) {

0 commit comments

Comments
 (0)