Skip to content

Commit 0b9f6d7

Browse files
committed
hard work - snaptik
1 parent 757847d commit 0b9f6d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+510
-191
lines changed

net-request-rules/rules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "modifyHeaders",
77
"requestHeaders": [
88
{
9-
"header": "Referer",
9+
"header": "referer",
1010
"operation": "set",
1111
"value": "https://unshorten.it/"
1212
},

popup/helpers/category.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ export const CATEGORY = {
8282
vi: `<i class="fa-brands fa-youtube"></i> Youtube`,
8383
},
8484
},
85+
tiktok: {
86+
id: "tiktok",
87+
name: {
88+
en: `<i class="fa-brands fa-tiktok"></i> Tiktok`,
89+
vi: `<i class="fa-brands fa-tiktok"></i> Tiktok`,
90+
},
91+
},
8592
github: {
8693
id: "github",
8794
name: {

popup/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ async function runScript(script) {
271271

272272
function initOpenInNewTabBtn() {
273273
if (isExtensionInSeperatedPopup()) {
274+
document.title = "Useful Scripts";
274275
openInNewTabBtn.remove();
275276
} else {
276277
openInNewTabBtn.onclick = () => {

popup/popup.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ <h3>
3131
</div>
3232

3333
<!-- language flag -->
34-
<img id="flag" src="" alt="">
34+
<img id="flag" src="" alt="" title="Change language">
3535

36-
<button id="open-in-new-tab">
36+
<button id="open-in-new-tab" title="Open in new popup">
3737
<i class="fa-solid fa-up-right-from-square"></i>
3838
</button>
3939

popup/tabs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ const tabs = [
133133
s.youtube_popupPlayer,
134134
],
135135
},
136+
{
137+
...CATEGORY.tiktok,
138+
scripts: [s.tiktok_downloadVideo],
139+
},
136140
{
137141
...CATEGORY.github,
138142
scripts: [s.github_goToFirstCommit, s.githubdev, s.github1s],
@@ -153,7 +157,6 @@ const tabs = [
153157
s.webToQRCode,
154158
s.getAllEmailsInWeb,
155159
s.screenshotFullPage,
156-
s.screenshotAreaPage,
157160
s.webToPDF,
158161
s.transfer_sh,
159162
s.jsonformatter,
@@ -174,6 +177,7 @@ const tabs = [
174177
scripts: [
175178
s.shortenURL,
176179
s.unshorten,
180+
s.viewBrowserInfo,
177181
s.showHiddenFields,
178182
s.viewCookies,
179183
s.removeCookies,

scripts/archiveToday.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ export default {
1515
func: async function () {
1616
let { url } = await getCurrentTab();
1717

18-
var a = window.prompt(
19-
"Nhập URL muốn xem archive: ",
18+
var a = prompt(
19+
"Nhập URL muốn tạo archive: ",
2020
url.replace(/^http\:\/\/(.*)$/, "$1")
2121
);
22-
window.open("https://archive.today/?run=1&url=" + encodeURIComponent(a));
22+
if (a != null) {
23+
window.open("https://archive.today/?run=1&url=" + encodeURIComponent(a));
24+
}
2325
},
2426
};

scripts/download_image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default {
112112
win.document.body.innerHTML = html;
113113
}
114114

115-
const mode = window.prompt(
115+
const mode = prompt(
116116
"Choose mode:\n\n- 1: Download current image (in viewport)\n- 2: Download all images",
117117
1
118118
);

scripts/fb_checkToken.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
runInExtensionContext: true,
1212

1313
func: function () {
14-
let token = window.prompt(
14+
let token = prompt(
1515
"Enter accesstoken want to check\nNhập access token muốn kiểm tra:",
1616
""
1717
);

scripts/fb_getAlbumId.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ export default {
1818
for (let a of [location, ...Array.from(list_a)]) {
1919
const page_album_id = /(?<=\/photos\/a\.)(.\d+?)(?=\/)/.exec(a.href);
2020
if (page_album_id && page_album_id[0]) {
21-
window.prompt("PAGE ALBUM ID:", page_album_id[0]);
21+
prompt("PAGE ALBUM ID:", page_album_id[0]);
2222
return;
2323
}
2424
const group_album_id = /(?<=set\=oa\.)(.\d+?)($|(?=&))/.exec(a.href);
2525
if (group_album_id && group_album_id[0]) {
26-
window.prompt("GROUP ALBUM ID:", group_album_id[0]);
26+
prompt("GROUP ALBUM ID:", group_album_id[0]);
2727
return;
2828
}
2929
const user_album_id = /(?<=set\=a\.)(.\d+?)($|(?=&))/.exec(a.href);
3030
if (user_album_id && user_album_id[0]) {
31-
window.prompt("USER ALBUM ID:", user_album_id[0]);
31+
prompt("USER ALBUM ID:", user_album_id[0]);
3232
return;
3333
}
3434
}
35-
window.prompt(
35+
prompt(
3636
"Không tìm thấy ALBUM ID nào trong trang web!\nBạn có đang ở đúng trang album chưa?\nTrang web Ví dụ:",
3737
"https://www.facebook.com/media/set/?vanity=ColourfulSpace&set=a.945632905514659"
3838
);

scripts/fb_getAllAlbumId.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ export default {
3232
// filter duplicate: https://stackoverflow.com/a/14438954
3333
list_id = [...new Set(list_id)];
3434
if (list_id.length)
35-
window.prompt(
35+
prompt(
3636
`Tìm thấy ${list_id.length} album id trong trang web và trên url.`,
3737
list_id.join(", ")
3838
);
3939
else
40-
window.prompt(
40+
prompt(
4141
"Không tìm thấy ALBUM ID nào trong trang web!\nBạn có đang ở đúng trang album chưa?\nTrang web Ví dụ:",
4242
"https://www.facebook.com/media/set/?vanity=ColourfulSpace&set=a.945632905514659"
4343
);

0 commit comments

Comments
 (0)