Commit 24aa1a43 authored by intrigeri's avatar intrigeri
Browse files

tails-documentation: re-add support for passing a HTML anchor as the second argument.

This was dropped when the script was rewritten in Python, presumably becausethe
WebKit viewer does not support it (?). We do use this functionality in at least
one place.

Now that we open the doc in Tor Browser when online, we can re-add this support.
parent 4fba04a3
......@@ -87,6 +87,11 @@ try:
except IndexError:
page = 'getting_started'
try:
anchor = sys.argv[2]
except IndexError:
anchor = None
wiki_path = '/usr/share/doc/tails/website'
lang_code = os.getenv('LANG', 'en')[0:2]
......@@ -98,6 +103,8 @@ if os.system('/usr/local/sbin/tor-has-bootstrapped') == 0:
uri = 'https://tails.boum.org/' + page + '/index.' + lang_code + '.html'
else:
uri = 'https://tails.boum.org/' + page
if anchor is not None:
uri = uri + '#' + anchor
os.execv('/usr/local/bin/tor-browser',
['/usr/local/bin/tor-browser', '--new-tab',
uri])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment