Results 1 to 1 of 1

Thread: BB Code Update

  1. #1
    Glorious Leader I.M.O.G.'s Avatar
    Join Date
    Nov 2002
    Location
    Rootstown, OH
    Posts
    25,172

    BB Code Update

    The BBCODE for "code" has been updated. If you use the code tags now, there will be a button that allows you to select all, to ease the process of highlighting if you want to copy the contents of the box.

    Code:
    <script type="text/javascript">
    function selectCode(a)
    {
       var e = a.parentNode.getElementsByTagName('PRE')[0];
       if (window.getSelection)
       {
          var s = window.getSelection();
           if (s.setBaseAndExtent)
          {
             s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
          }
          else
          {
             var r = document.createRange();
             r.selectNodeContents(e);
             s.removeAllRanges();
             s.addRange(r);
          }
       }
       else if (document.getSelection)
       {
          var s = document.getSelection();
          var r = document.createRange();
          r.selectNodeContents(e);
          s.removeAllRanges();
          s.addRange(r);
       }
       else if (document.selection)
       {
          var r = document.body.createTextRange();
          r.moveToElementText(e);
          r.select();
       }
    }
    </script>
    The OC Forums Way
    We are a team. We are a community. We are a fellowship made strong by mutual respect and shared dedication to the task of enriching all who come here.
    The OC Forums Thank You Thread
    Put your computer to work for our OC Forum Teams!
    Try out our POST TEMPLATES, they save you time answering common questions!

    I spend half my money on CPUs, GPUs, and Liquid Nitrogen. The other half I waste.

  2. Thanks!

    Shelnutt2 (08-09-11)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •