Skip to content

Instantly share code, notes, and snippets.

@pgailloud
pgailloud / include.js
Created January 7, 2019 16:00 — forked from adrienjoly/include.js
native code to include a javascript / css file dynamically in a html document
function include(src){
return new Promise((resolve, reject) => {
var ext = src.split(/[\#\?]/)[0].split(".").pop().toLowerCase();
var inc;
if (ext == "js") {
inc = document.createElement("script");
inc.src = src;
inc.onerror = () => reject();
inc.onload = inc.onreadystatechange = () => resolve();
}
Log uploaded on Friday, September 22, 2023, 7:24:40 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:1.5.0.0]: 0Harmony(2.2.2), HarmonyMod(1.5.0)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:10.0.1]: 0Harmony(av:2.2.2,fv:1.2.0.1), HugsLib(av:1.0.0,fv:10.0.1)
Tabula Rasa(neronix17.toolbox): TabulaRasa(1.0.8628.15310)
Vanilla Expanded Framework(OskarPotocki.VanillaFactionsExpanded.Core): 0MultiplayerAPI(av:0.3.0,fv:0.3.0), 0PrepatcherAPI(1.1.1), ExplosiveTrailsEffect(1.0.7140.31563), GraphicCustomization(1.0.0), HeavyWeapons(1.0.0), KCSG(av:1.1.2,fv:23.8.25), MVCF(2.0.0.1), NoCamShakeExplosions(1.0.0), OPToxic(1.0.0), Outposts(av:3.0.0,fv:1.0.0), PipeSystem(av:1.0.1,fv:22.7.29), RecipeInheritance(1.0.1), RRO(1.0.0), SmokingGun(1.0.0), VanillaStorytellersExpanded(1.0.0), VanillaWeaponsExpandedLaser(0.0.0), VFECore(av:1.1.7,fv:1.1.9), VWEMak