diff --git a/README.md b/README.md
index 8be2121..e42a7db 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[![ko-fi](https://img.shields.io/badge/-buy%20me%20a%20coffee-%23FF5E5B?style=plastic)](https://ko-fi.com/slate) [![patreon](https://img.shields.io/badge/-support%20me%20on%20patreon-%235C5C5C?style=plastic)](https://patreon.com/slatesfoundrystuff) ![GitHub release (by tag)](https://img.shields.io/github/downloads/zarmstrong/hlo-importer/hlo-importer-0.10.0/total?style=plastic) ![GitHub all releases](https://img.shields.io/github/downloads/zarmstrong/hlo-importer/total?style=plastic) ![GitHub](https://img.shields.io/github/license/zarmstrong/hlo-importer?style=plastic)
+[![ko-fi](https://img.shields.io/badge/-buy%20me%20a%20coffee-%23FF5E5B?style=plastic)](https://ko-fi.com/slate) [![patreon](https://img.shields.io/badge/-support%20me%20on%20patreon-%235C5C5C?style=plastic)](https://patreon.com/slatesfoundrystuff) ![GitHub release (by tag)](https://img.shields.io/github/downloads/zarmstrong/hlo-importer/hlo-importer-0.10.1/total?style=plastic) ![GitHub all releases](https://img.shields.io/github/downloads/zarmstrong/hlo-importer/total?style=plastic) ![GitHub](https://img.shields.io/github/license/zarmstrong/hlo-importer?style=plastic)
# Herolab Online PF2e Import Tool
diff --git a/hlo-importer.js b/hlo-importer.js
index 8d1d76f..afdb6bb 100644
--- a/hlo-importer.js
+++ b/hlo-importer.js
@@ -1,5 +1,5 @@
let hlodebug = false;
-const hloiVer="0.10.0";
+const hloiVer="0.10.1";
let herolabURL="https://www.pf2player.com";
const color1='color: #7bf542'; //bright green
diff --git a/hlo-importer.min.js b/hlo-importer.min.js
index 6fbafe1..1502c0f 100644
--- a/hlo-importer.min.js
+++ b/hlo-importer.min.js
@@ -1,4 +1,4 @@
-let hlodebug=!1;const hloiVer="0.10.0";let herolabURL="https://www.pf2player.com";const color1="color: #7bf542",color2="color: #d8eb34",color3="color: #ffffff",color4="color: #cccccc",color5="color: #ff0000";var hlo,userToken,hloButton=!0;async function doHVExport(hero,act){game.modules.get("herovaultfoundry")?.api?.exportToHVFromPBHLO(hero,act)}function hloShim(targetActor){let hlo=new HeroLabImporter;hlo.heroVaultPrompt=!0,userToken=game.settings.get("hlo-importer","userToken");hlo.beginHLOImport(targetActor,userToken)}function hloActive(){return!0}"https:"!==location.protocol&&(herolabURL="http://www.pf2player.com"),Hooks.on("ready",async function(){"pf2e"!=game.system.id?console.log("%cHLO Importer | %cWrong game system. %cNot enabling.",color1,color5,color4):(console.log("%cHLO Importer | %cinitializing",color1,color4),game.settings.register("hlo-importer","userToken",{name:"User Token (optional)",hint:"Please enter your personal user token. A user token allows external tools (like this one) to access the HLO server and perform export operations.",scope:"world",config:!0,type:String,default:"",onChange:value=>userToken=game.settings.get("hlo-importer","userToken")}),game.settings.register("hlo-importer","debugEnabled",{name:"Enable debug mode",hint:"Debug output will be written to the js console.",scope:"world",config:!0,type:Boolean,default:!1,onChange:value=>hlodebug=game.settings.get("hlo-importer","debugEnabled")})),hlo=new HeroLabImporter(hlodebug),hlodebug=game.settings.get("hlo-importer","debugEnabled"),userToken=game.settings.get("hlo-importer","userToken")}),Hooks.on("herovaultfoundryReady",api=>{hlodebug&&console.log("Disabling HLO button since herovault is loaded"),hloButton=!1}),Hooks.on("renderActorSheet",function(obj,html){if(hlodebug=game.settings.get("hlo-importer","debugEnabled"),"pf2e"!=game.system.id)console.log("%cHLO Importer | %cWrong game system. %cNot adding HLO button to actor sheet.",color1,color5,color4);else{const actor=obj.actor;if(hlodebug&&(console.log("%cHLO Importer | %cPF2e System Version: hlo-importer actor type: "+actor.type,color1,color4),console.log("%cHLO Importer | %cCan user modify: "+actor.canUserModify(game.user,"update"),color1,color4)),"character"===actor.type&&(0!=actor.canUserModify(game.user,"update")&&hloButton)){let element=html.find(".window-header .window-title");if(1==element.length){let button=$('HLO');userToken=game.settings.get("hlo-importer","userToken"),hlodebug&&console.log("%cHLO Importer | %chlo-importer token: "+userToken,color1,color4),button.on("click",()=>hlo.beginHLOImport(obj.object,userToken)),element.after(button)}}}});class HeroLabImporter{constructor(hlodebug){this.color1="color: #7bf542",this.color2="color: #d8eb34",this.color3="color: #ffffff",this.color4="color: #cccccc",this.color5="color: #ff0000",this.hlodebug=hlodebug,this.heroVaultExport=!1,this.heroVaultPrompt=!1}beginHLOImport(targetActor,userToken){let applyChanges=!1,hvCheckbox="";this.heroVaultPrompt&&(hvCheckbox='
'),new Dialog({title:"Herolab Online Import",content:`
+let hlodebug=!1;const hloiVer="0.10.1";let herolabURL="https://www.pf2player.com";const color1="color: #7bf542",color2="color: #d8eb34",color3="color: #ffffff",color4="color: #cccccc",color5="color: #ff0000";var hlo,userToken,hloButton=!0;async function doHVExport(hero,act){game.modules.get("herovaultfoundry")?.api?.exportToHVFromPBHLO(hero,act)}function hloShim(targetActor){let hlo=new HeroLabImporter;hlo.heroVaultPrompt=!0,userToken=game.settings.get("hlo-importer","userToken");hlo.beginHLOImport(targetActor,userToken)}function hloActive(){return!0}"https:"!==location.protocol&&(herolabURL="http://www.pf2player.com"),Hooks.on("ready",async function(){"pf2e"!=game.system.id?console.log("%cHLO Importer | %cWrong game system. %cNot enabling.",color1,color5,color4):(console.log("%cHLO Importer | %cinitializing",color1,color4),game.settings.register("hlo-importer","userToken",{name:"User Token (optional)",hint:"Please enter your personal user token. A user token allows external tools (like this one) to access the HLO server and perform export operations.",scope:"world",config:!0,type:String,default:"",onChange:value=>userToken=game.settings.get("hlo-importer","userToken")}),game.settings.register("hlo-importer","debugEnabled",{name:"Enable debug mode",hint:"Debug output will be written to the js console.",scope:"world",config:!0,type:Boolean,default:!1,onChange:value=>hlodebug=game.settings.get("hlo-importer","debugEnabled")})),hlo=new HeroLabImporter(hlodebug),hlodebug=game.settings.get("hlo-importer","debugEnabled"),userToken=game.settings.get("hlo-importer","userToken")}),Hooks.on("herovaultfoundryReady",api=>{hlodebug&&console.log("Disabling HLO button since herovault is loaded"),hloButton=!1}),Hooks.on("renderActorSheet",function(obj,html){if(hlodebug=game.settings.get("hlo-importer","debugEnabled"),"pf2e"!=game.system.id)console.log("%cHLO Importer | %cWrong game system. %cNot adding HLO button to actor sheet.",color1,color5,color4);else{const actor=obj.actor;if(hlodebug&&(console.log("%cHLO Importer | %cPF2e System Version: hlo-importer actor type: "+actor.type,color1,color4),console.log("%cHLO Importer | %cCan user modify: "+actor.canUserModify(game.user,"update"),color1,color4)),"character"===actor.type&&(0!=actor.canUserModify(game.user,"update")&&hloButton)){let element=html.find(".window-header .window-title");if(1==element.length){let button=$('HLO');userToken=game.settings.get("hlo-importer","userToken"),hlodebug&&console.log("%cHLO Importer | %chlo-importer token: "+userToken,color1,color4),button.on("click",()=>hlo.beginHLOImport(obj.object,userToken)),element.after(button)}}}});class HeroLabImporter{constructor(hlodebug){this.color1="color: #7bf542",this.color2="color: #d8eb34",this.color3="color: #ffffff",this.color4="color: #cccccc",this.color5="color: #ff0000",this.hlodebug=hlodebug,this.heroVaultExport=!1,this.heroVaultPrompt=!1}beginHLOImport(targetActor,userToken){let applyChanges=!1,hvCheckbox="";this.heroVaultPrompt&&(hvCheckbox='
'),new Dialog({title:"Herolab Online Import",content:`
Step 1: Get the character token by clicking on the kebab menu (⋮) on any character on your account. Scroll down to "Element Token" and click the Get Element Token button. Click the Copy to Clipboard button.
Step 2: Paste the Element Token from the Herolab Online export dialog below
diff --git a/module.json b/module.json index feda01b..49d35ab 100644 --- a/module.json +++ b/module.json @@ -12,11 +12,10 @@ "ko-fi": "SLATE" } ], - "version": "0.10.0", + "version": "0.10.1", "compatibility": { - "minimum": "10.284", - "verified": "10.285", - "maximum": "10" + "minimum": "10", + "verified": "10.285" }, "relationship": { "systems": [ @@ -38,7 +37,7 @@ "packs": [], "url": "https://github.com/zarmstrong/hlo-importer", "manifest": "https://raw.githubusercontent.com/zarmstrong/hlo-importer/main/module.json", - "download": "https://github.com/zarmstrong/hlo-importer/releases/download/hlo-importer-0.10.0/hlo-importer-0.10.0.zip", + "download": "https://github.com/zarmstrong/hlo-importer/releases/download/hlo-importer-0.10.1/hlo-importer-0.10.1.zip", "license": "MIT", "readme": "https://github.com/zarmstrong/hlo-importer", "bugs": "https://github.com/zarmstrong/hlo-importer/issues",