Code select all không hoạt động

  Bài viết hay nhất1
Mình có tìm được code SelectAll và add vào forum của mình. Nó hoạt động tốt. Nhưng thời gian gần đây nó không còn hoạt động nữa.

demo page: http://learn.forumvi.com/t2274-test-select-all

Code:
function selectCode(a) {
  a = $(a).closest(".codebox").find("CODE")[0];
  if (window.getSelection) {
      var b = window.getSelection();
      if (b.setBaseAndExtent) b.setBaseAndExtent(a, 0, a, a.innerText.length - 1);
      else {
        window.opera && "<BR>" == a.innerHTML.substring(a.innerHTML.length - 4) && (a.innerHTML += " ");
        var c = document.createRange();
        c.selectNodeContents(a);
        b.removeAllRanges();
        b.addRange(c)
      }
  } else document.getSelection ? (b = document.getSelection(), c = document.createRange(), c.selectNodeContents(a), b.removeAllRanges(), b.addRange(c)) : document.selection && (c = document.body.createTextRange(), c.moveToElementText(a), c.select())
}
$(function () {
  $(".post code").length && ($(".post code br").replaceWith("\n"),
      $(".post code").addClass("prettyprint linenums").parent().prev().attr({
        onclick: "selectCode(this)",
        title: "Click để chọn toàn bộ code",
        style: "cursor:pointer"
      }), $.getScript("http://devs.forumvi.com/11727.js", function () {
        prettyPrint()
      }));
});

Bác nào kiểm tra và đưa ra hướng xử lí lỗi giúp với.
Chân thành cảm ơn
  Bài viết hay nhất2
Vẫn hoạt động bình thường trên trình duyệt chrome và cốc cốc !
  Bài viết hay nhất3

loving9you wrote:Vẫn hoạt động bình thường trên trình duyệt chrome và cốc cốc !

Vậy hả bạn. Chắc máy của mình có lỗi. Cảm ơn bạn!

___ Update ___

Mình mới kiểm tra trên IE, vẫn chạy ổn. Bạn mod nào move giúp vào mục giải đáp nhé!
  Bài viết hay nhất4
You cannot reply to topics in this forum