Open blocked links in a different tab

main
Bob Mottram 2021-07-23 14:50:32 +01:00
parent 4ebbe4916b
commit 0c36d99e28
2 changed files with 11 additions and 4 deletions

View File

@ -512,6 +512,7 @@ def _getCommonWords() -> str:
'using', 'uses', 'https', 'still', 'want', 'wants'
)
def _updateWordFrequency(content: str, wordFrequency: {}) -> None:
"""Creates a dictionary containing words and the number of times
that they appear

View File

@ -145,7 +145,9 @@ def htmlAccountInfo(cssCache: {}, translate: {},
ctr = 1
for postDomain, blockedPostUrls in domainDict.items():
infoForm += '<a href="' + \
httpPrefix + '://' + postDomain + '">' + postDomain + '</a> '
httpPrefix + '://' + postDomain + '" ' + \
'target="_blank" rel="nofollow noopener noreferrer">' + \
postDomain + '</a> '
if isBlockedDomain(baseDir, postDomain):
blockedPostsLinks = ''
urlCtr = 0
@ -153,7 +155,9 @@ def htmlAccountInfo(cssCache: {}, translate: {},
if urlCtr > 0:
blockedPostsLinks += '<br>'
blockedPostsLinks += \
'<a href="' + url + '">' + url + '</a>'
'<a href="' + url + '" ' + \
'target="_blank" rel="nofollow noopener noreferrer">' + \
url + '</a>'
urlCtr += 1
blockedPostsHtml = ''
if blockedPostsLinks:
@ -194,7 +198,8 @@ def htmlAccountInfo(cssCache: {}, translate: {},
followingDomain, followingPort = getDomainFromActor(actor)
followingDomainFull = \
getFullDomain(followingDomain, followingPort)
infoForm += '<a href="' + actor + '">' + \
infoForm += '<a href="' + actor + '" ' + \
'target="_blank" rel="nofollow noopener noreferrer">' + \
followingNickname + '@' + followingDomainFull + \
'</a><br><br>\n'
infoForm += '</div>\n'
@ -211,7 +216,8 @@ def htmlAccountInfo(cssCache: {}, translate: {},
followerNickname = getNicknameFromActor(actor)
followerDomain, followerPort = getDomainFromActor(actor)
followerDomainFull = getFullDomain(followerDomain, followerPort)
infoForm += '<a href="' + actor + '">' + \
infoForm += '<a href="' + actor + '" ' + \
'target="_blank" rel="nofollow noopener noreferrer">' + \
followerNickname + '@' + followerDomainFull + '</a><br><br>\n'
infoForm += '</div>\n'