From 18a6c8dfbcf58925e71a22085bd8f995c933be9b Mon Sep 17 00:00:00 2001 From: Nex Sabre Date: Sun, 3 Oct 2021 15:42:37 +0200 Subject: [PATCH 1/2] add hex to bytes convertionwsl --- src/components/LandingPage.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/components/LandingPage.vue b/src/components/LandingPage.vue index 8bbed87..430b9c1 100644 --- a/src/components/LandingPage.vue +++ b/src/components/LandingPage.vue @@ -170,6 +170,7 @@ export default { isExpanded: false, voted: false, expandOnLoad: true, + bytes: [], }; }, methods: { @@ -178,6 +179,14 @@ export default { this.showPacket(); this.getPacket(); }, + convertToBytes() { + this.bytes = []; + [...this.hexValue.replace(/\s/g, "")].forEach((v, i) => { + if (i%2) { + this.bytes.push(tempValue[i-1] + tempValue[i]); + } + }); + }, read() { if (this.$route.query["redirect"]) { this.hexValue = this.$route.query["redirect"]; @@ -192,6 +201,7 @@ export default { this.decode = false; this.resetData(); this.panel = []; + this.bytes = []; await this.delay(0.6); this.alert = false; this.loading = false; From 469b505728d7284ca10a0c3fbd1acd83b00452d0 Mon Sep 17 00:00:00 2001 From: Nex Sabre Date: Sun, 3 Oct 2021 15:45:14 +0200 Subject: [PATCH 2/2] Update LandingPage.vue --- src/components/LandingPage.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/LandingPage.vue b/src/components/LandingPage.vue index 430b9c1..83b525d 100644 --- a/src/components/LandingPage.vue +++ b/src/components/LandingPage.vue @@ -182,8 +182,8 @@ export default { convertToBytes() { this.bytes = []; [...this.hexValue.replace(/\s/g, "")].forEach((v, i) => { - if (i%2) { - this.bytes.push(tempValue[i-1] + tempValue[i]); + if (i % 2) { + this.bytes.push(tempValue[i - 1] + tempValue[i]); } }); },