From 31b696bd86a29832fcbd5575ba546f00e5479ca9 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Thu, 4 Sep 2014 11:02:08 +0100 Subject: [PATCH] Fixed CRC display in editor. Fixes #284. --- resources/report/js/custom.js | 6 +++--- resources/report/js/plugin.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/report/js/custom.js b/resources/report/js/custom.js index 4d6ee7b2..532a4e56 100644 --- a/resources/report/js/custom.js +++ b/resources/report/js/custom.js @@ -354,7 +354,7 @@ var pluginCardProto = Object.create(HTMLElement.prototype, { this.shadowRoot.getElementById('editor').getElementsByTagName('h1')[0].textContent = loot.game.plugins[i].name; this.shadowRoot.getElementById('editor').getElementsByClassName('version')[0].textContent = loot.game.plugins[i].version; if (loot.game.plugins[i].crc != '0') { - this.shadowRoot.getElementById('editor').getElementsByClassName('crc')[0].textContent = loot.game.plugins[i].crc; + this.shadowRoot.getElementById('editor').getElementsByClassName('crc')[0].textContent = loot.game.plugins[i].crc.toString(16).toUpperCase(); } /* Fill in the editor input values. */ @@ -466,14 +466,14 @@ var pluginCardProto = Object.create(HTMLElement.prototype, { if (loot.game.plugins[i].masterlist && loot.game.plugins[i].masterlist.dirty) { loot.game.plugins[i].masterlist.dirty.forEach(function(info) { - info.crc = info.crc.toString(16); + info.crc = info.crc.toString(16).toUpperCase(); var row = tables[j].addRow(info); tables[j].setReadOnly(row); }); } if (loot.game.plugins[i].userlist && loot.game.plugins[i].userlist.dirty) { loot.game.plugins[i].userlist.dirty.forEach(function(info) { - info.crc = info.crc.toString(16); + info.crc = info.crc.toString(16).toUpperCase(); tables[j].addRow(info); }); } diff --git a/resources/report/js/plugin.js b/resources/report/js/plugin.js index d4585c01..b66f755c 100644 --- a/resources/report/js/plugin.js +++ b/resources/report/js/plugin.js @@ -147,7 +147,7 @@ function Plugin(obj) { card.getElementsByTagName('h1')[0].textContent = this.name; card.getElementsByClassName('version')[0].textContent = this.version; if (this.crc != 0) { - card.getElementsByClassName('crc')[0].textContent = this.crc; + card.getElementsByClassName('crc')[0].textContent = this.crc.toString(16).toUpperCase(); } /* Fill in Bash Tag suggestions. */