Skip to content

Commit 86acb6c

Browse files
committed
[PostViewer] Match the vanilla site UI
1 parent 2413d13 commit 86acb6c

File tree

2 files changed

+8
-29
lines changed

2 files changed

+8
-29
lines changed

src/js/modules/post/DownloadCustomizer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export class DownloadCustomizer extends RE6Module {
4343

4444
this.post = Post.getViewingPost();
4545

46-
const downloadContainer = $("<div>")
47-
.addClass("ptbr-download")
48-
.appendTo("#ptbr-wrapper");
46+
const downloadContainer = $(".ptbr-etc-menu");
47+
48+
downloadContainer.find(".ptbr-etc-download").hide();
4949

5050
const link = $("<a>")
5151
.attr({

src/js/modules/post/PostViewer.ts

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -132,34 +132,13 @@ export class PostViewer extends RE6Module {
132132

133133
this.post = Post.getViewingPost();
134134

135-
// Move the add to set / pool buttons
136-
const $addToContainer = $("<div>")
137-
.addClass("ptbr-add-links")
138-
.insertAfter($(".ptbr-fullscreen").first());
139-
$("li#add-to-set-list > a")
140-
.addClass("image-add-set")
141-
.addClass("st-button kinetic")
142-
.html("+ Set")
143-
.appendTo($addToContainer);
144-
$("li#add-to-pool-list > a")
145-
.addClass("image-add-pool")
146-
.addClass("st-button kinetic")
147-
.html("+ Pool")
148-
.appendTo($addToContainer);
149-
if ($addToContainer.children().length == 0) {
150-
$addToContainer.css("display", "none");
151-
}
152-
153135
// Add a new note button
154-
$("#translate")
155-
.insertAfter($(".ptbr-resize").first())
136+
const translateButton = $("#translate");
137+
translateButton.parents("#add-notes-list").hide();
138+
139+
translateButton.insertBefore($(".ptbr-resize").first())
156140
.addClass("st-button kinetic")
157-
.html("+ Note")
158-
.on("click", async () => {
159-
if (!await Danbooru.Note.TranslationMode.active()) return;
160-
$("#note-container").removeClass("hidden");
161-
$(".ptbr-notes-button").attr("enabled", "true");
162-
});
141+
.html("+ Note");
163142

164143

165144
// Move child/parent indicator, leave others as is, like marked for deletion

0 commit comments

Comments
 (0)