forked from indymedia/epicyon
Newlines
parent
7924f831e5
commit
d4c277dffd
|
@ -1358,9 +1358,9 @@ def clickToDropDownScript() -> str:
|
||||||
"""Function run onclick to create a dropdown
|
"""Function run onclick to create a dropdown
|
||||||
"""
|
"""
|
||||||
script= \
|
script= \
|
||||||
'function dropdown() {' \
|
'function dropdown() {\n' \
|
||||||
' document.getElementById("myDropdown").classList.toggle("show");' \
|
' document.getElementById("myDropdown").classList.toggle("show");\n' \
|
||||||
'}'
|
'}\n'
|
||||||
#'window.onclick = function(event) {' \
|
#'window.onclick = function(event) {' \
|
||||||
#" if (!event.target.matches('.dropbtn')) {" \
|
#" if (!event.target.matches('.dropbtn')) {" \
|
||||||
#' var dropdowns = document.getElementsByClassName("dropdown-content");' \
|
#' var dropdowns = document.getElementsByClassName("dropdown-content");' \
|
||||||
|
@ -1380,28 +1380,28 @@ def cursorToEndOfMessageScript() -> str:
|
||||||
This avoids the cursor being in the wrong position when replying
|
This avoids the cursor being in the wrong position when replying
|
||||||
"""
|
"""
|
||||||
script = \
|
script = \
|
||||||
"var replyTextArea = document.getElementById('message');" \
|
"var replyTextArea = document.getElementById('message')\n" \
|
||||||
'replyTextArea.onFocus = function() {' \
|
'replyTextArea.onFocus = function() {\n' \
|
||||||
' var theVal = replyTextArea.value;' \
|
' var theVal = replyTextArea.value;\n' \
|
||||||
' replyTextArea.value = theVal;' \
|
' replyTextArea.value = theVal;\n' \
|
||||||
'}' \
|
'}\n' \
|
||||||
'window.onload = function() {' \
|
'window.onload = function() {\n' \
|
||||||
" document.getElementById('message').focus();" \
|
" document.getElementById('message').focus();\n" \
|
||||||
'};'
|
'}\n'
|
||||||
return script
|
return script
|
||||||
|
|
||||||
def contentWarningScript() -> str:
|
def contentWarningScript() -> str:
|
||||||
"""Returns a script used for content warnings
|
"""Returns a script used for content warnings
|
||||||
"""
|
"""
|
||||||
script= \
|
script= \
|
||||||
'function showContentWarning(postID) {' \
|
'function showContentWarning(postID) {\n' \
|
||||||
' var x = document.getElementById(postID);' \
|
' var x = document.getElementById(postID);\n' \
|
||||||
' if (x.style.display !== "block") {' \
|
' if (x.style.display !== "block") {\n' \
|
||||||
' x.style.display = "block";' \
|
' x.style.display = "block";\n' \
|
||||||
' } else {' \
|
' } else {\n' \
|
||||||
' x.style.display = "none";' \
|
' x.style.display = "none";\n' \
|
||||||
' }' \
|
' }\n' \
|
||||||
'}'
|
'}\n'
|
||||||
return script
|
return script
|
||||||
|
|
||||||
def htmlRemplaceEmojiFromTags(content: str,tag: {}) -> str:
|
def htmlRemplaceEmojiFromTags(content: str,tag: {}) -> str:
|
||||||
|
|
Loading…
Reference in New Issue