mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-07-04 22:25:50 +02:00
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:
parent
0cc1718b02
commit
0c076f5f0b
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user