2022-07-10 09:28:02 +00:00
|
|
|
{"version":3,"sources":["utils.js"],"names":["lsKeys","siBytes","ampmTime","page","prepareShareX","const","sharexElement","document","querySelector","headers","token","albumid","album","filelength","fileLength","age","uploadAge","striptags","stripTags","origin","window","location","host","pathname","replace","originClean","sharexConfObj","Version","Name","DestinationType","RequestMethod","RequestURL","Headers","Body","FileFormName","URL","ThumbnailURL","DeletionURL","sharexConfStr","JSON","stringify","sharexBlob","Blob","type","setAttribute","createObjectURL","getPrettyDate","date","getFullYear","getMonth","getDate","toLocaleString","hour","minute","second","hour12","localStorage","getPrettyBytes","num","isFinite","si","neg","scale","exponent","Math","min","floor","log","LOG10E","Number","pow","toPrecision","charAt","getPrettyUptime","seconds","days","let","hours","minutes","escape","string","str","String","match","exec","html","index","lastIndex","length","charCodeAt","substring"],"mappings":"AAGAA,OAAOC,QAAU,UACjBD,OAAOE,SAAW,WAElBC,KAAKC,cAAa,WAChBC,IAAMC,EAAgBC,SAASC,cAAc,WAC7C,GAAKF,EAAL,CAEAD,IAAMI,EAAU,GAEZN,KAAKO,QACPD,EAAQC,MAAQP,KAAKO,OAAS,GAC9BD,EAAQE,QAAUR,KAAKS,OAAS,IAGlCH,EAAQI,WAAaV,KAAKW,YAAc,GACxCL,EAAQM,IAAMZ,KAAKa,WAAa,GAChCP,EAAQQ,UAAYd,KAAKe,WAAa,GAEtCb,IAAMc,GAAUC,OAAOC,SAASC,KAAOF,OAAOC,SAASE,UAAUC,QAAQ,kBAAmB,IACtFC,EAAcN,EAAOK,QAAQ,MAAO,KAEpCE,EAAgB,CACpBC,QAAS,SACTC,KAAMH,EACNI,gBAAiB,8BACjBC,cAAe,OACfC,WAAeX,OAAOC,SAAS,SAAQ,KAAKF,EAAM,cAClDa,QAASvB,EACTwB,KAAM,oBACNC,aAAc,UACdC,IAAK,sBACLC,aAAc,uBAGZjC,KAAKO,QACPgB,EAAcW,YAAc,6BAG9BhC,IAAMiC,EAAgBC,KAAKC,UAAUd,EAAe,KAAM,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A,GAE9BC,EAAO,EACFA,EAAO,KAAOE,EAAQ,IAAMC,EAAU,IAAMJ,EAE5CG,EAAQ,IAAMC,EAAU,IAAMJ,GAIzCvE,KAAK4E,OAAM,SAAGC,GAMZ,IAAKA,EAAQ,OAAOA,EAEpB3E,IAKI0E,EALEE,EAAMC,OAAOF,GACbG,EAAQ,UAAUC,KAAKH,GAE7B,IAAKE,EAAO,OAAOF,EAGnBL,IAAIS,EAAO,GACPC,EAAQ,EACRC,EAAY,EAEhB,IAAKD,EAAQH,EAAMG,MAAOA,EAAQL,EAAIO,OAAQF,IAAS,CACrD,OAAQL,EAAIQ,WAAWH,IACrB,KAAK,GACHP,EAAS,SACT,MACF,KAAK,GACHA,EAAS,QACT,MACF,KAAK,GACHA,EAAS,QACT,MACF,KAAK,GACHA,EAAS,OACT,MACF,KAAK,GACHA,EAAS,OACT,MACF,QACE,SAGAQ,IAAcD,IAChBD,GAAQJ,EAAIS,UAAUH,EAAWD,IAGnCC,EAAYD,EAAQ,EACpBD,GAAQN,EAGV,OAAOQ,IAAcD,EACjBD,EAAOJ,EAAIS,UAAUH,EAAWD,GAChCD","file":"utils.js","sourcesContent":["/* global lsKeys, page */\n\n// keys for localStorage\nlsKeys.siBytes = 'siBytes'\nlsKeys.ampmTime = 'ampmTime'\n\npage.prepareShareX = () => {\n const sharexElement = document.querySelector('#ShareX')\n if (!sharexElement) return\n\n const headers = {}\n\n if (page.token) {\n headers.token = page.token || ''\n headers.albumid = page.album || ''\n }\n\n headers.filelength = page.fileLength || ''\n headers.age = page.uploadAge || ''\n headers.striptags = page.stripTags || ''\n\n const origin = (window.location.host + window.location.pathname).replace(/\\/(dashboard)?$/, '')\n const originClean = origin.replace(/\\//g, '_')\n\n const sharexConfObj = {\n Version: '13.4.0',\n Name: originClean,\n DestinationType: 'ImageUploader, FileUploader',\n RequestMethod: 'POS
|