V-baivong
V-baivong
  
  Associate your Facebook account
V-baivong

You are not connected. Please login or register

boxCode by devs forumvi

   

Admin

#1boxCode by devs forumvi Empty Sat Mar 08, 2014 9:06 am

Admin
Admin 

Nam

Aquarius

Horse

Tổng số bài gửi : 20

Points : 103

Reputation : 20

Birthday : 16/02/1990

Join date : 02/01/2011

Age : 34

Đến từ : kk

Job/hobbies : Việc làm/Sở thích

Humor : Phương châm

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("/11727.js", function () {
      prettyPrint();
      $(".codebox dd.cont_code").prepend('<img class="textCode" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==
" /><input class="findLine" size="4" maxlength="4" type="text" />');
      $(".codebox dd.cont_code .findLine").on("input", function () {
         this.value = /\d+/g.exec(this.value);
         $(window).scrollTop($(this).offset().top)
      }).keydown(function (a) {
         if (13 == a.keyCode) {
            a = parseInt(this.value, 10);
            var b = $(this).next(),
               c = b.offset().top,
               h = b.height(),
               s = c + h,
               d = 17 * a - 7;
            if (0 == a || d + 13 > h) d = h - 20;
            $(window).scrollTop(c + d);
            this.value = ""
         }
      });
      $(".textCode").click(function () {
         $(this).toggleClass("pretty");
         var code = $(this).next().next();
         if ($(this).hasClass("pretty")) {
            $("li", code).after("\n");
            code.removeClass().text(function () {
               return $(this).text()
            }).html(function () {
               return $(this).html().replace(/\n/g, "<br />")
            });
         } else {
            $(".post code br").replaceWith("\n");
            code.addClass("prettyprint linenums");
            prettyPrint();
         }
      });
   }));
});
   https://baivong.forumvi.com
       
Khách viếng thăm

#2boxCode by devs forumvi Empty Mon Mar 10, 2014 10:07 pm

[You must be registered and logged in to see this link.]
   
       
Admin

#3boxCode by devs forumvi Empty Mon Mar 10, 2014 10:43 pm

Admin
Admin 

Nam

Aquarius

Horse

Tổng số bài gửi : 20

Points : 103

Reputation : 20

Birthday : 16/02/1990

Join date : 02/01/2011

Age : 34

Đến từ : kk

Job/hobbies : Việc làm/Sở thích

Humor : Phương châm

[You must be registered and logged in to see this link.]
   https://baivong.forumvi.com
       
Admin

#4boxCode by devs forumvi Empty Mon Mar 24, 2014 1:08 pm

Admin
Admin 

Nam

Aquarius

Horse

Tổng số bài gửi : 20

Points : 103

Reputation : 20

Birthday : 16/02/1990

Join date : 02/01/2011

Age : 34

Đến từ : kk

Job/hobbies : Việc làm/Sở thích

Humor : Phương châm

ddddddddddddddd
   https://baivong.forumvi.com
       
Sponsored content

#5boxCode by devs forumvi Empty

   
       

[Trang 1 trong tổng số 1 trang]

Liên kết ngoài diễn đàn

zzbaivong devs
zzpoll www.devs.cf

Thông tin chuyên mục

Bạn không có quyền trả lời bài viết