Skip to content

Commit

Permalink
Merge pull request #93 from tdulcet/master
Browse files Browse the repository at this point in the history
Added Emoji Autocorrect.
  • Loading branch information
rugk authored Sep 25, 2023
2 parents a2b9d0f + 2cf1237 commit 7379aa2
Show file tree
Hide file tree
Showing 27 changed files with 1,054 additions and 80 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [rugk, tdulcet]
2 changes: 1 addition & 1 deletion assets/texts/en/privacy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ An explanation of all permissions, this add-on requests, can be found at https:/
== THIRD-PARTY SERVICES ==

This ADD-ON uses the “sync storage” of your browser to store the settings. If the USER enables “Sync” in the browser, the settings are uploaded and synchronized across your devices connected to your account. If you do not do, the data is only stored locally on your device.
In Mozilla Firefox the data is end-to-end encrypted before getting uploaded and stored on servers by Mozilla.
In Mozilla Firefox, the data is end-to-end encrypted before being uploaded and stored on servers by Mozilla.
See https://accounts.firefox.com/legal/privacy and https://www.mozilla.org/privacy/firefox/#c-privacy-topic-8 for Mozilla's privacy policies on that topic.
10 changes: 10 additions & 0 deletions scripts/manifests/chromemanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
"background": {
"page": "background/background.html"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"all_frames": true,
"js": [
"browser-polyfill.js",
"content_scripts/autocorrect.js"
]
}
],
"commands": {
"_execute_browser_action": {
"suggested_key": {
Expand Down
11 changes: 9 additions & 2 deletions scripts/manifests/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"background": {
"page": "background/background.html"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"all_frames": true,
"js": ["content_scripts/autocorrect.js"]
}
],
"commands": {
"_execute_browser_action": {
"suggested_key": {
Expand Down Expand Up @@ -65,10 +72,10 @@
],
// "search" currently not requested though, see https://discourse.mozilla.org/t/why-do-we-need-an-extra-permission-simply-for-starting-a-search/41174?u=rugkx

"applications": {
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "74.0"
"strict_min_version": "87.0"
}
}
}
14 changes: 11 additions & 3 deletions scripts/manifests/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"background": {
"page": "background/background.html"
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"all_frames": true,
"js": ["content_scripts/autocorrect.js"]
}
],
"commands": {
"_execute_browser_action": {
"suggested_key": {
Expand All @@ -59,14 +66,15 @@

"optional_permissions": [
"clipboardWrite",
"search"
"search",
"tabs"
],
// "search" currently not requested though, see https://discourse.mozilla.org/t/why-do-we-need-an-extra-permission-simply-for-starting-a-search/41174?u=rugkx

"applications": {
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "74.0"
"strict_min_version": "87.0"
}
}
}
6 changes: 3 additions & 3 deletions scripts/manifests/thunderbirdmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_extensionName__",
"short_name": "__MSG_extensionNameShort__",
"version": "0.9.1",
"version": "0.9.4",
"author": "rugk, Teal Dulcet",

"description": "__MSG_extensionDescription__",
Expand Down Expand Up @@ -60,10 +60,10 @@
"clipboardWrite"
],

"applications": {
"browser_specific_settings": {
"gecko": {
"id": "[email protected]",
"strict_min_version": "87.0"
"strict_min_version": "91.0"
}
}
}
64 changes: 32 additions & 32 deletions src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"description": "Short name of the extension. I suggest not to translate it."
},
"extensionDescription": {
"message": "This add-on provides you with a modern emoji picker that you can use to find emojis. You can then copy it to the clipboard or insert emoji into the active web page.",
"message": "This add-on provides you with a modern emoji picker that you can use to find emojis. You can then copy it to the clipboard or insert emoji into the active web page.",
"description": "Description of the extension."
},
"browserActionButtonTitle": {
Expand Down Expand Up @@ -90,11 +90,11 @@
// tips
"tipYouLikeAddon": {
"message": "You like this add-on?",
"description": "A tip shown to remind the user to rate the addon."
"description": "A tip shown to remind the user to rate the add-on."
},
"tipYouLikeAddonButton": {
"message": "Rate it",
"description": "Button for the tip shown to remind the user to rate the addon."
"description": "Button for the tip shown to remind the user to rate the add-on."
},
"tipPopupCodeHotkey": {
"message": "Remember the hot key for this add-on is Ctrl+Shift+Period.",
Expand Down Expand Up @@ -144,7 +144,7 @@
"description": "The title for a settings group."
},
"titleBehaviour": {
"message": "Behaviour",
"message": "Behavior",
"description": "The title for a settings group."
},

Expand Down Expand Up @@ -190,23 +190,23 @@
},
"optionEmojiSize16px": {
"message": "Small (16px)",
"description": "Option of the emoji size. Do mention a 'human-readbable' description first, followed by the technical pixel size."
"description": "Option of the emoji size. Do mention a 'human-readable' description first, followed by the technical pixel size."
},
"optionEmojiSize24px": {
"message": "Medium (24px)",
"description": "Option of the emoji size. Do mention a 'human-readbable' description first, followed by the technical pixel size."
"description": "Option of the emoji size. Do mention a 'human-readable' description first, followed by the technical pixel size."
},
"optionEmojiSize32px": {
"message": "Large (32px)",
"description": "Option of the emoji size. Do mention a 'human-readbable' description first, followed by the technical pixel size."
"description": "Option of the emoji size. Do mention a 'human-readable' description first, followed by the technical pixel size."
},
"optionEmojiSize40px": {
"message": "Very Large (40px)",
"description": "Option of the emoji size. Do mention a 'human-readbable' description first, followed by the technical pixel size."
"description": "Option of the emoji size. Do mention a 'human-readable' description first, followed by the technical pixel size."
},
"optionEmojiSize48px": {
"message": "Extra Large (48px)",
"description": "Option of the emoji size. Do mention a 'human-readbable' description first, followed by the technical pixel size."
"description": "Option of the emoji size. Do mention a 'human-readable' description first, followed by the technical pixel size."
},
"optionEmojiPickerPerLine": {
"message": "Width of picker:",
Expand Down Expand Up @@ -259,7 +259,7 @@
},

"optionCopyEmojiColons": {
"message": "Use the $COLON$ code instead of the Emoji unicode.",
"message": "Use the $COLON$ shortcode instead of the Unicode Emoji.",
"description": "This is an option shown in the add-on settings. You can also translate 'code' with 'syntax'.",
"placeholders": {
"colon": {
Expand Down Expand Up @@ -414,91 +414,91 @@
// please DO READ this section for translating the emoji-specific terms: https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc
"emojiMartSearch": {
"message": "Search",
"description": "Localisation of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartClear": {
"message": "Clear",
"description": "Localisation of emoji-mart, the emoji-picker. Accessible label on \"clear\" button. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of emoji-mart, the emoji-picker. Accessible label on \"clear\" button. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartNoEmojiFound": {
"message": "No Emoji Found",
"description": "Localisation of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartSkinText": {
"message": "Choose your default skin tone",
"description": "Localisation of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartCategorySearch": {
"message": "Search Results",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartCategoryRecent": {
"message": "Frequently Used",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartCategoryPeople": {
"message": "Smileys & People",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategoryNature": {
"message": "Animals & Nature",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategoryFoods": {
"message": "Food & Drink",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategoryActivity": {
"message": "Activity",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategoryPlaces": {
"message": "Travel & Places",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategoryObjects": {
"message": "Objects",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategorySymbols": {
"message": "Symbols",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategoryFlags": {
"message": "Flags",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartCategoryCustom": {
"message": "Custom",
"description": "Localisation of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of an emoji category option of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartCategoriesLabel": {
"message": "Emoji categories",
"description": "Localisation of emoji-mart, the emoji-picker. Accessible title for the list of categories. See: https://github.com/missive/emoji-mart#i18n"
"description": "Localization of emoji-mart, the emoji-picker. Accessible title for the list of categories. See: https://github.com/missive/emoji-mart#i18n"
},
"emojiMartSkintone1": {
"message": "Default Skin Tone",
"description": "Localisation of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartSkintone2": {
"message": "Light Skin Tone",
"description": "Localisation of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartSkintone3": {
"message": "Medium-Light Skin Tone",
"description": "Localisation of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartSkintone4": {
"message": "Medium Skin Tone",
"description": "Localisation of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartSkintone5": {
"message": "Medium-Dark Skin Tone",
"description": "Localisation of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},
"emojiMartSkintone6": {
"message": "Dark Skin Tone",
"description": "Localisation of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
"description": "Localization of the skin tone of emoji-mart, the emoji-picker. See: https://github.com/missive/emoji-mart#i18n and https://github.com/rugk/awesome-emoji-picker/blob/master/CONTRIBUTING.md#translating-emoji-terms-categories-skin-names-etc"
},

// ARIA labels/descriptions
Expand Down
2 changes: 2 additions & 0 deletions src/background/background.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import * as IconHandler from "/common/modules/IconHandler.js";
import * as AutocorrectHandler from "/common/modules/AutocorrectHandler.js";
import * as ContextMenu from "./modules/ContextMenu.js";
import * as OmniboxSearch from "./modules/OmniboxSearch.js";

// init modules
IconHandler.init();
AutocorrectHandler.init();
ContextMenu.init();
OmniboxSearch.init();
3 changes: 1 addition & 2 deletions src/background/modules/ContextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ async function applySettings(contextMenu) {
id: EMOJI,
title: menuText,
command: commandToFind,
// Remove IS_THUNDERBIRD once https://bugzilla.mozilla.org/show_bug.cgi?id=1716976 is fixed
contexts: IS_THUNDERBIRD ? ["editable", "selection", "page"] : ["editable"]
contexts: ["editable"]
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/background/modules/InstallUpgrade.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Upgrades user data on installation of new updates.
*
* Attention: Currently you must not include this script asyncronously. See
* Attention: Currently you must not include this script asynchronously. See
* https://bugzilla.mozilla.org/show_bug.cgi?id=1506464 for details.
*
* @module InstallUpgrade
Expand Down
Loading

0 comments on commit 7379aa2

Please sign in to comment.