-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlikefree.js
70 lines (59 loc) · 1.97 KB
/
likefree.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// LikeFree
// likefree.js
//
// This file frees FB and IG of likes
//
// @author Vivek Bhookya
// Free da Like
main();
// Function main
// LikeFree
function main() {
// Every 10 milliseconds lezgo
setInterval(hide, 10);
// Mouse and scroll events
document.addEventListener('click', hide, false);
document.addEventListener('mousemove', hide, false);
document.addEventListener('scroll', hide, false);
}
// Function hide
// Grabs each community element (one at a time) and removes them
// One at a time because tfw no jQuery lmao
// We use the if () statements to silence warnings in the console
function hide() {
// Facebook
let postFeedback = document.getElementsByClassName('bp9cbjyn m9osqain j83agx80 jq4qci2q bkfpd7mw a3bd9o3v kvgmc6g5 wkznzc2l oygrvhab dhix69tm jktsbyx5 rz4wbd8a osnr6wyh a8nywdso s1tcr66n')[0];
if (postFeedback) {
postFeedback.remove();
}
let commentReaction = document.getElementsByClassName('_1lh7')[0];
if (commentReaction) {
commentReaction.remove();
}
let reactionsOnPicturePopup = document.getElementsByClassName('_6cuq')[0];
if (reactionsOnPicturePopup) {
reactionsOnPicturePopup.remove();
}
let reactionsInSearchFeed = document.getElementsByClassName('n1l5q3vz bp9cbjyn m9osqain j83agx80 jq4qci2q a3bd9o3v enqfppq2');
for (let i = 0; reactionsInSearchFeed[i]; i++) {
reactionsInSearchFeed[i].remove();
}
let popupFeedback = document.getElementsByClassName('_3399 _1f6t _4_dr')[0];
if (popupFeedback) {
popupFeedback.remove();
}
let popupCommentReaction = document.getElementsByClassName('_10lo _10lp')[0];
if (popupCommentReaction) {
popupCommentReaction.remove();
}
// Instagram
let pictureFeedback = document.getElementsByClassName('EDfFK ygqzn')[0];
if (pictureFeedback) {
pictureFeedback.remove();
}
let pictureHover = document.getElementsByClassName('qn-0x')[0];
if (pictureHover) {
// .remove() breaks Instagram, hence:
pictureHover.style.visibility = 'hidden';
}
}