aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-27 23:02:01 +0300
committerGravatar Vitaly Takmazov2018-09-27 23:02:01 +0300
commita4318f24d446fea480c0a869c86d3a666511ae2f (patch)
treeeb4d76f155c8bda0aac61919fedaef80fd61ef3f
parent563966d66e812829779ff7184ff9b5d372e4b3aa (diff)
scripts: fix identation
-rw-r--r--juick-server/src/main/assets/scripts.js48
1 files changed, 24 insertions, 24 deletions
diff --git a/juick-server/src/main/assets/scripts.js b/juick-server/src/main/assets/scripts.js
index 2f86ea69..b43b8ff0 100644
--- a/juick-server/src/main/assets/scripts.js
+++ b/juick-server/src/main/assets/scripts.js
@@ -702,31 +702,31 @@ ready(function () {
});
}
var pmmsg = document.getElementById('pmmsg');
- if (pmmsg) {
- pmmsg.addEventListener('submit', e => {
- e.preventDefault();
- let formData = new FormData(pmmsg);
- fetch('/api/pm' + '?hash=' + document.getElementById('body').getAttribute('data-hash'), {
- method: 'POST',
- body: formData,
- credentials: 'omit'
- }).then(response => {
- if (response.ok) {
- response.json().then(result => {
- if (result.to) {
- window.location = new URL('/pm/sent', window.location.href);
- } else {
- alert('Something went wrong :(');
- }
- });
- } else {
- alert('Something went wrong :(');
- }
- }).catch(error => {
- alert(error.message);
- });
+ if (pmmsg) {
+ pmmsg.addEventListener('submit', e => {
+ e.preventDefault();
+ let formData = new FormData(pmmsg);
+ fetch('/api/pm' + '?hash=' + document.getElementById('body').getAttribute('data-hash'), {
+ method: 'POST',
+ body: formData,
+ credentials: 'omit'
+ }).then(response => {
+ if (response.ok) {
+ response.json().then(result => {
+ if (result.to) {
+ window.location = new URL('/pm/sent', window.location.href);
+ } else {
+ alert('Something went wrong :(');
+ }
+ });
+ } else {
+ alert('Something went wrong :(');
+ }
+ }).catch(error => {
+ alert(error.message);
});
- }
+ });
+ }
document.querySelectorAll('.msg-menu').forEach(function (el) {
el.addEventListener('click', function (e) {