Update navigator.rb

added previous_content? to replace redundant code.