Trusted, Automoderated users
17,538
edits
Line 41: | Line 41: | ||
# In Firefox or Chrome, right click on the TOC, inspect element, then right-click on the first <ul> element, click Copy, then Outer HTML | # In Firefox or Chrome, right click on the TOC, inspect element, then right-click on the first <ul> element, click Copy, then Outer HTML | ||
# Replace links with MediaWiki syntax and remove bullet points using <code>list-style: none</code> | # Replace links with MediaWiki syntax and remove bullet points using <code>list-style: none</code> | ||
## On Linux this can be done like so: <code>xclip -o| sed -e | ## On Linux this can be done like so: <code>xclip -o| sed -e 's/<a href="/[[/; s/"><span/|<span/; s/<\/a>/]]/; s/<ul>/<ul style="list-style: none;">/' | xclip -sel c</code>. This command requires <code>sudo apt get install xclip</code> to be installed. The converted TOC is then in pasteboard. |