upload.load.need('js/dragresize.js', function() { return window.dragresize }) upload.modules.addmodule({ name: 'download', delkeys: {}, // Dear santa, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings template: '\
\ ', init: function () { $(document).on('click', '#editpaste', this.editpaste.bind(this)) }, route: function (route, content) { if (content != 'noref') { return this } }, render: function (view) { view.html(this.template) this._ = {} this._.view = view this._.detailsarea = view.find('#downloaddetails') this._.filename = view.find('#downloaded_filename') this._.btns = view.find('#btnarea') this._.deletebtn = view.find('#deletebtn') this._.dlbtn = view.find('#dlbtn') this._.nextbtn = view.find('#nextbtn') this._.prevbtn = view.find('#prevbtn') this._.viewbtn = view.find('#inbrowserbtn') this._.viewswitcher = view.find('.viewswitcher') this._.newupload = view.find('#newupload') this._.editpaste = view.find('#editpaste') this._.dlarea = view.find('#dlarea') this._.title = $('title') $('#footer').hide() }, initroute: function (content, contentroot) { contentroot = contentroot ? contentroot : content this._.nextbtn.hide() this._.prevbtn.hide() if (contentroot.indexOf('&') > -1) { var which = 0 var values = contentroot.split('&') var howmany = values.length if (content != contentroot) { which = parseInt(content) - 1 } content = values[which] this._.nextbtn.attr('href', '#' + contentroot + '/' + (which + 2)) this._.prevbtn.attr('href', '#' + contentroot + '/' + (which)) if (!(which >= howmany - 1)) { this._.nextbtn.show() } if (!(which <= 0)) { this._.prevbtn.show() } } console.log(contentroot) delete this._['text'] this._.filename.hide() this._.title.text("Up1") this._.btns.hide() this._.editpaste.hide() this._.newupload.hide() this._.content = {} this._.content.main = this._.content.loading = $(' \ \').appendTo(textcontent)
var code = $('').appendTo(pre)
var fr = new FileReader()
fr.onload = function () {
var text = fr.result
this._.text = {}
this._.text.header = data.header
this._.text.data = text
code.text(text)
hljs.highlightBlock(code[0])
this.setupLineNumbers(code)
}.bind(this)
fr.readAsText(data.decrypted)
this._.editpaste.show()
} else if (association == 'video') {
$('').addClass('preview centerable').append($('