This commit is contained in:
Vanessa 2024-11-22 22:06:01 +08:00
parent 36bd3816d4
commit 703fda3812
2 changed files with 6 additions and 2 deletions

View file

@ -316,13 +316,14 @@ function renderProgress(index, total) {
progressPerc.setAttribute("data-l10n-args", JSON.stringify({ progress }));
}
/* NOTE
window.addEventListener(
"keydown",
function (event) {
// Intercept Cmd/Ctrl + P in all browsers.
// Also intercept Cmd/Ctrl + Shift + P in Chrome and Opera
if (
event.keyCode === /* P= */ 80 &&
event.keyCode === 80 &&
(event.ctrlKey || event.metaKey) &&
!event.altKey &&
(!event.shiftKey || window.chrome || window.opera)
@ -334,7 +335,7 @@ window.addEventListener(
}
},
true
);
);*/
if ("onbeforeprint" in window) {
// Do not propagate before/afterprint events when they are not triggered

View file

@ -17,6 +17,9 @@ export const escapeAttr = (html: string) => {
};
export const escapeAriaLabel = (html: string) => {
if (!html) {
return html;
}
return html.replace(/"/g, """).replace(/'/g, "'")
.replace(/</g, "&amp;lt;").replace(/&lt;/g, "&amp;lt;");
};