mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 16:06:21 +00:00
chore: merge branch 'safe.fiery.me' into safe.fiery.me-feat/hyper-express
This commit is contained in:
commit
8267c60863
2
dist/js/misc/utils.js
vendored
2
dist/js/misc/utils.js
vendored
@ -1,2 +1,2 @@
|
||||
lsKeys.siBytes="siBytes",lsKeys.ampmTime="ampmTime",page.prepareShareX=function(){var e=document.querySelector("#ShareX");if(e){var t={};page.token&&(t.token=page.token||"",t.albumid=page.album||""),t.filelength=page.fileLength||"",t.age=page.uploadAge||"",t.striptags=page.stripTags||"";var a=(window.location.host+window.location.pathname).replace(/\/(dashboard)?$/,""),r=a.replace(/\//g,"_"),o={Version:"13.4.0",Name:r,DestinationType:"ImageUploader, FileUploader",RequestMethod:"POST",RequestURL:window.location.protocol+"//"+a+"/api/upload",Headers:t,Body:"MultipartFromData",FileFormName:"files[]",URL:"$json:files[0].url$",ThumbnailURL:"$json:files[0].url$"};page.token&&(o.DeletionURL="$json:files[0].deleteUrl$");var i=JSON.stringify(o,null,2),n=new Blob([i],{type:"application/octet-binary"});e.setAttribute("href",URL.createObjectURL(n)),e.setAttribute("download",r+".sxcu")}},page.getPrettyDate=function(e){return e.getFullYear()+"/"+(e.getMonth()<9?"0":"")+(e.getMonth()+1)+"/"+(e.getDate()<10?"0":"")+e.getDate()+" "+e.toLocaleString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:"1"===localStorage[lsKeys.ampmTime]})},page.getPrettyBytes=function(e){if("number"!=typeof e&&!isFinite(e))return e;var t="0"!==localStorage[lsKeys.siBytes],a=e<0?"-":"",r=t?1e3:1024;if(a&&(e=-e),e<r)return""+a+e+" B";var o=Math.min(Math.floor(Math.log(e)*Math.LOG10E/3),8);return""+a+Number((e/Math.pow(r,o)).toPrecision(3))+" "+((t?"kMGTPEZY":"KMGTPEZY").charAt(o-1)+(t?"":"i"))+"B"},page.getPrettyUptime=function(e){var t=Math.floor(e/86400);e%=86400;var a=Math.floor(e/3600);e%=3600;var r=Math.floor(e/60);return a<10&&(a="0"+a),r<10&&(r="0"+r),(e%=60)<10&&(e="0"+e),t>0?t+"d "+a+":"+r+":"+e:a+":"+r+":"+e},page.escape=function(e){if(!e)return e;var t,a=String(e),r=/["'&<>]/.exec(a);if(!r)return a;var o="",i=0,n=0;for(i=r.index;i<a.length;i++){switch(a.charCodeAt(i)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}n!==i&&(o+=a.substring(n,i)),n=i+1,o+=t}return n!==i?o+a.substring(n,i):o};
|
||||
lsKeys.siBytes="siBytes",lsKeys.ampmTime="ampmTime",page.prepareShareX=function(){var e=document.querySelector("#ShareX");if(e){var t={};page.token&&(t.token=page.token||"",t.albumid=page.album||""),t.filelength=page.fileLength||"",t.age=page.uploadAge||"",t.striptags=page.stripTags||"";var a=(window.location.host+window.location.pathname).replace(/\/(dashboard)?$/,""),r=a.replace(/\//g,"_"),o={Version:"13.4.0",Name:r,DestinationType:"ImageUploader, FileUploader",RequestMethod:"POST",RequestURL:window.location.protocol+"//"+a+"/api/upload",Headers:t,Body:"MultipartFormData",FileFormName:"files[]",URL:"$json:files[0].url$",ThumbnailURL:"$json:files[0].url$"};page.token&&(o.DeletionURL="$json:files[0].deleteUrl$");var i=JSON.stringify(o,null,2),n=new Blob([i],{type:"application/octet-binary"});e.setAttribute("href",URL.createObjectURL(n)),e.setAttribute("download",r+".sxcu")}},page.getPrettyDate=function(e){return e.getFullYear()+"/"+(e.getMonth()<9?"0":"")+(e.getMonth()+1)+"/"+(e.getDate()<10?"0":"")+e.getDate()+" "+e.toLocaleString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:"1"===localStorage[lsKeys.ampmTime]})},page.getPrettyBytes=function(e){if("number"!=typeof e&&!isFinite(e))return e;var t="0"!==localStorage[lsKeys.siBytes],a=e<0?"-":"",r=t?1e3:1024;if(a&&(e=-e),e<r)return""+a+e+" B";var o=Math.min(Math.floor(Math.log(e)*Math.LOG10E/3),8);return""+a+Number((e/Math.pow(r,o)).toPrecision(3))+" "+((t?"kMGTPEZY":"KMGTPEZY").charAt(o-1)+(t?"":"i"))+"B"},page.getPrettyUptime=function(e){var t=Math.floor(e/86400);e%=86400;var a=Math.floor(e/3600);e%=3600;var r=Math.floor(e/60);return a<10&&(a="0"+a),r<10&&(r="0"+r),(e%=60)<10&&(e="0"+e),t>0?t+"d "+a+":"+r+":"+e:a+":"+r+":"+e},page.escape=function(e){if(!e)return e;var t,a=String(e),r=/["'&<>]/.exec(a);if(!r)return a;var o="",i=0,n=0;for(i=r.index;i<a.length;i++){switch(a.charCodeAt(i)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}n!==i&&(o+=a.substring(n,i)),n=i+1,o+=t}return n!==i?o+a.substring(n,i):o};
|
||||
//# sourceMappingURL=utils.js.map
|
||||
|
2
dist/js/misc/utils.js.map
vendored
2
dist/js/misc/utils.js.map
vendored
File diff suppressed because one or more lines are too long
@ -29,7 +29,7 @@ page.prepareShareX = () => {
|
||||
RequestMethod: 'POST',
|
||||
RequestURL: `${window.location.protocol}//${origin}/api/upload`,
|
||||
Headers: headers,
|
||||
Body: 'MultipartFromData',
|
||||
Body: 'MultipartFormData',
|
||||
FileFormName: 'files[]',
|
||||
URL: '$json:files[0].url$',
|
||||
ThumbnailURL: '$json:files[0].url$'
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"1": "1656592982",
|
||||
"1": "1657445281",
|
||||
"2": "1602515119",
|
||||
"3": "1650485321",
|
||||
"4": "1602515119",
|
||||
|
@ -1131,9 +1131,9 @@ caniuse-api@^3.0.0:
|
||||
lodash.uniq "^4.5.0"
|
||||
|
||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001304, caniuse-lite@^1.0.30001317, caniuse-lite@^1.0.30001332, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001358, caniuse-lite@^1.0.30001359:
|
||||
version "1.0.30001361"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001361.tgz#ba2adb2527566fb96f3ac7c67698ae7fc495a28d"
|
||||
integrity sha512-ybhCrjNtkFji1/Wto6SSJKkWk6kZgVQsDq5QI83SafsF6FXv2JB4df9eEdH6g8sdGgqTXrFLjAxqBGgYoU3azQ==
|
||||
version "1.0.30001364"
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001364.tgz"
|
||||
integrity sha512-9O0xzV3wVyX0SlegIQ6knz+okhBB5pE0PC40MNdwcipjwpxoUEHL24uJ+gG42cgklPjfO5ZjZPme9FTSN3QT2Q==
|
||||
|
||||
chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0:
|
||||
version "2.4.2"
|
||||
|
Loading…
Reference in New Issue
Block a user