This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bigIntToBase64(value) { | |
const base = 64n; | |
const digits = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&#"; | |
const sign = value < 0n ? "-" : ""; | |
let [result, quotient] = ["", sign ? 0n - this : this]; | |
do { | |
result = `${digits[Number(quotient % base)]}${result}`; | |
} while (quotient /= base); | |
return `${sign}${result}`; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getRandomIdString = (steps = 4) => { | |
let seed = ""; | |
for (let i = 0; i < steps; i++) { | |
seed += Math.random().toString().substring(2); | |
} | |
return BigInt(seed).toString(36).toUpperCase(); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.defineProperty(Object.prototype, "toString", { | |
value: function () { | |
return JSON.stringify( | |
this, | |
(function () { | |
const ancestors = []; | |
return function (key, value) { | |
if (typeof value !== "object" || value === null) { | |
return value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@content.downloadUrl": "https://public.dm.files.1drv.com/[200+ characters long random string]", | |
"createdBy": { | |
"application": { | |
"displayName": "OneDrive", | |
"id": "[file_id]" | |
}, | |
"user": { | |
"displayName": "[user_display_name]", | |
"id": "[user_id]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
let isPressed = false; | |
let pressTimer = false; | |
const pressedEvent = new CustomEvent("press", { | |
bubbles: true, | |
cancelable: true, | |
composed: true | |
}); | |
const releasedEvent = new CustomEvent("release", { | |
bubbles: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getRandomIdString = (len = 32) => { | |
let retVal = ""; | |
for (let i = 0; i < len; i++) { | |
const randVal = Math.random(); | |
retVal += String.fromCharCode((randVal < 0.5 ? ((randVal * 26) + 65) : ((randVal * 10) + 48)) >> 0); | |
} | |
return retVal; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"txt2img/Prompt/visible": true, | |
"txt2img/Prompt/value": "", | |
"txt2img/Negative prompt/visible": true, | |
"txt2img/Negative prompt/value": "poorly drawn, disfigured, deformed, cross-eyed, bad anatomy, bad proportions, mutated, extra limbs, extra legs, extra arms, missing limb, missing leg, missing arm, malformed limbs, asymmetrical, close-up, blurred, bad art, ugly, jewellery, hands, fingers", | |
"txt2img/Styles/visible": false, | |
"txt2img/Styles/value": [], | |
"txt2img/Sampling method/visible": true, | |
"txt2img/Sampling method/value": "DPM++ 2M", | |
"txt2img/Sampling steps/visible": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getMaxZIndex = function () { | |
const elements = [...document.querySelectorAll("body *")]; | |
return Math.max(...elements.map(x => parseInt(getComputedStyle(x, null).zIndex) || 0)); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
globalThis.setImmediate = globalThis.setImmediate || function (callback) { | |
return setTimeout(callback, 0, ...Array.prototype.slice.apply(arguments, [1])); | |
}; |