Skip to content

Commit b03c13d

Browse files
committed
remove constant cache writing to reduce unnecessary writes
1 parent e2b3e21 commit b03c13d

4 files changed

Lines changed: 17 additions & 19 deletions

File tree

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ repos:
1010
- id: check-merge-conflict
1111
- id: mixed-line-ending
1212

13-
- repo: https://github.com/pre-commit/mirrors-eslint
14-
rev: v10.0.0-alpha.1
13+
- repo: local
1514
hooks:
1615
- id: eslint
16+
name: eslint
17+
entry: npm run lint:fix --
18+
language: system
1719
files: \.(js)$
1820
exclude: ^eslint.config\.js$
1921
types: [file]
20-
args: [--fix]
21-
additional_dependencies:
22-
- eslint@9.15.0
23-
- globals@15.12.0
22+
pass_filenames: true
2423

25-
- repo: https://github.com/pre-commit/mirrors-prettier
26-
rev: v4.0.0-alpha.8
27-
hooks:
2824
- id: prettier
25+
name: prettier
26+
entry: npm run format --
27+
language: system
2928
files: \.(js|json|md|yaml|yml)$
3029
types: [file]
30+
pass_filenames: true

comping/content/data-extract.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
let chartRefreshTimer = null;
88
let chartContainer = null;
99
let chartContainerWatcher = null;
10-
let chartPollInterval = null;
10+
const chartPollInterval = null;
1111
let chartExtractionInFlight = false;
1212

1313
main().catch((err) => console.warn("[rym-overlay] extract failed", err));
@@ -182,10 +182,6 @@
182182

183183
hookChartNavigation(scheduleRefresh);
184184
setTimeout(() => hookChartNavigation(scheduleRefresh), 500);
185-
186-
if (!chartPollInterval) {
187-
chartPollInterval = setInterval(() => scheduleRefresh(), 2000);
188-
}
189185
}
190186

191187
function ensureChartContainerWatcher(settings) {

comping/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 2,
33
"name": "Comping",
4-
"version": "0.2.1",
4+
"version": "0.2.2",
55
"description": "An add-on to accompany your browsing by adding notes on works cached from Sonemic websites (music, movies, video games).",
66
"browser_specific_settings": {
77
"gecko": {

comping/popup.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<meta charset="UTF-8" />
@@ -38,7 +38,7 @@
3838
color: #333;
3939
}
4040
.section h2::before {
41-
content: '▼';
41+
content: "▼";
4242
font-size: 10px;
4343
transition: transform 0.2s;
4444
}
@@ -47,7 +47,9 @@
4747
}
4848
.section-content {
4949
overflow: hidden;
50-
transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
50+
transition:
51+
max-height 0.3s ease-out,
52+
opacity 0.2s ease-out;
5153
max-height: 500px;
5254
opacity: 1;
5355
}
@@ -144,7 +146,7 @@ <h2>Overlays</h2>
144146
<button id="clear-cache">Clear cache</button>
145147
</div>
146148
<div id="message"></div>
147-
<div id="confirm-modal" class="modal" style="display: none;">
149+
<div id="confirm-modal" class="modal" style="display: none">
148150
<div class="modal-content">
149151
<h3>Clear Cache?</h3>
150152
<p>This will permanently delete all cached ratings. Are you sure?</p>

0 commit comments

Comments
 (0)