commit f87a464600c915efa9cf148a738b31c3677f4293 Author: Lucas <18538046+TeaWithLucas@users.noreply.github.com> Date: Sat Jun 29 13:43:39 2019 +0100 inital diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..00f4fd8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.vs/slnx.sqlite diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..650153e --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Christoph Stahl + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..a11bf87 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +Herosaver +========= + +Save Configuration and STL of https://www.heroforge.com/ + +Usage +----- + + 1. Go to https://www.heroforge.com/ + 2. Open the Javascript Console [F12], then click on Console + 3. Paste the following + +``` +var xhr=new XMLHttpRequest;xhr.open("get","https://raw.githubusercontent.com/christofsteel/herosaver/master/herosaver.min.js",true);xhr.onreadystatechange=function(){if(xhr.readyState==4){var script=document.createElement("script");script.type="text/javascript";script.text=xhr.responseText;document.body.appendChild(script)}};xhr.send(null); +``` + +Limitations +----------- + +Some details of the figures are implemented via shaders. These are not exported :( This is also the reason, the exported figures look a bit _blocky_. If you want hight quality exports, consider purchasing the stl files from heroforge :) diff --git a/herosaver.js b/herosaver.js new file mode 100644 index 0000000..720c8fc --- /dev/null +++ b/herosaver.js @@ -0,0 +1,334 @@ +//download.js v4.2, by dandavis; 2008-2017. [MIT] see http://danml.com/download.html for tests/usage +(function(r,l){"function"==typeof define&&define.amd?define([],l):"object"==typeof exports?module.exports=l():r.download=l()})(this,function(){return function l(a,e,k){function q(a){var h=a.split(/[:;,]/);a=h[1];var h=("base64"==h[2]?atob:decodeURIComponent)(h.pop()),d=h.length,b=0,c=new Uint8Array(d);for(b;bc.length&&(n=c.split("/").pop().split("?")[0],d.href=c,-1!==d.href.indexOf(c))){var p=new XMLHttpRequest;return p.open("GET",c,!0),p.responseType="blob",p.onload=function(a){l(a.target.response,n,"application/octet-stream")},setTimeout(function(){p.send()},0),p}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(a)){if(!(2096103.424