Skip to content

Instantly share code, notes, and snippets.

View thisredone's full-sized avatar
🏹
༼ つ ◕_◕ ༽つ ʕ ゚ᴥ ゚ʔ

redka thisredone

🏹
༼ つ ◕_◕ ༽つ ʕ ゚ᴥ ゚ʔ
View GitHub Profile
@thisredone
thisredone / pc-uranus-loaded.js
Created March 15, 2022 18:12
Violentmonkey script for Uranus Editor Scripting for Playcanvas
const loadScriptAsync = function (url) {
return new Promise((resolve) => {
var tag = document.createElement('script');
tag.onload = function () {
resolve();
};
tag.onerror = function () {
throw new Error('failed to load ' + url);
};
tag.async = true;
@thisredone
thisredone / swappable.js
Last active December 9, 2023 15:57
swappable js classess
self._swappableClasses ??= {
existing: {},
instances: {},
bodyStrings: {},
ancestralHooks: {},
};
const isPromise = (v) =>
v != null && (v instanceof Promise || (typeof v === 'object' && typeof v.then === 'function'))