Add some files to get started
31 |Add some files to get started
31 |=y&&(s=t[B=4*C],u=t[B+1],h=t[B+2],c=257*((d=s>=u&&s>=h?s:u>=s&&u>=h?u:h)+(l=s<=u&&s<=h?s:u<=s&&u<=h?u:h))>>1,l===d?f=g=0:(g=c<=32767?4095*(d-l)/(d+l)|0:4095*(d-l)/(510-d-l)|0,f=s===d?65535*(u-h)/(6*(d-l))|0:u===d?21845+(65535*(h-s)/(6*(d-l))|0):43690+(65535*(s-u)/(6*(d-l))|0)),(c+=_*w+2048>>12)>65535?c=65535:c<0&&(c=0),0===g?s=u=h=c>>8:(I=2*c-(m=c<=32767?c*(4096+g)+2048>>12:c+((65535-c)*g+2048>>12))>>8,m>>=8,s=(p=f+21845&65535)>=43690?I:p>=32767?I+(6*(m-I)*(43690-p)+32768>>16):p>=10922?m:I+(6*(m-I)*p+32768>>16),u=(p=65535&f)>=43690?I:p>=32767?I+(6*(m-I)*(43690-p)+32768>>16):p>=10922?m:I+(6*(m-I)*p+32768>>16),h=(p=f-21845&65535)>=43690?I:p>=32767?I+(6*(m-I)*(43690-p)+32768>>16):p>=10922?m:I+(6*(m-I)*p+32768>>16)),t[B]=s,t[B+1]=u,t[B+2]=h)}}},{"./hsl_l16":17,"glur/mono16":13}],20:[function(t,e,i){"use strict";e.exports=function(t,e,i,r,n,o){if(!(0===r||n<.5)){n>2&&(n=2);var A=e*i,a=4*A,s=2*A,u=2*A,h=4*Math.max(e,i),f=a,g=f+s,c=g+u,l=c+u,d=l+h,I=this.__instance("unsharp_mask",a+s+2*u+h+32,{exp:Math.exp}),m=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(m);var p=I.exports.hsl_l16||I.exports._hsl_l16;p(0,f,e,i),(p=I.exports.blurMono16||I.exports._blurMono16)(f,g,c,l,d,e,i,n),(p=I.exports.unsharp||I.exports._unsharp)(0,0,f,g,e,i,r,o),m.set(new Uint32Array(this.__memory.buffer,0,A))}}},{}],21:[function(t,e,i){"use strict";e.exports="AGFzbQ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UH/H2wgD0H+AyAIayAKayAQQYCABEkbbSEMIAYgCEYEQCAEIAVrQf//A2wgCUEGbG0MAQsgBSAGayAGIARrIAQgCEYiBhtB//8DbCAJQQZsbUHVqgFBqtUCIAYbagshCSARIAcgDWxBgBBqQQx1aiIGQQAgBkEAShsiBkH//wMgBkH//wNIGyEGAkACfwJAIAxB//8DcSIFBEAgBkH//wFKDQEgBUGAIGogBmxBgBBqQQx2DAILIAZBCHYiBiEFIAYhBAwCCyAFIAZB//8Dc2xBgBBqQQx2IAZqCyIFQQh2IQcgBkEBdCAFa0EIdiIGIQQCQCAJQdWqAWpB//8DcSIFQanVAksNACAFQf//AU8EQEGq1QIgBWsgByAGa2xBBmxBgIACakEQdiAGaiEEDAELIAchBCAFQanVAEsNACAFIAcgBmtsQQZsQYCAAmpBEHYgBmohBAsCfyAGIgUgCUH//wNxIghBqdUCSw0AGkGq1QIgCGsgByAGa2xBBmxBgIACakEQdiAGaiAIQf//AU8NABogByIFIAhBqdUASw0AGiAIIAcgBmtsQQZsQYCAAmpBEHYgBmoLIQUgCUGr1QJqQf//A3EiCEGp1QJLDQAgCEH//wFPBEBBqtUCIAhrIAcgBmtsQQZsQYCAAmpBEHYgBmohBgwBCyAIQanVAEsEQCAHIQYMAQsgCCAHIAZrbEEGbEGAgAJqQRB2IAZqIQYLIAEgBDoAACABQQFqIAU6AAAgAUECaiAGOgAACyADQQJqIQMgAkECaiECIABBBGohACABQQRqIQEgC0F/aiILDQALCwsL"},{}],22:[function(t,e,i){"use strict";var r,n=t("./base64decode");e.exports=function(){if(void 0!==r)return r;if(r=!1,"undefined"==typeof WebAssembly)return r;try{var t=new WebAssembly.Module(n("AGFzbQEAAAABBQFgAAF/Ag8BA2VudgZtZW1vcnkCAAEDAgEABAQBcAAABwoBBmRldGVjdAAACQEACgYBBABBAQs=")),e={memoryBase:0,memory:new WebAssembly.Memory({initial:1}),tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};return 1===(0,new WebAssembly.Instance(t,{env:e}).exports.detect)()&&(r=!0),r}catch(t){}return r}},{"./base64decode":16}],23:[function(t,e,i){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,a,s=r(t),u=1;u=0)}catch(t){}var l=1;"undefined"!=typeof navigator&&(l=Math.min(navigator.hardwareConcurrency||1,4));var d={tile:1024,concurrency:l,features:["js","wasm","ww"],idle:2e3},I={quality:3,alpha:!1,unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},m=void 0,p=void 0;n.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if(!1!==m&&!0!==m&&(m=!1,"undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray))try{new ImageData(new Uint8ClampedArray(400),10,10),m=!0}catch(t){}!1!==p&&!0!==p&&(p=!1,"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?p=!0:this.debug("ImageBitmap does not support .close(), disabled")));var i=this.options.features.slice();if(i.indexOf("all")>=0&&(i=["cib","wasm","js","ww"]),this.__requested_features=i,this.__mathlib=new a(i),i.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")(function(){}).terminate(),this.features.ww=!0;var n="wp_"+JSON.stringify(this.options);g[n]?this.__workersPool=g[n]:(this.__workersPool=new s(r,this.options.idle),g[n]=this.__workersPool)}catch(t){}var A=this.__mathlib.init().then(function(t){o(e.features,t.features)}),h=void 0;return h=p?u.cib_support().then(function(t){e.features.cib&&i.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):i.indexOf("cib")>=0&&(e.features.cib=t)}):Promise.resolve(!1),this.__initPromise=Promise.all([A,h]).then(function(){return e}),this.__initPromise},n.prototype.resize=function(t,e,i){var r=this;this.debug("Start resize...");var n=I;isNaN(i)?i&&(n=o(n,i)):n=o(n,{quality:i}),n.toWidth=e.width,n.toHeigth=e.height,n.width=t.naturalWidth||t.width,n.height=t.naturalHeight||t.height;var A=!1,a=null;n.cancelToken&&(a=n.cancelToken.then(function(t){throw A=!0,t},function(t){throw A=!0,t}));var s=e.getContext("2d",{alpha:Boolean(n.alpha)});return this.init().then(function(){if(A)return a;if(r.features.cib)return r.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:n.toWidth,resizeHeight:n.toHeigth,resizeQuality:u.cib_quality_name(n.quality)}).then(function(t){if(A)return a;if(!n.unsharpAmount)return s.drawImage(t,0,0),t.close(),s=null,r.debug("Finished!"),e;r.debug("Unsharp result");var i=document.createElement("canvas");i.width=n.toWidth,i.height=n.toHeigth;var o=i.getContext("2d",{alpha:Boolean(n.alpha)});o.drawImage(t,0,0),t.close();var u=o.getImageData(0,0,n.toWidth,n.toHeigth);return r.__mathlib.unsharp(u.data,n.toWidth,n.toHeigth,n.unsharpAmount,n.unsharpRadius,n.unsharpThreshold),s.putImageData(u,0,0),u=o=i=s=null,r.debug("Finished!"),e});var i=void 0,o=void 0,h={},g=function(t){return Promise.resolve().then(function(){return r.features.ww?new Promise(function(e,i){var n=r.__workersPool.acquire();a&&a.catch(function(t){return i(t)}),n.value.onmessage=function(t){n.release(),t.data.err?i(t.data.err):e(t.data.result)},n.value.postMessage({opts:t,features:r.__requested_features,preload:{wasm_nodule:r.__mathlib.__}},[t.src.buffer])}):r.__mathlib.resizeAndUnsharp(t,h)})},l=function(e){return r.__limit(function(){if(A)return a;var h=void 0;if(u.isCanvas(t))r.debug("Get tile pixel data"),h=i.getImageData(e.x,e.y,e.width,e.height);else{r.debug("Draw tile imageBitmap/image to temporary canvas");var f=document.createElement("canvas");f.width=e.width,f.height=e.height;var l=f.getContext("2d",{alpha:Boolean(n.alpha)});l.globalCompositeOperation="copy",l.drawImage(o||t,e.x,e.y,e.width,e.height,0,0,e.width,e.height),r.debug("Get tile pixel data"),h=l.getImageData(0,0,e.width,e.height),l=f=null}var d={src:h.data,width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,quality:n.quality,alpha:n.alpha,unsharpAmount:n.unsharpAmount,unsharpRadius:n.unsharpRadius,unsharpThreshold:n.unsharpThreshold};return r.debug("Invoke resize math"),Promise.resolve().then(function(){return g(d)}).then(function(t){if(A)return a;h=null;var i=void 0;if(r.debug("Convert raw rgba tile result to ImageData"),m)i=new ImageData(new Uint8ClampedArray(t),e.toWidth,e.toHeight);else if((i=s.createImageData(e.toWidth,e.toHeight)).data.set)i.data.set(t);else for(var n=i.data.length-1;n>=0;n--)i.data[n]=t[n];return r.debug("Draw tile"),c?s.putImageData(i,e.toX,e.toY,e.toInnerX-e.toX,e.toInnerY-e.toY,e.toInnerWidth+1e-5,e.toInnerHeight+1e-5):s.putImageData(i,e.toX,e.toY,e.toInnerX-e.toX,e.toInnerY-e.toY,e.toInnerWidth,e.toInnerHeight),null})})};return Promise.resolve().then(function(){if(u.isCanvas(t))return i=t.getContext("2d",{alpha:Boolean(n.alpha)}),null;if(u.isImage(t))return p?(r.debug("Decode image via createImageBitmap"),createImageBitmap(t).then(function(t){o=t})):null;throw new Error('".from" should be image or canvas')}).then(function(){function t(){o&&(o.close(),o=null)}if(A)return a;r.debug("Calculate tiles");var i=f({width:n.width,height:n.height,srcTileSize:r.options.tile,toWidth:n.toWidth,toHeight:n.toHeigth,destTileBorder:Math.ceil(Math.max(3,2.5*n.unsharpRadius|0))}).map(function(t){return l(t)});return r.debug("Process tiles"),Promise.all(i).then(function(){return r.debug("Finished!"),t(),e},function(e){throw t(),e})})})},n.prototype.resizeBuffer=function(t){var e=this,i=o(I,t);return this.init().then(function(){return e.__mathlib.resizeAndUnsharp(i)})},n.prototype.toBlob=function(t,e,i){return e=e||"image/png",new Promise(function(r){if(t.toBlob)t.toBlob(function(t){return r(t)},e,i);else{for(var n=atob(t.toDataURL(e,i).split(",")[1]),o=n.length,A=new Uint8Array(o),a=0;a >1&1,n=0;n 0;e--)n[e]=n[e]?n[e-1]^_.EXPONENT[v._modN(_.LOG[n[e]]+t)]:n[e-1];n[0]=_.EXPONENT[v._modN(_.LOG[n[0]]+t)]}for(t=0;t<=i;t++)n[t]=_.LOG[n[t]]},_checkBadness:function(){var t,e,i,n,s,r=0,o=this._badness,a=this.buffer,h=this.width;for(s=0;s h*h;)u-=h*h,c++;for(r+=c*v.N4,n=0;n =o-2&&(t=o-2,s>9&&t--);var a=t;if(s>9){for(r[a+2]=0,r[a+3]=0;a--;)e=r[a],r[a+3]|=255&e<<4,r[a+2]=e>>4;r[2]|=255&t<<4,r[1]=t>>4,r[0]=64|t>>12}else{for(r[a+1]=0,r[a+2]=0;a--;)e=r[a],r[a+2]|=255&e<<4,r[a+1]=e>>4;r[1]|=255&t<<4,r[0]=64|t>>4}for(a=t+3-(s<10);a =5&&(i+=v.N1+n[e]-5);for(e=3;e t||3*n[e-3]>=4*n[e]||3*n[e+3]>=4*n[e])&&(i+=v.N3);return i},_finish:function(){this._stringBuffer=this.buffer.slice();var t,e,i=0,n=3e4;for(e=0;e<8&&(this._applyMask(e),(t=this._checkBadness()) >=1)1&n&&(s[r-1-e+8*r]=1,e<6?s[8+r*e]=1:s[8+r*(e+1)]=1);for(e=0;e<7;e++,n>>=1)1&n&&(s[8+r*(r-7+e)]=1,e?s[6-e+8*r]=1:s[7+8*r]=1)},_interleaveBlocks:function(){var t,e,i=this._dataBlock,n=this._ecc,s=this._eccBlock,r=0,o=this._calculateMaxLength(),a=this._neccBlock1,h=this._neccBlock2,f=this._stringBuffer;for(t=0;t1)for(t=u.BLOCK[n],i=s-7;;){for(e=s-7;e>t-3&&(this._addAlignment(e,i),!(e 6)for(t=d.BLOCK[r-7],e=17,i=0;i<6;i++)for(n=0;n<3;n++,e--)1&(e>11?r>>e-12:t>>e)?(s[5-i+o*(2-n+o-11)]=1,s[2-n+o-11+o*(5-i)]=1):(this._setMask(5-i,2-n+o-11),this._setMask(2-n+o-11,5-i))},_isMasked:function(t,e){var i=v._getMaskBit(t,e);return 1===this._mask[i]},_pack:function(){var t,e,i,n=1,s=1,r=this.width,o=r-1,a=r-1,h=(this._dataBlock+this._eccBlock)*(this._neccBlock1+this._neccBlock2)+this._neccBlock2;for(e=0;e e&&(i=t,t=e,e=i),i=e,i+=e*e,i>>=1,i+=t},_modN:function(t){for(;t>=255;)t=((t-=255)>>8)+(255&t);return t},N1:3,N2:3,N3:40,N4:10}),p=v,m=f.extend({draw:function(){this.element.src=this.qrious.toDataURL()},reset:function(){this.element.src=""},resize:function(){var t=this.element;t.width=t.height=this.qrious.size}}),g=h.extend(function(t,e,i,n){this.name=t,this.modifiable=Boolean(e),this.defaultValue=i,this._valueTransformer=n},{transform:function(t){var e=this._valueTransformer;return"function"==typeof e?e(t,this):t}}),k=h.extend(null,{abs:function(t){return null!=t?Math.abs(t):null},hasOwn:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},noop:function(){},toUpperCase:function(t){return null!=t?t.toUpperCase():null}}),w=h.extend(function(t){this.options={},t.forEach(function(t){this.options[t.name]=t},this)},{exists:function(t){return null!=this.options[t]},get:function(t,e){return w._get(this.options[t],e)},getAll:function(t){var e,i=this.options,n={};for(e in i)k.hasOwn(i,e)&&(n[e]=w._get(i[e],t));return n},init:function(t,e,i){"function"!=typeof i&&(i=k.noop);var n,s;for(n in this.options)k.hasOwn(this.options,n)&&(s=this.options[n],w._set(s,s.defaultValue,e),w._createAccessor(s,e,i));this._setAll(t,e,!0)},set:function(t,e,i){return this._set(t,e,i)},setAll:function(t,e){return this._setAll(t,e)},_set:function(t,e,i,n){var s=this.options[t];if(!s)throw new Error("Invalid option: "+t);if(!s.modifiable&&!n)throw new Error("Option cannot be modified: "+t);return w._set(s,e,i)},_setAll:function(t,e,i){if(!t)return!1;var n,s=!1;for(n in t)k.hasOwn(t,n)&&this._set(n,t[n],e,i)&&(s=!0);return s}},{_createAccessor:function(t,e,i){var n={get:function(){return w._get(t,e)}};t.modifiable&&(n.set=function(n){w._set(t,n,e)&&i(n,t)}),Object.defineProperty(e,t.name,n)},_get:function(t,e){return e["_"+t.name]},_set:function(t,e,i){var n="_"+t.name,s=i[n],r=t.transform(null!=e?e:t.defaultValue);return i[n]=r,r!==s}}),M=w,b=h.extend(function(){this._services={}},{getService:function(t){var e=this._services[t];if(!e)throw new Error("Service is not being managed with name: "+t);return e},setService:function(t,e){if(this._services[t])throw new Error("Service is already managed with name: "+t);e&&(this._services[t]=e)}}),B=new M([new g("background",!0,"white"),new g("backgroundAlpha",!0,1,k.abs),new g("element"),new g("foreground",!0,"black"),new g("foregroundAlpha",!0,1,k.abs),new g("level",!0,"L",k.toUpperCase),new g("mime",!0,"image/png"),new g("padding",!0,null,k.abs),new g("size",!0,100,k.abs),new g("value",!0,"")]),y=new b,O=h.extend(function(t){B.init(t,this,this.update.bind(this));var e=B.get("element",this),i=y.getService("element"),n=e&&i.isCanvas(e)?e:i.createCanvas(),s=e&&i.isImage(e)?e:i.createImage();this._canvasRenderer=new c(this,n,!0),this._imageRenderer=new m(this,s,s===e),this.update()},{get:function(){return B.getAll(this)},set:function(t){B.setAll(t,this)&&this.update()},toDataURL:function(t){return this.canvas.toDataURL(t||this.mime)},update:function(){var t=new p({level:this.level,value:this.value});this._canvasRenderer.render(t),this._imageRenderer.render(t)}},{use:function(t){y.setService(t.getName(),t)}});Object.defineProperties(O.prototype,{canvas:{get:function(){return this._canvasRenderer.getElement()}},image:{get:function(){return this._imageRenderer.getElement()}}});var A=O,L=h.extend({getName:function(){}}).extend({createCanvas:function(){},createImage:function(){},getName:function(){return"element"},isCanvas:function(t){},isImage:function(t){}}).extend({createCanvas:function(){return document.createElement("canvas")},createImage:function(){return document.createElement("img")},isCanvas:function(t){return t instanceof HTMLCanvasElement},isImage:function(t){return t instanceof HTMLImageElement}});return A.use(new L),A}); 5 | 6 | //# sourceMappingURL=qrious.min.js.map -------------------------------------------------------------------------------- /web/js/stackblur.min.js: -------------------------------------------------------------------------------- 1 | !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.StackBlur=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g >T,0!=F?(F=255/F,H[o]=(q*S>>T)*F,H[o+1]=(r*S>>T)*F,H[o+2]=(s*S>>T)*F):H[o]=H[o+1]=H[o+2]=0,q-=u,r-=v,s-=w,t-=x,u-=Q.r,v-=Q.g,w-=Q.b,x-=Q.a,m=p+((m=g+f+1) >T,F>0?(F=255/F,H[m]=(q*S>>T)*F,H[m+1]=(r*S>>T)*F,H[m+2]=(s*S>>T)*F):H[m]=H[m+1]=H[m+2]=0,q-=u,r-=v,s-=w,t-=x,u-=Q.r,v-=Q.g,w-=Q.b,x-=Q.a,m=g+((m=h+L) >P,D[o+1]=r*O>>P,D[o+2]=s*O>>P,q-=t,r-=u,s-=v,t-=M.r,u-=M.g,v-=M.b,m=p+((m=g+f+1) >P,D[m+1]=r*O>>P,D[m+2]=s*O>>P,q-=t,r-=u,s-=v,t-=M.r,u-=M.g,v-=M.b,m=g+((m=h+H) 2 | 3 | 4 | 5 | 6 | 7 | kipp 8 | 9 | 10 | 11 | 12 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |Not working? Try disabling your ad blocker26 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /web/private/js/main.js: -------------------------------------------------------------------------------- 1 | (async () => { 2 | const decrypt = async (iv, key, data) => crypto.subtle.decrypt({ name: 'AES-GCM', iv: iv }, await crypto.subtle.importKey('raw', key, { name: 'AES-GCM' }, false, ['decrypt']), data); 3 | 4 | const decode = s => Uint8Array.from(atob(s.replace(/-/g, '+').replace(/_/g, '/') + '=='), c => c.charCodeAt(0)); 5 | 6 | const s = location.hash.slice(1).split('/'); 7 | const b = decode(s[0]); 8 | const iv = new Uint8Array(12); 9 | const key = new Uint8Array(16); 10 | iv.set(b.slice(0, 12)); 11 | key.set(b.slice(12, 28)); 12 | 13 | const req = await new Promise(function(resolve, reject) { 14 | var req = new XMLHttpRequest(); 15 | req.onerror = reject; 16 | req.onload = () => { 17 | req.onprogress = null; 18 | if (req.status === 200) resolve(req); 19 | else reject(new Error('File has expired or is invalid')); 20 | } 21 | req.onprogress = e => document.querySelector('.progress .bar').style.width = ~~(e.loaded / e.total * 100) + '%'; 22 | req.open('GET', '/' + s[1], true); 23 | req.responseType = 'arraybuffer'; 24 | req.send(); 25 | }); 26 | 27 | document.querySelector('.progress .bar').style.width = '100%'; 28 | document.querySelector('.status .text.open').innerHTML = 'Decrypting'; 29 | 30 | const blob = new Blob([await decrypt(iv, key, req.response)], { type: req.getResponseHeader('Content-Type') }) 31 | const u = URL.createObjectURL(blob); 32 | const name = decodeURIComponent(req.getResponseHeader('Content-Disposition').split('"')[1].split('"')[0]); 33 | document.body.className = 'done'; 34 | document.querySelector('.status .text.open').innerHTML = 'Open'; 35 | 36 | var d = document.createElement('div'); 37 | d.className = 'info'; 38 | d.innerHTML = '' + name + '' + filesize(blob.size) + ''; 39 | document.querySelector('.status').appendChild(d); 40 | 41 | var a = document.querySelector('.status .text.open'); 42 | a.href = u; 43 | a.onclick = () => (window.open(u, '_blank').onunload = () => document.body.classList.add('suggest'), false); 44 | 45 | var ad = document.querySelector('.status .text.download'); 46 | ad.href = u; 47 | ad.download = name; 48 | })().catch(err => { 49 | document.body.className = 'error'; 50 | document.querySelector('.status .text.open').innerHTML = 'message' in err ? err.message : err; 51 | }); -------------------------------------------------------------------------------- /web/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /private -------------------------------------------------------------------------------- /web/sharex: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "kipp", 3 | "RequestType": "POST", 4 | "RequestURL": "https://kipp.6f.io", 5 | "FileFormName": "file", 6 | "ResponseType": "RedirectionURL" 7 | } --------------------------------------------------------------------------------