Skip to content

Commit 05873d8

Browse files
optimising for speed
1 parent 2621097 commit 05873d8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

source/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function createBox(emoji, searchResult) {
8787

8888
chrome.storage.local.get(['enabled'], (data) => {
8989
if (data.enabled !== false) {
90-
window.addEventListener('load', function() {
90+
window.addEventListener('DOMContentLoaded', function() {
9191
// const prompt = document.getElementById('APjFqb').value.toLowerCase();
9292
// if (prompt.includes('emoji')) {
9393
const resultLinks = document.getElementsByClassName('zReHs');

source/manifest.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Emoji Copy Extension",
33
"description": "Copy any emoji from Emojipedia.org without having to leave the Google search results page!",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"manifest_version": 3,
66
"action": {
77
"default_popup": "extension.html",
@@ -10,7 +10,8 @@
1010
"content_scripts": [
1111
{
1212
"matches": ["https://www.google.com/search*"],
13-
"js": ["content.js"]
13+
"js": ["content.js"],
14+
"run_at": "document_start"
1415
}
1516
],
1617
"permissions": [

0 commit comments

Comments
 (0)