How to change span "Messenger" to "Messages" using the console?

  • 0
    <li id="l_msg" class="">
      <a href="/im" onclick="return nav.go(this, event, {noback: true, params: {_ref: 'left_nav'}});" class="left_row">
        <span class="left_icon fl_l"></span>
        <span class="left_label inl_bl">Мессенджер</span>
        <span class="left_count_wrap fl_r"><span class="inl_bl left_count">37</span></span>
      </a>
    </li>


    How to change span "Messenger" to "Messages" using the console?
    JavaScript Anonymous, Apr 6, 2020

  • 1 Answers
  • 0
    document.querySelector ('# l_msg .left_label'). textContent = 'Messages';



    Even cooler:

    document.body.contentEditable = true

    and change what you want right on the page.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!