Merge pull request #21534 from Snuffleupagus/addPasteButton-#getPageL10nArgs

Use the `#getPageL10nArgs` helper in the `PDFThumbnailView.prototype.addPasteButton` method
This commit is contained in:
Tim van der Meij 2026-07-03 20:11:49 +02:00 committed by GitHub
commit e414f74375
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);