mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-06 21:49:03 +00:00
emoji-sets: fix native emoji alignment
This commit is contained in:
parent
a824ba8856
commit
b8fdad91c3
10
repo/emoji-sets/client.css
Normal file
10
repo/emoji-sets/client.css
Normal file
@ -0,0 +1,10 @@
|
||||
/*
|
||||
* notion-enhancer: emoji sets
|
||||
* (c) 2021 Arecsu
|
||||
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||
* (https://notion-enhancer.github.io/) under the MIT license
|
||||
*/
|
||||
|
||||
[aria-label][role='image'][style*='Apple Color Emoji']:not([data-emoji-sets-unsupported]) {
|
||||
margin-left: 2.5px !important;
|
||||
}
|
@ -7,8 +7,8 @@
|
||||
export default async function ({ web, env }, db) {
|
||||
const style = await db.get(['style']),
|
||||
// real emojis are used on macos instead of the twitter set
|
||||
nativeEmojiSelector = `[style*='"Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", EmojiSymbols']:not(data-emoji-sets-unsupported)`,
|
||||
imgEmojiSelector = '.notion-emoji:not(data-emoji-sets-unsupported)',
|
||||
nativeEmojiSelector = `[aria-label][role="image"][style*="Apple Color Emoji"]:not([data-emoji-sets-unsupported])`,
|
||||
imgEmojiSelector = '.notion-emoji:not([data-emoji-sets-unsupported])',
|
||||
imgEmojiOverlaySelector = `${imgEmojiSelector} + [src*="notion-emojis"]`;
|
||||
|
||||
await web.whenReady();
|
||||
@ -44,7 +44,6 @@ export default async function ({ web, env }, db) {
|
||||
$emoji.style.height = '1em';
|
||||
$emoji.style.display = 'inline-block';
|
||||
$emoji.innerText = '';
|
||||
await new Promise((res, rej) => requestAnimationFrame(res));
|
||||
} else {
|
||||
$emoji.dataset.emojiSetsUnsupported = true;
|
||||
}
|
||||
|
@ -15,12 +15,15 @@
|
||||
"js": {
|
||||
"client": ["client.mjs"]
|
||||
},
|
||||
"css": {},
|
||||
"css": {
|
||||
"client": ["client.css"]
|
||||
},
|
||||
"options": [
|
||||
{
|
||||
"type": "select",
|
||||
"key": "style",
|
||||
"label": "emoji style",
|
||||
"tooltip": "**initial use may involve some lag and load-time for emojis until they have all been cached**",
|
||||
"values": [
|
||||
"twitter",
|
||||
"apple",
|
||||
|
Loading…
Reference in New Issue
Block a user