opens selfposts internally instead of in the browser

This commit is contained in:
Brobin
2015-07-28 17:03:15 -05:00
parent b913990d80
commit 4278d32a00

View File

@@ -106,10 +106,13 @@ class SubredditPage(BasePage):
@SubredditController.register(curses.KEY_ENTER, 10, 'o')
def open_link(self):
"Open a link with the webbrowser"
data = self.content.get(self.nav.absolute_index)
url = self.content.get(self.nav.absolute_index)['url_full']
if data['url'] == 'selfpost':
self.open_submission()
else:
url = data['url_full']
open_browser(url)
global history
history.add(url)