Skip to content

Move unsafe-inline scripts to listeners#1215

Draft
Atomic-Germ wants to merge 2 commits into
TTLApp:mainfrom
Atomic-Germ:fix/move-js-to-listeners
Draft

Move unsafe-inline scripts to listeners#1215
Atomic-Germ wants to merge 2 commits into
TTLApp:mainfrom
Atomic-Germ:fix/move-js-to-listeners

Conversation

@Atomic-Germ

Copy link
Copy Markdown
Contributor

Context / Background

Right now, the logic that corrects inputs in the preferences pane is done in unsafe-inline scripts, which electron complains about due to security policy.

What change is being introduced by this PR?

I've moved the inlines into listeners in preferences.js, and a adjusted a couple existing ones.

How will this be tested?

Open up the devtools, change an option, and you shouldn't get any content security warnings.

@codecov

codecov Bot commented Jun 6, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/preferences.js 50.00% 7 Missing ⚠️
Files with missing lines Coverage Δ
src/preferences.js 86.53% <50.00%> (+0.27%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/preferences.js
{
const entry = convertTimeFormat(this.value);
this.value = entry;
changeValue(this.name, entry);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about this call?

@tupaschoal

Copy link
Copy Markdown
Collaborator

Moving to draft until issue is answered

@tupaschoal
tupaschoal marked this pull request as draft July 1, 2025 10:57
@Atomic-Germ
Atomic-Germ force-pushed the fix/move-js-to-listeners branch from c2056cd to a2184a1 Compare August 25, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants