diff --git a/blog.py b/blog.py index 4aedda03..16661781 100644 --- a/blog.py +++ b/blog.py @@ -10,7 +10,6 @@ import os from datetime import datetime from content import replaceEmojiFromTags -from webinterface import contentWarningScriptOpen from webinterface import getIconsDir from webinterface import getPostAttachmentsAsHtml from webinterface import htmlHeader @@ -256,7 +255,6 @@ def htmlBlogPostContent(authorized: bool, blogStr += '


' + blogSeparator + '\n' else: blogStr += blogSeparator + '

' + translate['Replies'] + '

\n' - blogStr += '\n' if not titleStr: blogStr += getBlogReplies(baseDir, httpPrefix, translate, nickname, domain, domainFull, diff --git a/webinterface.py b/webinterface.py index b885ad85..4812cfe7 100644 --- a/webinterface.py +++ b/webinterface.py @@ -79,10 +79,10 @@ def getContentWarningButton(postID: str, translate: {}, content: str) -> str: """Returns the markup for a content warning button """ - return '' + \ - '
' + \ - content + '
' + return '
' + \ + translate['SHOW MORE'] + '' + \ + '
' + content + \ + '
' def getBlogAddress(actorJson: {}) -> str: @@ -653,7 +653,6 @@ def htmlHashtagSearch(nickname: str, domain: str, port: int, # add the page title hashtagSearchForm = htmlHeader(cssFilename, hashtagSearchCSS) - hashtagSearchForm += '' hashtagSearchForm += '

#' + hashtag + '

' if startIndex > 0: @@ -883,7 +882,6 @@ def htmlHistorySearch(translate: {}, baseDir: str, historySearchCSS.replace('https://', httpPrefix + '://') historySearchForm = htmlHeader(cssFilename, historySearchCSS) - historySearchForm += '' # add the page title historySearchForm += \ @@ -2118,7 +2116,6 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int, iconsDir = getIconsDir(baseDir) profileStr = '' maxItems = 4 - profileStr += '' ctr = 0 currPage = 1 while ctr < maxItems and currPage < 4: @@ -2761,31 +2758,6 @@ def cursorToEndOfMessageScript() -> str: return script -def contentWarningScript() -> str: - """Returns a script used for content warnings - """ - script = 'function showContentWarning(postID) {\n' - script += ' var x=document.getElementById(postID);\n' - script += ' if (x.style.display !== "block") {\n' - script += ' x.style.display="block";\n' - script += ' } else {\n' - script += ' x.style.display="none";\n' - script += ' }\n' - script += '}\n' - return script - - -def contentWarningScriptOpen() -> str: - """Returns a script used for content warnings - The warning is open by default. This is used on blog replies. - """ - script = 'function showContentWarning(postID) {\n' - script += ' var x=document.getElementById(postID);\n' - script += ' x.style.display="block";\n' - script += '}\n' - return script - - def addEmbeddedAudio(translate: {}, content: str) -> str: """Adds embedded audio for mp3/ogg """ @@ -4580,9 +4552,6 @@ def htmlTimeline(defaultTimeline: str, maxSharesPerAccount, httpPrefix) + htmlFooter()) - # add the javascript for content warnings - tlStr += '' - # show todays events buttons on the first inbox page if boxName == 'inbox' and pageNumber == 1: if todaysEventsCheck(baseDir, nickname, domain): @@ -4861,8 +4830,7 @@ def htmlIndividualPost(recentPostsCache: {}, maxRecentPosts: int, """Show an individual post as html """ iconsDir = getIconsDir(baseDir) - postStr = '' - postStr += \ + postStr = \ individualPostAsHtml(recentPostsCache, maxRecentPosts, iconsDir, translate, None, baseDir, session, wfRequest, personCache, @@ -5059,7 +5027,6 @@ def htmlDeletePost(recentPostsCache: {}, maxRecentPosts: int, profileStyle = profileStyle.replace('https://', httpPrefix + '://') deletePostStr = htmlHeader(cssFilename, profileStyle) - deletePostStr += '' deletePostStr += \ individualPostAsHtml(recentPostsCache, maxRecentPosts, iconsDir, translate, pageNumber, @@ -6136,8 +6103,6 @@ def htmlProfileAfterSearch(recentPostsCache: {}, maxRecentPosts: int, profileStr += ' ' profileStr += '' - profileStr += '' - iconsDir = getIconsDir(baseDir) i = 0 for item in parseUserFeed(session, outboxUrl, asHeader,