Skip to content

Commit e5c4bbc

Browse files
committed
fix statistic + bypass learn anything
1 parent 5212671 commit e5c4bbc

File tree

6 files changed

+65
-5
lines changed

6 files changed

+65
-5
lines changed

popup/tabs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,7 @@ const tabs = [
763763
s.studocu_bypassPreview,
764764
s.scribd_bypassPreview,
765765
s.studyphim_unlimited,
766+
s.bypass_learnAnything,
766767
createTitle("--- Unlock function ---", "--- Mở khoá chức năng ---"),
767768
s.simpleAllowCopy,
768769
s.detect_zeroWidthCharacters,

scripts/_index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,4 @@ export { default as github_HTMLPreview } from "./github_HTMLPreview.js";
167167
export { default as showImageOnHoverLink } from "./showImageOnHoverLink.js";
168168
export { default as fb_allInOne } from "./fb_allInOne.js";
169169
export { default as fb_getPostReactionCount } from "./fb_getPostReactionCount.js";
170+
export { default as bypass_learnAnything } from "./bypass_learnAnything.js";

scripts/_ufs_statistic.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ li:hover {
1414
color: white;
1515
}
1616

17+
li a {
18+
display: inline-block;
19+
position: relative;
20+
}
21+
22+
li a img {
23+
width: 30px;
24+
transition: all 0.2s ease;
25+
position: absolute;
26+
left: 0;
27+
top: 0;
28+
}
29+
30+
li:hover img {
31+
transform: scale(2);
32+
z-index: 2;
33+
}
34+
1735
.hidden,
1836
.not-script {
1937
display: none;

scripts/_ufs_statistic.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ async function onDocumentEnd() {
6262
const all_li = allLogs.map((data) => {
6363
let li = document.createElement("li");
6464
if (isFbUid(data?.uid)) {
65-
li.innerHTML = data.log?.replace(
66-
data.uid,
67-
`<a href="https://fb.com/${data.uid}" target="_blank">${data.uid}</a>`
68-
);
65+
li.innerHTML =
66+
data.log +
67+
` - <a href="https://fb.com/${data.uid}" target="_blank">
68+
<img src="${fbAvatarFromUid(data.uid)}" />
69+
fb
70+
</a>`;
6971
} else {
7072
li.textContent = data.log;
7173
}
@@ -477,7 +479,13 @@ function randColor() {
477479
}
478480

479481
function isFbUid(uid) {
480-
return uid?.startsWith("100");
482+
return (
483+
/\d+/.test(uid) &&
484+
(uid?.startsWith("100") || (uid?.length && uid?.length != 13))
485+
);
486+
}
487+
function fbAvatarFromUid(uid) {
488+
return `https://graph.facebook.com/${uid}/picture?height=50&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`;
481489
}
482490

483491
// log example: 5/31/2024, 9:13:41 AM: OPEN-TAB-unlock (1.67-1717121281787) -> 43

scripts/bypass_LearnAnything.png

62.4 KB
Loading

scripts/bypass_learnAnything.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { UfsGlobal } from "./content-scripts/ufs_global.js";
2+
import { BADGES } from "./helpers/badge.js";
3+
4+
export default {
5+
icon: "https://learn-anything.xyz/favicon.ico",
6+
name: {
7+
en: "Mở khoá Learn Anything",
8+
vi: "Bypass Learn Anything",
9+
},
10+
description: {
11+
en: "View learn-anything.xyz content without become a member",
12+
vi: "Xem nội dung web learn-anything.xyz không cần đăng ký member",
13+
img: "/scripts/bypass_LearnAnything.png",
14+
},
15+
badges: [BADGES.new],
16+
changeLogs: {
17+
"2024-07-01": "init",
18+
},
19+
infoLink: "https://learn-anything.xyz/",
20+
21+
whiteList: ["https://learn-anything.xyz/*"],
22+
23+
contentScript: {
24+
onDocumentStart: (details) => {
25+
UfsGlobal.DOM.injectCssCode(`
26+
#InfoMain .absolute {
27+
visibility: hidden !important;
28+
}
29+
`);
30+
},
31+
},
32+
};

0 commit comments

Comments
 (0)