Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIGHLIGHT engine and major restructure #152

Merged
merged 59 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
64f9cdb
Add more highlighter classes for abstraction
ator-dev Dec 8, 2023
e548a02
Begin HIGHLIGHT, always enable HIGHLIGHT (temp)
ator-dev Dec 15, 2023
a12871b
Complete HIGHLIGHT engine's basic function
ator-dev Dec 16, 2023
d4f224a
Merge branch 'main' into highlight-api-engine
ator-dev Dec 16, 2023
ed4af38
Develop Special Engine, refactor highlighting code
ator-dev Jan 27, 2024
f94e7dd
Restructure highlighting by turning into modules
ator-dev Jan 29, 2024
70a0e9b
Fix imports, split Highlightability into module
ator-dev Jan 29, 2024
d99d291
Move PAINT's method modules inside engines/paint
ator-dev Jan 30, 2024
2b0a840
Turn /include files into modules, make functional
ator-dev Jan 31, 2024
377e07f
Modularise more, fix pages, reactivate term status
ator-dev Feb 1, 2024
5ed0aed
Split message module, reorganise some modules
ator-dev Feb 2, 2024
771732c
Remove obsolete functions from HIGHLIGHT engine
ator-dev Feb 2, 2024
6229098
Group related highlighting modules
ator-dev Feb 2, 2024
1e86dea
Implement most of HIGHLIGHT, modularise PAINT
ator-dev Feb 2, 2024
96fc2d1
Make HIGHLIGHT cleanup highlights, minor changes
ator-dev Feb 3, 2024
1be8db1
HI.: Fix bad highlight deletion, lower hi' opacity
ator-dev Feb 4, 2024
10237bb
Impl. HIGHLIGHT scroll markers, fix scroll markers
ator-dev Feb 5, 2024
0af34ed
Use background, remove Dummy classes, bump version
ator-dev Feb 5, 2024
968d033
Split modules from flow-monitor and engine
ator-dev Feb 5, 2024
5b2d0f5
Split modules from highlight/engine
ator-dev Feb 5, 2024
434f553
Fix PAINT method choice, do not extend hi' cache
ator-dev Feb 13, 2024
35f06e1
Experimental refactor (unfinished)
ator-dev Apr 14, 2024
d94676a
Merge branch 'main' into highlight-api-engine
ator-dev May 15, 2024
5aea320
Bump major version to 2
ator-dev May 15, 2024
68bda63
Rework for deterministic and immutable MatchTerm
ator-dev May 16, 2024
d0a0169
Make class attributes readonly and/or non-null
ator-dev May 16, 2024
a02814d
Change IDs, classes, and at-rule IDs
ator-dev May 16, 2024
729d7d5
Remove manifest Dhall files
ator-dev May 21, 2024
c2aae9c
Merge major storage changes from main, improve API
ator-dev May 21, 2024
b108190
Merge (last unmerged changes of) branch 'main' into highlight-api-engine
ator-dev May 21, 2024
e339647
Merge branch 'main' into highlight-api-engine
ator-dev May 21, 2024
f1c7c58
Invert diacritics option in (hopefully) all code
ator-dev May 21, 2024
9ef0ed2
Re-add changes to pages made on the storage branch
ator-dev May 21, 2024
811a60f
Prevent flash of white on internal pages
ator-dev May 21, 2024
944fadd
Use correct model classes in PAINT and HIGHLIGHT
ator-dev May 21, 2024
c9a6697
Remove term-setter, refactor hi' entry function
ator-dev May 23, 2024
57afacc
Restructure and refactor toolbar module
ator-dev May 28, 2024
2b61ece
Divide toolbar into several modules
ator-dev May 29, 2024
6807125
Fix (most of) toolbar, improve term setting
ator-dev Jun 7, 2024
a2dd9f3
Refactor insertion of toolbar controls
ator-dev Jun 8, 2024
7b864c1
Use enum for toolbar section names
ator-dev Jun 8, 2024
4ab1acc
Tweak toolbar behaviour, refactor, tidy up logging
ator-dev Jun 9, 2024
850379d
Fix toolbar menu opening and menu openers
ator-dev Jun 9, 2024
8f7e2dd
Reset term input value when committing
ator-dev Jun 9, 2024
e3f97dd
Refactor & clean up some code
ator-dev Jun 9, 2024
af9dc69
Remove "Standard" from class & file names
ator-dev Jun 9, 2024
819e318
Refactor toolbar "selection return" code
ator-dev Jun 9, 2024
fbe96cc
Update term control classes on change
ator-dev Jun 10, 2024
1139d5d
Improve keyboard control for match-mode menu
ator-dev Jun 10, 2024
b4042e4
Fix and polish remaining toolbar functions
ator-dev Jun 11, 2024
3cb713c
Toggle toolbar "hidden" via its interface
ator-dev Jun 11, 2024
ebe6b55
Improve interfacing with toolbar
ator-dev Jun 11, 2024
10af9e0
Update "replace terms" control on terms changed
ator-dev Jun 11, 2024
99dbe53
Prevent dragging toolbar icons in Chromium
ator-dev Jun 11, 2024
9a9d8d9
Fix term input being unselected when tabbed to
ator-dev Jun 11, 2024
0f9092d
Clean up code to make an option list trigger
ator-dev Jun 12, 2024
9f9b1b7
Refactor highlighting modules slightly
ator-dev Jun 12, 2024
6873c8c
Fix term indicating and hence term jumping
ator-dev Jun 12, 2024
f67bda9
Use underline styles for HIGHLIGHT colour conflict
ator-dev Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.js
*.mjs
41 changes: 41 additions & 0 deletions lib/email.min.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* An EmailJS library function which sends an email using the EmailJS service.
* @param service The name of a service category for the email.
* @param template The name of a template under the service for the email.
* @param details Custom template field entries.
* @param key The API key to use.
*/
declare const sendEmail: (
service: string,
template: string,
details: {
addon_version?: string
url?: string
phrases?: string
user_message?: string
user_email?: string
item_0_question?: string
item_1_question?: string
item_2_question?: string
item_3_question?: string
item_4_question?: string
item_5_question?: string
item_6_question?: string
item_7_question?: string
item_8_question?: string
item_9_question?: string
item_0_response?: string
item_1_response?: string
item_2_response?: string
item_3_response?: string
item_4_response?: string
item_5_response?: string
item_6_response?: string
item_7_response?: string
item_8_response?: string
item_9_response?: string
},
key: string,
) => Promise<unknown>; // TODO check the actual return value in the EmailJS docs

export { sendEmail };
2 changes: 1 addition & 1 deletion lib/email.min.js

Large diffs are not rendered by default.

25 changes: 7 additions & 18 deletions manifest/chromium.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Mark My Search",
"description": "Highlight searched keywords. Find matches instantly.",
"version": "1.14.2",
"version": "2.0.0",

"icons": {
"16": "/icons/dist/mms-16.png",
Expand All @@ -24,18 +24,14 @@
],

"background": {
"service_worker": "/dist/background.js"
"type": "module",
"service_worker": "/dist/background.mjs"
},

"content_scripts": [
{
"matches": [ "*://*/*" ],
"js": [
"/dist/include/utility.js",
"/dist/include/pattern-stem.js",
"/dist/include/pattern-diacritic.js",
"/dist/content.js"
],
"js": [ "/dist/content-entry.js" ],
"run_at": "document_start"
}
],
Expand All @@ -57,17 +53,10 @@
"web_accessible_resources": [
{
"resources": [
"/icons/*.svg",
"/dist/paint.js",
"/icons/mms.svg",
"/icons/arrow.svg",
"/icons/close.svg",
"/icons/search.svg",
"/icons/show.svg",
"/icons/refresh.svg",
"/icons/create.svg",
"/icons/delete.svg",
"/icons/edit.svg",
"/icons/reveal.svg"
"/dist/content.mjs",
"/dist/modules/*.mjs"
],
"matches": [ "*://*/*" ]
}
Expand Down
32 changes: 7 additions & 25 deletions manifest/firefox.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Mark My Search",
"description": "Highlight searched keywords. Find matches instantly.",
"version": "1.14.2",
"version": "2.0.0",

"browser_specific_settings": { "gecko": { "id": "[email protected]" } },

Expand All @@ -28,25 +28,14 @@
],

"background": {
"scripts": [
"/dist/include/utility.js",
"/dist/include/pattern-stem.js",
"/dist/include/pattern-diacritic.js",
"/dist/include/util-privileged.js",
"/dist/include/storage.js",
"/dist/background.js"
]
"type": "module",
"scripts": [ "/dist/background.mjs" ]
},

"content_scripts": [
{
"matches": [ "*://*/*" ],
"js": [
"/dist/include/utility.js",
"/dist/include/pattern-stem.js",
"/dist/include/pattern-diacritic.js",
"/dist/content.js"
],
"js": [ "/dist/content-entry.js" ],
"run_at": "document_start"
}
],
Expand All @@ -65,17 +54,10 @@
"web_accessible_resources": [
{
"resources": [
"/icons/*.svg",
"/dist/paint.js",
"/icons/mms.svg",
"/icons/arrow.svg",
"/icons/close.svg",
"/icons/search.svg",
"/icons/show.svg",
"/icons/refresh.svg",
"/icons/create.svg",
"/icons/delete.svg",
"/icons/edit.svg",
"/icons/reveal.svg"
"/dist/content.mjs",
"/dist/modules/*.mjs"
],
"matches": [ "*://*/*" ]
}
Expand Down
10 changes: 6 additions & 4 deletions pages/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<style>
body {
background: hsl(300 100% 6%);
}
</style>
</head>
<body>
<script src="/dist/include/utility.js"></script>
<script src="/dist/include/util-privileged.js"></script>
<script src="/dist/include/storage.js"></script>
<script src="/dist/pages/options.js"></script>
<script src="/dist/pages/options.mjs" type="module"></script>
</body>
</html>
14 changes: 6 additions & 8 deletions pages/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<style>
body {
background: hsl(300 100% 6%);
}
</style>
</head>
<body>
<script src="/dist/include/utility.js"></script>
<script src="/dist/include/pattern-stem.js"></script>
<script src="/dist/include/pattern-diacritic.js"></script>
<script src="/dist/include/util-privileged.js"></script>
<script src="/dist/include/storage.js"></script>
<script src="/lib/email.min.js"></script>
<script src="/dist/include/page-build.js"></script>
<script src="/dist/pages/popup.js"></script>
<script src="/dist/pages/popup.mjs" type="module"></script>
</body>
</html>
14 changes: 6 additions & 8 deletions pages/sendoff.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
<html>
<head>
<meta charset="utf-8">
<style>
body {
background: hsl(300 100% 6%);
}
</style>
</head>
<body>
<script src="/dist/include/utility.js"></script>
<script src="/dist/include/pattern-stem.js"></script>
<script src="/dist/include/pattern-diacritic.js"></script>
<script src="/dist/include/util-privileged.js"></script>
<script src="/dist/include/storage.js"></script>
<script src="/lib/email.min.js"></script>
<script src="/dist/include/page-build.js"></script>
<script src="/dist/pages/sendoff.js"></script>
<script src="/dist/pages/sendoff.mjs" type="module"></script>
</body>
</html>
16 changes: 7 additions & 9 deletions pages/startpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
<html>
<head>
<meta charset="utf-8">
<style>
body {
background: hsl(300 100% 6%);
}
</style>
</head>
<body>
<script src="/dist/include/utility.js"></script>
<script src="/dist/include/pattern-stem.js"></script>
<script src="/dist/include/pattern-diacritic.js"></script>
<script src="/dist/include/util-privileged.js"></script>
<script src="/dist/include/storage.js"></script>
<script src="/lib/email.min.js"></script>
<script src="/dist/include/page-build.js"></script>
<script src="/dist/pages/startpage.js"></script>
<script src="/dist/content.js"></script>
<script src="/dist/pages/startpage.mjs" type="module"></script>
<!--<script src="/dist/content.mjs" type="module"></script>-->
</body>
</html>
Loading