-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.1.10 Release
- Loading branch information
Showing
16 changed files
with
213 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{ "BRANCH": "main", "VERSION":"1.1.9" } | ||
{ "BRANCH": "main", "VERSION":"1.1.10" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
function copyToClipboard(element) { | ||
var $temp = $("<input>"); | ||
$("body").append($temp); | ||
let $temp = $('<input>'); | ||
$('body').append($temp); | ||
$temp.val($(element).text()).select(); | ||
document.execCommand("copy"); | ||
document.execCommand('copy'); | ||
showSnackBar('snackbar'); // show snackbar notification | ||
log(`Copied text to clipboard`); | ||
$temp.remove(); | ||
showSnackBar('snackbar'); // show snackbar notification | ||
} | ||
|
||
function showSnackBar(snackbarId) { | ||
var x = document.getElementById(snackbarId); | ||
x.className = "show"; | ||
var time = 3000; | ||
log(`Displaying snackbar for ${time}ms`); | ||
setTimeout(function () { | ||
x.className = x.className.replace("show", ""); | ||
}, time); | ||
var element = document.getElementById(`${snackbarId}`); | ||
element.className = element.className.replace('', 'show'); | ||
log(`Displaying snackbar for ${3000}ms`); | ||
setTimeout(function () { element.className = element.className.replace("show", ""); }, 3000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,53 @@ | ||
function updateFormDisplay() { | ||
const formvalue = document.getElementById("inputtextbot").value; // Assign variable to the current value of the textbox | ||
$('#form_input').fadeOut('fast'); log(`No longer showing 'form_input' element`); // fade out previous content | ||
fetch(`dataProcessing?data=${formvalue}`).then(response => response.json()).then(data => { | ||
const formvalue = document.getElementById('inputtextbot').value; // Assign variable to the current value of the textbox | ||
$('#form_input').fadeOut('fast'); // fade out previous content | ||
log(`No longer showing 'form_input' element`); | ||
function fetchData() { | ||
return fetch(`dataProcessing?action=submit&data=${formvalue}`) | ||
.then((response) => response.json()) | ||
.then((responseData) => { | ||
return responseData; | ||
}).catch(error => log(error, 'warn')); | ||
} | ||
fetchData().then(data => { | ||
log(`Server responsed with '${data.response}'`); | ||
document.getElementById("submissiontextbox").value = `${window.location}view?key=${data.response}`; log(`Updated 'submissiontextbox.value'`); // Set text box to view message URL | ||
document.getElementById("submissiontextbox").innerHTML = `${window.location}view?key=${data.response}`; log(`Updated 'submissiontextbox.innerHTML'`); // Set text box to view message URL | ||
document.getElementById('submissiontextbox').value = `${window.location}view?key=${data.response}`; // Set text box to view message URL | ||
log(`Updated 'submissiontextbox.value'`); | ||
document.getElementById('submissiontextbox').innerHTML = `${window.location}view?key=${data.response}`; // Set text box to view message URL | ||
log(`Updated 'submissiontextbox.innerHTML'`); | ||
}); | ||
setTimeout(function () { | ||
$('#form_submission').fadeIn('fast'); log(`Now showing 'form_submission' element`); // fade in new content | ||
setTimeout(() => { | ||
$('#form_submission').fadeIn('fast'); // fade in new content | ||
log(`Now showing 'form_submission' element`); | ||
}, 200); | ||
} | ||
|
||
function updateViewDisplay() { | ||
$('#form_confirmation').fadeOut('fast'); log(`No longer showing 'form_confirmation' element`); // fade out previous content | ||
var key = new URL(window.location).searchParams.get("key"); log(`Got key variable from url -> ${key}`); // Get key variable from URL; replacing PHP usage | ||
$('#form_confirmation').fadeOut('fast'); // fade out previous content | ||
log(`No longer showing 'form_confirmation' element`); | ||
|
||
let key = new URL(window.location).searchParams.get('key'); // Get key variable from URL; replacing PHP usage | ||
log(`Got key variable from url -> ${key}`); | ||
|
||
fetch(`dataProcessing?action=decrypt&key=${key}`).then(response => response.json()).then(data => { | ||
if (data.response == "") { | ||
if (!data.response) { | ||
showSnackBar('snackbarError'); | ||
$('#form_error').fadeIn('fast'); log(`Now showing 'form_error' element`); // fade in new content | ||
log(`Encryption not found; redirecting in 2s`) | ||
setTimeout(function () { | ||
window.location.replace("./"); // Redirect to home page | ||
$('#form_error').fadeIn('fast'); // fade in new content | ||
log(`Now showing 'form_error' element`); | ||
log(`Encryption not found; redirecting in 2s`); | ||
setTimeout(() => { | ||
window.location.replace('./'); // Redirect to home page | ||
}, 2000); | ||
} else { | ||
log(`Server responded with '${data.response}'`); | ||
document.getElementById("valuetextbox").value = data.response; log(`Updated 'valuetextbox.value'`); // Set text box to decrypted message | ||
document.getElementById("valuetextbox").innerHTML = data.response; log(`Updated 'valuetextbox.innerHTML'`); // Set text box to decrypted message | ||
setTimeout(function () { | ||
$('#form_content').fadeIn('fast'); log(`Now showing 'form_content' element`); // fade in new content | ||
document.getElementById('valuetextbox').value = data.response; // Set text box to decrypted message | ||
log(`Updated 'valuetextbox.value'`); | ||
document.getElementById('valuetextbox').innerHTML = data.response; // Set text box to decrypted message | ||
log(`Updated 'valuetextbox.innerHTML'`); | ||
setTimeout(() => { | ||
$('#form_content').fadeIn('fast'); // fade in new content | ||
log(`Now showing 'form_content' element`); | ||
}, 200); | ||
} | ||
log(`Server responded with '${data.response}'`); | ||
}; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters