2017-11-10 12:39:55 +01:00
|
|
|
{{define "file_viewer"}}
|
|
|
|
<!DOCTYPE html>
|
2020-01-17 20:32:21 +01:00
|
|
|
<html lang="en">
|
2017-11-10 12:39:55 +01:00
|
|
|
<head>
|
2017-12-12 23:33:41 +01:00
|
|
|
<title>{{.Title}}</title>
|
2017-11-10 12:39:55 +01:00
|
|
|
<meta charset="UTF-8"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
2019-02-18 13:41:50 +01:00
|
|
|
{{template "user_style" .}}
|
2020-10-28 19:09:22 +01:00
|
|
|
|
|
|
|
<link rel="icon" sizes="32x32" href="/res/img/pixeldrain_32.png" />
|
|
|
|
<link rel="icon" sizes="128x128" href="/res/img/pixeldrain_128.png" />
|
|
|
|
<link rel="icon" sizes="152x152" href="/res/img/pixeldrain_152.png" />
|
|
|
|
<link rel="icon" sizes="180x180" href="/res/img/pixeldrain_180.png" />
|
|
|
|
<link rel="icon" sizes="192x192" href="/res/img/pixeldrain_192.png" />
|
|
|
|
<link rel="icon" sizes="196x196" href="/res/img/pixeldrain_196.png" />
|
|
|
|
<link rel="icon" sizes="256x256" href="/res/img/pixeldrain_256.png" />
|
|
|
|
<link rel="apple-touch-icon" sizes="152x152" href="/res/img/pixeldrain_152.png" />
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/res/img/pixeldrain_180.png" />
|
|
|
|
<link rel="shortcut icon" sizes="196x196" href="/res/img/pixeldrain_196.png" />
|
2019-07-06 19:58:47 +02:00
|
|
|
<meta name="theme-color" content="#75AD38"/>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2019-12-23 23:56:57 +01:00
|
|
|
<style>
|
|
|
|
{{template `viewer.css`}}
|
2020-02-18 14:57:27 +01:00
|
|
|
{{template `modal.css`}}
|
2019-12-23 23:56:57 +01:00
|
|
|
</style>
|
2018-09-11 21:35:44 +02:00
|
|
|
|
2019-12-23 23:56:57 +01:00
|
|
|
{{.OGData}}
|
2017-11-10 12:39:55 +01:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2019-07-17 23:19:57 +02:00
|
|
|
<div id="file_viewer" class="file_viewer">
|
2019-11-21 20:25:06 +01:00
|
|
|
<div id="file_viewer_headerbar" class="highlight_1 file_viewer_headerbar">
|
2020-10-19 18:10:54 +02:00
|
|
|
<button id="btn_toggle_toolbar" class="button_toggle_toolbar"><i class="icon">menu</i></button>
|
2019-07-17 23:19:57 +02:00
|
|
|
<a href="/" id="button_home" class="button button_home">
|
2020-01-27 16:56:16 +01:00
|
|
|
{{template `pixeldrain.svg` .}}
|
2019-07-17 23:19:57 +02:00
|
|
|
</a>
|
2019-09-18 22:23:12 +02:00
|
|
|
<div id="file_viewer_headerbar_title" class="file_viewer_headerbar_title">
|
|
|
|
<div id="file_viewer_list_title"></div>
|
2020-10-20 10:48:52 +02:00
|
|
|
<div id="file_viewer_file_title">loading...</div>
|
2019-09-18 22:23:12 +02:00
|
|
|
</div>
|
2019-07-17 23:19:57 +02:00
|
|
|
</div>
|
2019-07-18 19:53:09 +02:00
|
|
|
<div id="list_navigator" class="list_navigator"></div>
|
2019-07-17 23:19:57 +02:00
|
|
|
<div id="file_viewer_window" class="file_viewer_window">
|
2020-01-14 17:10:03 +01:00
|
|
|
<div id="toolbar" class="file_viewer_toolbar"><div><div>
|
|
|
|
<div id="stat_views_label" class="toolbar_label">Views</div>
|
|
|
|
<div id="stat_views" style="text-align: center;">N/A</div>
|
|
|
|
<div id="stat_downloads_label" class="toolbar_label">Downloads</div>
|
|
|
|
<div id="stat_downloads" style="text-align: center;">N/A</div>
|
2020-01-21 17:01:26 +01:00
|
|
|
<div id="stat_size_label" class="toolbar_label">Size</div>
|
|
|
|
<div id="stat_size" style="text-align: center;">N/A</div>
|
2019-07-17 23:19:57 +02:00
|
|
|
|
2020-01-20 19:55:51 +01:00
|
|
|
<button id="btn_download" class="toolbar_button button_full_width">
|
2020-02-18 14:57:27 +01:00
|
|
|
<i class="icon">save</i>
|
2020-01-14 17:10:03 +01:00
|
|
|
<span>Download</span>
|
|
|
|
</button>
|
2020-02-18 14:57:27 +01:00
|
|
|
<button id="btn_download_list" class="toolbar_button button_full_width" style="display: none;">
|
|
|
|
<i class="icon">save</i>
|
2020-01-14 17:10:03 +01:00
|
|
|
<span>DL all files</span>
|
|
|
|
</button>
|
2020-01-20 19:55:51 +01:00
|
|
|
<button id="btn_copy" class="toolbar_button button_full_width">
|
2020-02-18 14:57:27 +01:00
|
|
|
<i class="icon">content_copy</i>
|
2020-01-14 17:10:03 +01:00
|
|
|
<span><u>C</u>opy Link</span>
|
|
|
|
</button>
|
2020-01-20 19:55:51 +01:00
|
|
|
<button id="btn_share" class="toolbar_button button_full_width">
|
2020-02-18 14:57:27 +01:00
|
|
|
<i class="icon">share</i>
|
2020-01-14 17:10:03 +01:00
|
|
|
<span>Share</span>
|
|
|
|
</button>
|
2020-02-18 14:57:27 +01:00
|
|
|
<button id="btn_shuffle" class="toolbar_button button_full_width" style="display: none;">
|
|
|
|
<i class="icon">shuffle</i>
|
2020-01-14 17:10:03 +01:00
|
|
|
<span>Shuffle ☐</span>
|
|
|
|
</button>
|
2020-01-20 19:55:51 +01:00
|
|
|
<button id="btn_details" class="toolbar_button button_full_width">
|
2020-02-18 14:57:27 +01:00
|
|
|
<i class="icon">help</i>
|
2020-01-14 17:10:03 +01:00
|
|
|
<span>Deta<u>i</u>ls</span>
|
|
|
|
</button>
|
2020-02-18 14:57:27 +01:00
|
|
|
<button id="btn_edit" class="toolbar_button button_full_width" style="display: none;">
|
|
|
|
<i class="icon">edit</i>
|
|
|
|
<span><u>E</u>dit</span>
|
|
|
|
</button>
|
2020-06-07 21:12:48 +02:00
|
|
|
<br/>
|
|
|
|
|
2020-10-27 11:26:41 +01:00
|
|
|
{{ if and .Other.FileAdsEnabled .Other.UserAdsEnabled }}
|
2020-06-07 21:12:48 +02:00
|
|
|
<hr/>
|
|
|
|
<!-- <div id="brave_ref" style="text-align: center; padding: 2px;"> -->
|
|
|
|
{{if ne (isBrave .UserAgent) true}}
|
|
|
|
Use the Brave web browser for a faster and safer web!<br/>
|
|
|
|
<a href="https://brave.com/pix009" id="btnBrave" class="button toolbar_button button_full_width button_highlight">
|
|
|
|
<img src="{{template `brave_lion.png`}}" alt="Brave lion"/>
|
|
|
|
<span>Get Brave</span>
|
|
|
|
</a>
|
|
|
|
<br/>
|
2020-11-04 20:58:37 +01:00
|
|
|
or <a href="/brave">learn why pixeldrain supports Brave</a>
|
2020-06-07 21:12:48 +02:00
|
|
|
{{else}}
|
|
|
|
Thank you for using Brave! Please consider supporting pixeldrain with a tip
|
|
|
|
<img src="{{template `bat_logo_color.png`}}" style="height: 1em; width: 1em;" />
|
|
|
|
{{end}}
|
|
|
|
<!-- </div> -->
|
|
|
|
<br/>
|
|
|
|
{{end}}
|
2019-07-17 23:19:57 +02:00
|
|
|
|
2020-01-14 17:10:03 +01:00
|
|
|
<!-- This frame will load the download URL when a download button is pressed -->
|
|
|
|
<iframe id="download_frame" style="display: none; width: 1px; height: 1px;"></iframe>
|
|
|
|
</div></div></div>
|
2017-11-10 12:39:55 +01:00
|
|
|
|
2019-07-17 23:19:57 +02:00
|
|
|
<div id="sharebar" class="file_viewer_sharebar">
|
|
|
|
Share on:<br/>
|
2020-01-17 20:32:21 +01:00
|
|
|
<button class="sharebar-button button_full_width" onclick="window.open('mailto:please@set.address?subject=File%20on%20pixeldrain&body=' + window.location.href);">
|
2020-01-14 17:10:03 +01:00
|
|
|
{{template `email.svg` .}}<br/>E-Mail
|
2017-11-10 12:39:55 +01:00
|
|
|
</button>
|
2019-07-17 23:19:57 +02:00
|
|
|
<button class="sharebar-button button_full_width" onclick="window.open('https://www.reddit.com/submit?url=' + window.location.href);">
|
2020-01-14 17:10:03 +01:00
|
|
|
{{template `reddit.svg` .}}<br/>Reddit
|
2017-11-10 12:39:55 +01:00
|
|
|
</button>
|
2020-01-14 17:10:03 +01:00
|
|
|
<button class="sharebar-button button_full_width" onclick="window.open('https://twitter.com/share?url=' + window.location.href);">
|
|
|
|
{{template `twitter.svg` .}}<br/>Twitter
|
2017-11-10 12:39:55 +01:00
|
|
|
</button>
|
2020-01-14 17:10:03 +01:00
|
|
|
<button class="sharebar-button button_full_width" onclick="window.open('http://www.facebook.com/sharer.php?u=' + window.location.href);">
|
|
|
|
{{template `facebook.svg` .}}<br/>Facebook
|
2019-07-17 23:19:57 +02:00
|
|
|
</button>
|
2020-01-14 17:10:03 +01:00
|
|
|
<button class="sharebar-button button_full_width" onclick="window.open('http://www.tumblr.com/share/link?url=' + window.location.href);">
|
|
|
|
{{template `tumblr.svg` .}}<br/>Tumblr
|
2019-07-17 23:19:57 +02:00
|
|
|
</button>
|
|
|
|
</div>
|
2017-11-10 12:39:55 +01:00
|
|
|
|
2019-07-17 23:19:57 +02:00
|
|
|
<div id="filepreview" class="file_viewer_file_preview">
|
2020-01-21 15:33:09 +01:00
|
|
|
<div class="center" style="width: 100px; height: 100px;">{{template "spinner.svg" .}}</div>
|
2017-11-10 12:39:55 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-21 13:14:21 +01:00
|
|
|
|
|
|
|
<div id="sponsors" class="sponsors">
|
2020-10-27 11:26:41 +01:00
|
|
|
{{ if and .Other.FileAdsEnabled .Other.UserAdsEnabled }}
|
2020-10-27 10:32:28 +01:00
|
|
|
{{if eq .Other.AdType 0}}
|
|
|
|
<!-- scrolling="no" is not allowed by the W3C, but overflow: hidden doesn't work in chrome, so I have no choice -->
|
|
|
|
<iframe class="sponsors_banner"
|
|
|
|
data-aa="73974"
|
|
|
|
src="//ad.a-ads.com/73974?size=728x90&background_color={{.Style.Layer1Color.RGB}}&text_color={{.Style.TextColor.RGB}}&title_color={{.Style.HighlightColor.RGB}}&title_hover_color={{.Style.HighlightColor.RGB}}&link_color={{.Style.HighlightColor.RGB}}&link_hover_color={{.Style.HighlightColor.RGB}}"
|
|
|
|
style="width:728px; height:90px; border:none; padding:0; overflow:hidden;"
|
|
|
|
scrolling="no">
|
|
|
|
</iframe>
|
|
|
|
{{else if eq .Other.AdType 1}}
|
|
|
|
<a class="sponsors_banner" style="display: inline-block; width: 576px; height: 96px;" href="/click/DtZ3hHT9?target=https%3A%2F%2Fwww.amarula-electronics.com">
|
|
|
|
<img src="/res/img/misc/banner_as.png" style="width: 100%; height: 100%" />
|
|
|
|
</a>
|
|
|
|
{{else if eq .Other.AdType 2}}
|
|
|
|
<div style="text-align: center; line-height: 22px; font-size: 18px;">
|
|
|
|
<div style="margin: 4px 8px; display: inline-block; vertical-align: middle;">
|
|
|
|
Pixeldrain needs money to survive<br/>
|
|
|
|
<a href="/click/7wy9gg2J?target=%2Fsubscribe" class="button button_highlight">
|
|
|
|
Support me on Patreon and get some neat perks
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div style="margin: 4px 8px; display: inline-block; vertical-align: middle; text-align: left;">
|
|
|
|
No ads when viewing files<br/>
|
|
|
|
No ads on your uploaded files<br/>
|
|
|
|
Longer file retention<br/>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
{{else if eq .Other.AdType 3}}
|
|
|
|
<a class="sponsors_banner" style="display: inline-block; width: 842px; height: 125px;" href="/click/RJRbh7Tn?target=https%3A%2F%2Fsoulstudio.nl%2Fonline-y">
|
|
|
|
<img src="/res/img/misc/banner_soul_studio.png" style="width: 100%; height: 100%" />
|
|
|
|
</a>
|
|
|
|
{{else if eq .Other.AdType 4}}
|
2020-11-11 23:45:27 +01:00
|
|
|
<a class="sponsors_banner" style="display: inline-block; width: 576px; height: 96px;" href="/click/DtZ3hHT9?target=https%3A%2F%2Fwww.amarulasolutions.com/jobs">
|
|
|
|
<img src="/res/img/misc/banner_amarula_jobs.png" style="width: 100%; height: 100%" />
|
2020-10-27 10:32:28 +01:00
|
|
|
</a>
|
|
|
|
{{ else if eq .Other.AdType 6}}
|
|
|
|
<div id="348416176"></div>
|
|
|
|
{{ else if eq .Other.AdType 7}}
|
|
|
|
<iframe class="sponsors_banner" src="/ad/revenuehits" style="width:728px; height:90px; border:none; padding:0; overflow:hidden;" scrolling="no"></iframe>
|
2020-11-04 20:51:39 +01:00
|
|
|
{{ else if eq .Other.AdType 8}}
|
2020-11-08 16:10:11 +01:00
|
|
|
<a class="sponsors_banner" style="display: inline-block; width: 728px; height: 90px;" href="https://brave.com/pix009">
|
2020-11-04 20:51:39 +01:00
|
|
|
<img src="/res/img/misc/brave-728x90.png" style="width: 100%; height: 100%" />
|
|
|
|
</a>
|
2020-10-27 10:32:28 +01:00
|
|
|
{{end}}
|
2020-10-27 11:26:41 +01:00
|
|
|
{{ else if not .Other.UserAdsEnabled }}
|
|
|
|
<div style="text-align: center; line-height: 1.3em; font-size: 13px;">
|
|
|
|
Thank you for supporting pixeldrain!
|
|
|
|
</div>
|
|
|
|
{{ else if not .Other.FileAdsEnabled }}
|
|
|
|
<div style="text-align: center; line-height: 1.3em; font-size: 13px;">
|
2020-10-27 10:32:28 +01:00
|
|
|
The uploader of this file disabled advertisements. You can do the same for <a href="/subscribe">only €2 per month</a>!
|
|
|
|
</div>
|
2020-05-24 14:23:03 +02:00
|
|
|
{{end}}
|
2020-02-21 13:14:21 +01:00
|
|
|
</div>
|
2020-02-18 14:57:27 +01:00
|
|
|
</div>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2020-02-18 14:57:27 +01:00
|
|
|
<template id="tpl_details_popup">
|
|
|
|
<table class="info_file_details" style="min-width: 100%;"></table>
|
|
|
|
|
|
|
|
<div class="info_about">
|
2020-08-11 19:52:03 +02:00
|
|
|
<h3>Downloads</h3>
|
2020-08-11 20:13:42 +02:00
|
|
|
<div class="chart-container" style="position: relative; width: 100%; height: 150px;">
|
2020-08-11 19:52:03 +02:00
|
|
|
<canvas id="downloads_chart"></canvas>
|
|
|
|
</div>
|
|
|
|
<h3>Views</h3>
|
2020-08-11 20:13:42 +02:00
|
|
|
<div class="chart-container" style="position: relative; width: 100%; height: 150px;">
|
2020-08-11 19:52:03 +02:00
|
|
|
<canvas id="views_chart"></canvas>
|
2020-01-17 20:32:21 +01:00
|
|
|
</div>
|
2020-02-18 14:57:27 +01:00
|
|
|
<p style="text-align: center">
|
2020-08-11 19:52:03 +02:00
|
|
|
Charts rendered by the amazing <a href="https://www.chartjs.org/" target="_blank">Chart.js</a>.
|
2020-02-18 14:57:27 +01:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3>About</h3>
|
|
|
|
Pixeldrain is a file sharing platform.
|
|
|
|
<a href="/" target="_blank">Visit the home page for more information.</a>
|
|
|
|
|
|
|
|
<h3>Keyboard Controls</h3>
|
|
|
|
<table style="max-width: 100%;">
|
|
|
|
<tr><td colspan="2">File Shortcuts</td></tr>
|
|
|
|
<tr><td>c</td><td> = Copy URL of this page</td></tr>
|
|
|
|
<tr><td>i</td><td> = Toggle details window (this window) (<b><u>i</u></b>nfo)</td></tr>
|
|
|
|
<tr><td>s</td><td> = Download the file you are currently viewing (<b><u>s</u></b>ave)</td></tr>
|
|
|
|
<tr><td>q</td><td> = Close the window (<b><u>q</u></b>uit)</td></tr>
|
|
|
|
<tr><td colspan="2">List Shortcuts</td></tr>
|
|
|
|
<tr><td>a or ←</td><td> = View previous item in list</td></tr>
|
|
|
|
<tr><td>d or →</td><td> = View next item in list</td></tr>
|
|
|
|
<tr><td>r</td><td> = Toggle shuffle (<b><u>r</u></b>andom)</td></tr>
|
|
|
|
<tr><td>SHIFT + s</td><td> = Download all the files in the list as a zip archive</td></tr>
|
|
|
|
</table>
|
2019-07-07 22:34:20 +02:00
|
|
|
</div>
|
2020-02-18 14:57:27 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<template id="tpl_edit_file">
|
|
|
|
<h3>Delete file</h3>
|
|
|
|
<p>
|
|
|
|
When you delete a file it cannot be recovered.
|
|
|
|
Nobody will be able to download it and the link will
|
|
|
|
stop working. The file will also disappear from any
|
|
|
|
lists it's contained in.
|
|
|
|
</p>
|
|
|
|
<div style="text-align: center;">
|
|
|
|
<button class="button_red btn_delete_file">
|
|
|
|
<i class="icon small">delete</i> Delete this file
|
|
|
|
</button>
|
2020-01-23 09:42:28 +01:00
|
|
|
</div>
|
2020-02-18 14:57:27 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<template id="tpl_captcha_popup">
|
|
|
|
<div class="captcha_text"></div>
|
|
|
|
<br/>
|
|
|
|
<div class="captcha_popup_captcha" style="text-align: center;"></div>
|
|
|
|
</template>
|
2018-07-09 23:19:16 +02:00
|
|
|
|
2019-12-23 23:56:57 +01:00
|
|
|
<script src="/res/script/Chart.min.js"></script>
|
2020-01-17 20:32:21 +01:00
|
|
|
<script>
|
2020-01-27 16:56:16 +01:00
|
|
|
'use strict';
|
|
|
|
let apiEndpoint = '{{.APIEndpoint}}';
|
|
|
|
let captchaKey = '{{.Other.CaptchaKey}}';
|
2020-08-11 19:52:03 +02:00
|
|
|
let highlightColor = '#{{.Style.HighlightColor.RGB}}';
|
2020-01-20 19:55:51 +01:00
|
|
|
{{template `util.js`}}
|
2020-08-11 19:52:03 +02:00
|
|
|
{{template `drawGraph.js`}}
|
2020-02-18 14:57:27 +01:00
|
|
|
{{template `Modal.js`}}
|
2019-12-23 23:56:57 +01:00
|
|
|
{{template `Toolbar.js`}}
|
2020-02-18 14:57:27 +01:00
|
|
|
{{template `EditWindow.js`}}
|
2020-01-20 19:55:51 +01:00
|
|
|
{{template `DetailsWindow.js`}}
|
2019-12-23 23:56:57 +01:00
|
|
|
{{template `ListNavigator.js`}}
|
2020-01-20 19:55:51 +01:00
|
|
|
{{template `Viewer.js`}}
|
|
|
|
|
2020-07-16 17:24:03 +02:00
|
|
|
{{template `AbuseViewer.js`}}
|
2020-01-20 19:55:51 +01:00
|
|
|
{{template `ImageViewer.js`}}
|
|
|
|
{{template `VideoViewer.js`}}
|
|
|
|
{{template `AudioViewer.js`}}
|
2020-01-21 15:33:09 +01:00
|
|
|
{{template `PDFViewer.js`}}
|
|
|
|
{{template `TextViewer.js`}}
|
|
|
|
{{template `FileViewer.js`}}
|
2019-12-23 23:56:57 +01:00
|
|
|
|
2017-11-10 12:39:55 +01:00
|
|
|
// This info gets filled in on the server side to prevent having to make an API call right after the page loads.
|
|
|
|
// Just to slice another few milliseconds from the load time :)
|
2019-08-10 14:15:54 +02:00
|
|
|
window.addEventListener("load", function(){
|
2020-01-21 15:33:09 +01:00
|
|
|
new Viewer('{{.Other.Type}}', '{{.Other.ViewToken}}', {{.Other.APIResponse}});
|
2019-08-10 14:15:54 +02:00
|
|
|
});
|
2017-11-10 12:39:55 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{{template "analytics"}}
|
2020-10-26 11:42:08 +01:00
|
|
|
|
2020-10-27 11:26:41 +01:00
|
|
|
{{ if and .Other.FileAdsEnabled .Other.UserAdsEnabled }}
|
2020-10-27 08:25:03 +01:00
|
|
|
{{ if eq .Other.AdType 5 }}
|
2020-10-26 11:42:08 +01:00
|
|
|
<script data-cfasync="false" defer src="//d227cncaprzd7y.cloudfront.net/?acncd=905608"></script>
|
2020-10-27 08:25:03 +01:00
|
|
|
{{ else if eq .Other.AdType 6}}
|
|
|
|
<script type="text/javascript">
|
|
|
|
window._mNHandle = window._mNHandle || {};
|
|
|
|
window._mNHandle.queue = window._mNHandle.queue || [];
|
|
|
|
medianet_versionId = "3121199";
|
|
|
|
</script>
|
|
|
|
<script src="https://contextual.media.net/dmedianet.js?cid=8CU832SZI" async="async"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
try {
|
|
|
|
window._mNHandle.queue.push(function (){
|
|
|
|
window._mNDetails.loadTag("348416176", "728x90", "348416176");
|
|
|
|
});
|
|
|
|
} catch (error) {}
|
|
|
|
</script>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2017-11-10 12:39:55 +01:00
|
|
|
</body>
|
|
|
|
</html>
|
2018-07-09 23:19:16 +02:00
|
|
|
{{end}}
|