From 4a43bc239dc70c1e8225bcd4ac597b94c2531ef1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 28 Oct 2022 21:09:56 +0200 Subject: [PATCH] remove formatting buttons (useless bloat) --- files/assets/js/formatting.js | 57 --------------------------- files/templates/comments.html | 14 ------- files/templates/default.html | 4 -- files/templates/settings_profile.html | 12 ------ files/templates/submission.html | 9 ----- files/templates/submit.html | 13 ------ files/templates/userpage.html | 12 ------ 7 files changed, 121 deletions(-) delete mode 100644 files/assets/js/formatting.js diff --git a/files/assets/js/formatting.js b/files/assets/js/formatting.js deleted file mode 100644 index 8271ae463..000000000 --- a/files/assets/js/formatting.js +++ /dev/null @@ -1,57 +0,0 @@ - -function makeBold(form) { - var text = document.getElementById(form); - var startIndex = text.selectionStart, - endIndex = text.selectionEnd; - var selectedText = text.value.substring(startIndex, endIndex); - - const format = '**' - - if (selectedText.includes('**')) { - text.value = selectedText.replace(/\*/g, ''); - } - else if (selectedText.length == 0) { - text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex); - } - else { - text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex); - } -} - -function makeItalics(form) { - var text = document.getElementById(form); - var startIndex = text.selectionStart, - endIndex = text.selectionEnd; - var selectedText = text.value.substring(startIndex, endIndex); - - const format = '*' - - if (selectedText.includes('*')) { - text.value = selectedText.replace(/\*/g, ''); - } - else if (selectedText.length == 0) { - text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex); - } - else { - text.value = text.value.substring(0, startIndex) + format + selectedText + format + text.value.substring(endIndex); - } -} - -function makeQuote(form) { - var text = document.getElementById(form); - var startIndex = text.selectionStart, - endIndex = text.selectionEnd; - var selectedText = text.value.substring(startIndex, endIndex); - - const format = '>' - - if (selectedText.includes('>')) { - text.value = text.value.substring(0, startIndex) + selectedText.replace(/\>/g, '') + text.value.substring(endIndex); - } - else if (selectedText.length == 0) { - text.value = text.value.substring(0, startIndex) + selectedText + text.value.substring(endIndex); - } - else { - text.value = text.value.substring(0, startIndex) + format + selectedText + text.value.substring(endIndex); - } -} \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index ea110c5d9..ed81aafa8 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -262,13 +262,6 @@
- -   - -   - -   -   @@ -511,13 +504,6 @@
- -   - -   - -   - diff --git a/files/templates/default.html b/files/templates/default.html index 378f91d56..e104ba43b 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -142,10 +142,6 @@ -{% if v %} - -{% endif %} - {% if v and v.spider %} diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 69a358512..d6a73768a 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -576,12 +576,6 @@
- -   - -   - -     @@ -650,12 +644,6 @@
- -   - -   - -     diff --git a/files/templates/submission.html b/files/templates/submission.html index cc0aaae52..e134ba121 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -799,9 +799,6 @@
- - - @@ -984,12 +981,6 @@
- -   - -   - -   diff --git a/files/templates/submit.html b/files/templates/submit.html index dd5f4fdc2..20a0daf7e 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -76,18 +76,6 @@ Toggle preview
- - - -   - - - -   - - - -     @@ -173,7 +161,6 @@ {% endif %} - {% include "emoji_modal.html" %} {% include "gif_modal.html" %} diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 9a30d55ca..445410d3a 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -211,12 +211,6 @@

 							
 							

-							
-							 
-							
-							 
-							
-							 
 							
 							 
 							
@@ -463,12 +457,6 @@
 						 
 						
 						

-						
-						 
-						
-						 
-						
-