mirror of https://gitlab.com/bashrc2/epicyon
Open left column shared item in same tab
parent
28b3d5b020
commit
4a13a0685d
|
@ -168,6 +168,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
if linksList and sharesList:
|
if linksList and sharesList:
|
||||||
linksList = sharesList + linksList
|
linksList = sharesList + linksList
|
||||||
|
|
||||||
|
newTabStr = ' target="_blank" rel="nofollow noopener noreferrer"'
|
||||||
if linksList:
|
if linksList:
|
||||||
htmlStr += '<nav>\n'
|
htmlStr += '<nav>\n'
|
||||||
for lineStr in linksList:
|
for lineStr in linksList:
|
||||||
|
@ -218,22 +219,30 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
|
||||||
if lineStr.endswith(','):
|
if lineStr.endswith(','):
|
||||||
lineStr = lineStr[:len(lineStr)-1]
|
lineStr = lineStr[:len(lineStr)-1]
|
||||||
# add link to the returned html
|
# add link to the returned html
|
||||||
htmlStr += \
|
if '?showshare=' not in linkStr:
|
||||||
' <p><a href="' + linkStr + \
|
htmlStr += \
|
||||||
'" target="_blank" ' + \
|
' <p><a href="' + linkStr + \
|
||||||
'rel="nofollow noopener noreferrer">' + \
|
'"' + newTabStr + '>' + \
|
||||||
lineStr + '</a></p>\n'
|
lineStr + '</a></p>\n'
|
||||||
|
else:
|
||||||
|
htmlStr += \
|
||||||
|
' <p><a href="' + linkStr + \
|
||||||
|
'">' + lineStr + '</a></p>\n'
|
||||||
linksFileContainsEntries = True
|
linksFileContainsEntries = True
|
||||||
elif lineStr.startswith('=> '):
|
elif lineStr.startswith('=> '):
|
||||||
# gemini style link
|
# gemini style link
|
||||||
lineStr = lineStr.replace('=> ', '')
|
lineStr = lineStr.replace('=> ', '')
|
||||||
lineStr = lineStr.replace(linkStr, '')
|
lineStr = lineStr.replace(linkStr, '')
|
||||||
# add link to the returned html
|
# add link to the returned html
|
||||||
htmlStr += \
|
if '?showshare=' not in linkStr:
|
||||||
' <p><a href="' + linkStr + \
|
htmlStr += \
|
||||||
'" target="_blank" ' + \
|
' <p><a href="' + linkStr + \
|
||||||
'rel="nofollow noopener noreferrer">' + \
|
'"' + newTabStr + '>' + \
|
||||||
lineStr.strip() + '</a></p>\n'
|
lineStr.strip() + '</a></p>\n'
|
||||||
|
else:
|
||||||
|
htmlStr += \
|
||||||
|
' <p><a href="' + linkStr + \
|
||||||
|
'">' + lineStr.strip() + '</a></p>\n'
|
||||||
linksFileContainsEntries = True
|
linksFileContainsEntries = True
|
||||||
else:
|
else:
|
||||||
if lineStr.startswith('#') or lineStr.startswith('*'):
|
if lineStr.startswith('#') or lineStr.startswith('*'):
|
||||||
|
|
Loading…
Reference in New Issue