2020-07-16 17:24:03 +02:00
|
|
|
function AbuseViewer(viewer, file, next) {
|
|
|
|
this.viewer = viewer
|
2021-05-17 11:16:20 +02:00
|
|
|
this.file = file
|
|
|
|
this.next = next
|
2020-07-16 17:24:03 +02:00
|
|
|
|
|
|
|
this.container = document.createElement("div")
|
|
|
|
this.container.classList = "image-container"
|
|
|
|
this.container.appendChild(document.createElement("br"))
|
|
|
|
|
|
|
|
this.title = document.createElement("h1")
|
|
|
|
this.title.innerText = "Unavailable For Legal Reasons"
|
|
|
|
this.container.appendChild(this.title)
|
|
|
|
|
|
|
|
this.description = document.createElement("p")
|
2021-05-17 11:16:20 +02:00
|
|
|
this.description.innerText = "This file has received an abuse report and " +
|
2020-07-16 17:24:03 +02:00
|
|
|
"was taken down."
|
|
|
|
this.container.appendChild(this.description)
|
|
|
|
|
|
|
|
this.description2 = document.createElement("p")
|
2021-05-17 11:16:20 +02:00
|
|
|
this.description2.innerText = "Type of abuse: " + file.abuse_type + ". " +
|
|
|
|
"Reporter: " + file.abuse_reporter_name + "."
|
2020-07-16 17:24:03 +02:00
|
|
|
this.container.appendChild(this.description2)
|
|
|
|
}
|
|
|
|
|
2021-05-17 11:16:20 +02:00
|
|
|
AbuseViewer.prototype.render = function (parent) {
|
2020-07-16 17:24:03 +02:00
|
|
|
parent.appendChild(this.container)
|
2020-08-02 17:52:25 +02:00
|
|
|
|
|
|
|
// Disable the download button
|
|
|
|
this.btnDownloadDisplay = this.viewer.toolbar.btnDownload.style.display
|
|
|
|
this.viewer.toolbar.btnDownload.style.display = "none"
|
|
|
|
}
|
|
|
|
|
2021-05-17 11:16:20 +02:00
|
|
|
AbuseViewer.prototype.destroy = function (parent) {
|
2020-08-02 17:52:25 +02:00
|
|
|
// Restore the download button
|
|
|
|
this.viewer.toolbar.btnDownload.style.display = this.btnDownloadDisplay
|
2020-07-16 17:24:03 +02:00
|
|
|
}
|