العمدة السيد

...

You are not connected. Please login or register

อ่านหัวข้อก่อนหน้า อ่านหัวข้อถัดไป Go down ข้อความ [หน้า 1 จาก 1]

  1. Admin
    • Admin

    Admin
    عدد : 35
    نقاط : 142
    سمعة : 0
    تاريخ التسجيل : 22/03/2015
    عمر : 50
    موقع : http://facebookabdo.forumegypt.net

    1
    لصندوق الاكواد2 Empty لصندوق الاكواد2 Mon Sep 21, 2015 1:10 am

    Code:
    (function() {
          var style = document.createElement("style");
          style.type = "text/css";
          style.innerHTML =
              'code.jsCode_block, pre.jsCode_block {' +
              '  background-color: #FAFAFA !important;' +
              '  border: 1px solid #C9C9C9 !important;' +
              '  color: #000000;' +
              '  font-family: Consolas,"Bitstream Vera Sans Mono","Andale Mono",Monaco,"DejaVu Sans Mono","Lucida Console",monospace !important;' +
              '  font-size: 11px !important;' +
              '  line-height: 110% !important;' +
              '  margin-top: 0 !important;' +
              '  max-height: 250px !important;' +
              '  overflow: auto !important;' +
              '  padding: 5px !important;' +
              '  white-space: pre-wrap !important;' +
              '  width: auto !important;' +
              '}' +
              '.jsCodetop {' +
              '  background-color: #FFDEAD !important;' +
              '  color: #1D3652;' +
              '  font-size: 10px;' +
              '  font-weight: bold;' +
              '  line-height: 100%;' +
              '  margin-top: 5px;' +
              '  padding: 2px 1px 2px 3px;' +
              '}' +
              '.jsCodetop button {' +
              '  background: -moz-linear-gradient(center top , #EDEDED 5%, #DFDFDF 100%) repeat scroll 0 0 #EDEDED;' +
              '  border: 1px solid #BBBBBB;' +
              '  border-radius: 3px 3px 3px 3px;' +
              '  color: #1D3652;' +
              '  cursor: pointer;' +
              '  display: inline-block;' +
              '  font-size: 10px;' +
              '  padding: 0 6px;' +
              '  text-decoration: none;' +
              '}' +
              '.jsCodetop button:hover {' +
              '  background: -moz-linear-gradient(center top , #DFDFDF 5%, #EDEDED 100%) repeat scroll 0 0 #DFDFDF;' +
              '  border-color: #9A9A9A;' +
              '  color: #3D70A3;' +
              '}' +
              '.jsCodetop button:active {' +
              '  position: relative;' +
              '  top: 1px;' +
              '}' +
              'pre.jsCode_block.expand, code.jsCode_block.expand {' +
              '  max-height: 100% !important;' +
              '}' +
              'pre ol.linenums {' +
              '  color: #afafaf;' +
              '  font-size: 12px;' +
              '  list-style: outside none decimal;' +
              '  padding: 5px 0 5px 42px !important;' +
              '  margin: -16px 0 0;' +
              '  width: auto;' +
              '}' +
              'pre ol.linenums li > span {' +
              '  color: #000000;' +
              '}' +
              'pre ol.linenums li {' +
              '  border-left: 3px solid #6ce26c;' +
              '  padding-left: 15px;' +
              '  list-style: inherit;' +
              '  font-size: inherit !important;' +
              '}';
          document.getElementsByTagName("head")[0].appendChild(style);
        })();

        jQuery(function() {
          var tagCode = jQuery('.cont_code, code'),
              codebox = null;

          for (var i = 0, len = tagCode.length; i < len; i++) {
              codebox = jQuery(tagCode[i]).closest('.codebox');
              codebox.before(
                '<div class="jsCodetop">Code &nbsp; &nbsp; &nbsp; &nbsp;<button onclick="jsCodeExpand(this); return false;">expand</button>' +
                '  <button style="display: none" onclick="jsCodeCollapse(this); return false;">collapse</button>&nbsp; ' +
                '  <button onclick="jsCodeSelect(this); return false;">select</button>&nbsp; ' +
                '  <button onclick="jsCodePopup(this); return false;">popup</button>&nbsp; ' +
                '  <button style="margin-right: 50px; float: right;" onclick="jsCodeAbout(this); return false;">?</button>' +
                '</div>' +
                '<pre class="jsCode_block">' +
                '  <ol class="linenums">' + tagCode[i].innerHTML.replace(/<br>/mg, '<li class="L1"><span>') + '</ol>' +
                '</pre>'
              );
              codebox.remove();
          }
        });

        function jsCodeExpand(oThis) {
          jQuery(oThis).css('display', 'none');
          jQuery(oThis).next().css('display', '');
          jQuery(oThis).parent().next('pre.jsCode_block').addClass('expand');
        }

        function jsCodeCollapse(oThis) {
          jQuery(oThis).css('display', 'none');
          jQuery(oThis).prev().css('display', '');
          jQuery(oThis).parent().next('pre.jsCode_block').removeClass('expand');
        }

        function jsCodePopup(oThis) {
          var content = jQuery(oThis).parent().next('pre.jsCode_block').html();
          var my_window = window.open("", "To select the code: [Ctrl] + [A]", "scrollbars=1toolbar=no,menubar=no,personalbar=no,status=0,left=0,location=0,menubar=0,top=0,width=640,height=480");
          my_window.document.write('<pre>' + content + '</pre>');
        }

        function jsCodeAbout(oThis) {
          alert('Simple code to add line counter fuctionality for Forumotion\n\nBy JScript FROM Brazil - 2015/04/10\n');
        }

        function jsCodeSelect(oThis) {
          var doc = document;
          var text = jQuery(oThis).parent().next('pre.jsCode_block')[0];
          if (doc.body.createTextRange) {
              var range = doc.body.createTextRange();
              range.moveToElementText(text);
              range.select();
          } else if (window.getSelection) {
              var selection = window.getSelection();
              var range = doc.createRange();
              range.selectNodeContents(text);
              selection.removeAllRanges();
              selection.addRange(range);
          }
        }

  2. Admin
    • Admin

    Admin
    عدد : 35
    نقاط : 142
    سمعة : 0
    تاريخ التسجيل : 22/03/2015
    عمر : 50
    موقع : http://facebookabdo.forumegypt.net

    2
    لصندوق الاكواد2 Empty Re: لصندوق الاكواد2 Tue Sep 22, 2015 2:06 am

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

  3. Admin
    • Admin

    Admin
    عدد : 35
    نقاط : 142
    سمعة : 0
    تاريخ التسجيل : 22/03/2015
    عمر : 50
    موقع : http://facebookabdo.forumegypt.net

    3
    لصندوق الاكواد2 Empty Re: لصندوق الاكواد2 Tue Sep 22, 2015 2:07 am

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

    Message reputation : 100% (1 vote)
  4. Admin
    • Admin

    Admin
    عدد : 35
    نقاط : 142
    سمعة : 0
    تاريخ التسجيل : 22/03/2015
    عمر : 50
    موقع : http://facebookabdo.forumegypt.net

    4
    لصندوق الاكواد2 Empty Re: لصندوق الاكواد2 Thu Sep 24, 2015 4:29 am

    Code:
            function selectCode(a)            {            // Get ID of code block            var e = jQuery(a).closest('tr').next().find('.cont_code')[0];            // Not IE            if (window.getSelection)            {            var s = window.getSelection();            // Safari            if (s.setBaseAndExtent)            {            s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);            }            // Firefox and Opera            else            {            // workaround for bug # 42885            if (window.opera && e.innerHTML.substring(e.innerHTML.length - 4) == '<BR>')            {            e.innerHTML = e.innerHTML + ' ';            }            // All Rights Reserved a7medvirus            var r = document.createRange();            r.selectNodeContents(e);            s.removeAllRanges();            s.addRange(r);            }            }            // Some older browsers            else if (document.getSelection)            {            var s = document.getSelection();            var r = document.createRange();            r.selectNodeContents(e);            s.removeAllRanges();            s.addRange(r);            }            // IE            else if (document.selection)            {            var r = document.body.createTextRange();            r.moveToElementText(e);            r.select();            }            }            jQuery(function(){            jQuery('div.postbody td.code').parent().prev().find('b').html('الرمز :            <a href="javascript:void()" onClick="selectCode(this)"><font            face="verdana" color="red"></font> تضليل المحتوي </a>');            }); 

อ่านหัวข้อก่อนหน้า อ่านหัวข้อถัดไป ขึ้นไปข้างบน ข้อความ [หน้า 1 จาก 1]

...
...

Permissions in this forum:
คุณไม่สามารถพิมพ์ตอบ

var prefixes=["Share","Code","Skin","Thắc mắc"];var _pm=false;var chk=false;function toMenu(a){var htmlpre='';return htmlpre}function checkpre(ar,input){for(i in ar){var p=new RegExp("\\"+ar[i],"g");var title=input.substr(0,input.indexOf(']'));if(p.test(title))return ar[i]}return""}$(function(){if(_pm)chk=/\privmsg/.test(location.href);if(/\/post/.test(location.href)||chk){$(toMenu(prefixes)).insertBefore("input[name=subject][type=text]");var mw=$("#prefix").width()+5;$("input[name=subject]").css("width",$("input[name=subject]").width()-mw);var t=$("[name=subject]").val();var cur=checkpre(prefixes,t);if(cur!=""){$("[value="+cur+"]").attr("selected","selected");$("input[name=subject]").val(t.replace('['+cur+']','').trim())}$("input[name=post]").click(function(){var sub=$("input[name=subject]").val().trim();if(sub!=""&&$("#prefix").val()!="")$("input[name=subject]").val("["+$("#prefix").val()+"] "+sub)})}});function selectCode(a){var e=a.parentNode.parentNode.getElementsByTagName('CODE')[0];if(window.getSelection){var s=window.getSelection();if(s.setBaseAndExtent){s.setBaseAndExtent(e,0,e,e.innerText.length-1)}else{if(window.opera&&e.innerHTML.substring(e.innerHTML.length-4)=='
'){e.innerHTML=e.innerHTML+' '}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()}}if(text)else{var text='Selecionar todos'}jQuery(document).ready(function(){jQuery("dl.codebox dt").not("dl.spoiler > dt").html('Code: Chọn Code ')});

 
  • .Free forum | ©phpBB | Free forum support | การรายงานการใช้งานที่ไม่เหมาะสม | การสนทนาล่าสุด