Skip to content

Commit

Permalink
more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbenz committed Aug 23, 2024
1 parent 8a310ca commit d576e16
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { nodeResolve } from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import { nodeResolve } from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

export default {
input: "scripts/extract-content.js",
input: 'scripts/extract-content.js',
output: {
dir: "dist/scripts",
format: "cjs",
dir: 'dist/scripts',
format: 'cjs'
},
plugins: [commonjs(), nodeResolve()],
plugins: [commonjs(), nodeResolve()]
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
--bg-error: #f89696;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
color: #1f1f1f;
background-color: #fffbff;
font-size: 16px;
Expand All @@ -29,7 +29,7 @@ body {
}

.speech-bubble:after {
content: "";
content: '';
position: absolute;
bottom: 0;
left: 50%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ async function onContentChange(newContent) {
}
showSummary('Loading...');
summary = await generateSummary(newContent);
summary = escapeHTML(summary);
} else {
summary = "There's nothing to summarize";
}
Expand Down Expand Up @@ -99,17 +98,3 @@ async function updateWarning(warning) {
warningElement.setAttribute('hidden', '');
}
}

function escapeHTML(str) {
return str.replace(
/[&<>'"]/g,
(tag) =>
({
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
"'": '&#39;',
'"': '&quot;'
})[tag] || tag
);
}

0 comments on commit d576e16

Please sign in to comment.