diff --git a/crafter/index.html b/crafter/index.html
index 645d2b6..76f6cf3 100644
--- a/crafter/index.html
+++ b/crafter/index.html
@@ -211,7 +211,7 @@
-
diff --git a/js/crafter.js b/js/crafter.js
index dbbbfd6..66b9087 100644
--- a/js/crafter.js
+++ b/js/crafter.js
@@ -264,7 +264,7 @@ function populateFields() {
*/
function copyRecipeHash() {
if (player_craft) {
- copyTextToClipboard("CR-"+location.hash);
+ copyTextToClipboard("CR-"+location.hash.slice(1));
document.getElementById("copy-hash-button").textContent = "Copied!";
}
}
diff --git a/js/sq2builder.js b/js/sq2builder.js
index b758e3b..2dc8e91 100644
--- a/js/sq2builder.js
+++ b/js/sq2builder.js
@@ -142,6 +142,7 @@ function parsePowdering(powder_info) {
* Populate fields based on url, and calculate build.
*/
function decodeBuild(url_tag) {
+ console.log("decoding build");
if (url_tag) {
//default values
let equipment = [null, null, null, null, null, null, null, null, null];
@@ -168,11 +169,12 @@ function decodeBuild(url_tag) {
let info_str = info[1];
let start_idx = 0;
for (let i = 0; i < 9; ++i ) {
- if (info_str.charAt(start_idx) === "-") {
- equipment[i] = "CR-"+info_str.slice(start_idx+1, start_idx+18);
- start_idx += 18;
- }
- else {
+ console.log(info_str.slice(start_idx,start_idx+3));
+ if (info_str.slice(start_idx,start_idx+3) === "CR-") {
+ console.log(info_str.slice(start_idx, start_idx+20));
+ equipment[i] = info_str.slice(start_idx, start_idx+20);
+ start_idx += 20;
+ } else {
let equipment_str = info_str.slice(start_idx, start_idx+3);
equipment[i] = getItemNameFromID(Base64.toInt(equipment_str));
start_idx += 3;