Use the #getPageL10nArgs helper in the PDFThumbnailView.prototype.addPasteButton method

Rather than effectively duplicating code, we can re-use the existing helper here as well.
This commit is contained in:
Jonas Jenwald 2026-07-03 16:18:25 +02:00
parent 0cc1718b02
commit 0c076f5f0b

View File

@ -171,12 +171,7 @@ class PDFThumbnailView extends RenderableView {
"data-l10n-id",
"pdfjs-views-manager-paste-button-after"
);
pasteButton.setAttribute(
"data-l10n-args",
JSON.stringify({
page: this.pageLabel ?? this.id,
})
);
pasteButton.setAttribute("data-l10n-args", this.#getPageL10nArgs());
const span = document.createElement("span");
span.setAttribute("data-l10n-id", "pdfjs-views-manager-paste-button-label");
pasteButton.append(span);