Skip to content

Commit a90e731

Browse files
committed
alway enable animation fb
1 parent 468bb7f commit a90e731

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@media (prefers-reduced-motion: reduce) {
2+
._6s5d :not(.always-enable-animations) {
3+
animation-duration: 0 !important;
4+
animation-name: none !important;
5+
transition-duration: 0 !important;
6+
transition-property: none !important;
7+
}
8+
}

scripts/fb_alwayEnableAnimation.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
export default {
2+
icon: "",
3+
name: {
4+
en: "",
5+
vi: "",
6+
},
7+
description: {
8+
en: "",
9+
vi: "",
10+
},
11+
blackList: [],
12+
whiteList: [],
13+
14+
// run (if enable autorun) in web page context
15+
onDocumentStart: () => {},
16+
onDocumentEnd: () => {},
17+
onDocumentIdle: () => {},
18+
19+
// run onclick in extension-popup-page context
20+
onClickExtension: () => {},
21+
22+
// run onclick in content-script context
23+
onClickContentScript: () => {},
24+
25+
// run onclick in web page context
26+
// cannot access to shared or any variable outside of webpage
27+
onClick: () => {},
28+
};
29+
30+
// functions/attributes that other scripts can import and use
31+
export const shared = {};
32+

scripts/fb_moreReactionStory.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ body {
107107
}
108108

109109
.floating-emoji {
110-
animation: bubble 2s ease-out;
110+
animation: bubble 2s ease-out !important;
111111
pointer-events: none;
112112
height: 70px;
113113
width: 70px;

scripts/fb_moreReactionStory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default {
127127
}
128128
function addFloatingEmoji(emoji, ele) {
129129
let floatingEmoji = document.createElement("div");
130-
floatingEmoji.setAttribute("class", "floating-emoji");
130+
floatingEmoji.className = "floating-emoji always-enable-animations";
131131
floatingEmoji.textContent = emoji;
132132

133133
let { top, left } = ele.getBoundingClientRect();

0 commit comments

Comments
 (0)