Merge pull request #123 from Brobin/selfpost_121
opens selfposts internally instead of in the browser
This commit is contained in:
@@ -106,12 +106,15 @@ class SubredditPage(BasePage):
|
|||||||
@SubredditController.register(curses.KEY_ENTER, 10, 'o')
|
@SubredditController.register(curses.KEY_ENTER, 10, 'o')
|
||||||
def open_link(self):
|
def open_link(self):
|
||||||
"Open a link with the webbrowser"
|
"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':
|
||||||
open_browser(url)
|
self.open_submission()
|
||||||
|
else:
|
||||||
global history
|
url = data['url_full']
|
||||||
history.add(url)
|
open_browser(url)
|
||||||
|
global history
|
||||||
|
history.add(url)
|
||||||
|
|
||||||
@SubredditController.register('c')
|
@SubredditController.register('c')
|
||||||
def post_submission(self):
|
def post_submission(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user