diff --git a/Application/views/decode_result.html b/Application/views/decode_result.html index 5e6d9a0..dff6556 100644 --- a/Application/views/decode_result.html +++ b/Application/views/decode_result.html @@ -20,7 +20,8 @@ var html_content = `

Decoded

- Image Not Found + Image Not Found + Download Image

Secret Text:

@@ -36,6 +37,7 @@ Your browser does not support the audio element. + Download Audio

Secret Text:

` + response["payload"] + `

@@ -50,6 +52,7 @@ Your browser does not support the audio element. + Download Audio

Secret Text:

` + response["payload"] + `

@@ -63,6 +66,7 @@ + Download Video

Secret Text:

` + response["payload"] + `

@@ -78,6 +82,7 @@

Decoded

+ Download Text File

Secret Text:

@@ -101,6 +106,11 @@ $("body").append(html_content) } }); + + $(".result_box").on("click", function(){ + + $(".result_box_download").click() + }) }) diff --git a/Application/views/encode_result.html b/Application/views/encode_result.html index d976f74..bc4e195 100644 --- a/Application/views/encode_result.html +++ b/Application/views/encode_result.html @@ -28,14 +28,18 @@ $.get('/get_session', function(response) { console.log(response) if(response.hasOwnProperty("image")){ - var html_content = `
+ var html_content = `

Original

- Image Not Found + Image Not Found +
+ Download Image

Encoded

- Image Not Found + Image Not Found +
+ Download Image
` @@ -49,6 +53,8 @@ Your browser does not support the audio element. +
+ Download Audio

Encoded

@@ -56,6 +62,8 @@ Your browser does not support the audio element. +
+ Download Audio
` $("body").append(html_content) @@ -68,6 +76,8 @@ Your browser does not support the audio element. +
+ Download Audio

Encoded

@@ -75,6 +85,8 @@ Your browser does not support the audio element. +
+ Download Audio
` $("body").append(html_content) @@ -86,12 +98,16 @@ +
+ Download Video

Encoded

+
+ Download Video
` $("body").append(html_content) @@ -101,11 +117,13 @@ var html_content = `

Original

- Download Document +
+ Download Document

Encoded

- Download Document +
+ Download Document
` $("body").append(html_content) @@ -140,6 +158,11 @@ }); } }); + + $("body").on("click", ".result_box", function(e){ + e.preventDefault() + window.location.href = $(this).parent().find("a").attr("href") + }) })