Advertisement
Guest User

css 4 jelte

a guest
Jun 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. JAVASCRIPTS:
  2.  
  3. <script type="text/javascript">
  4. (function($) {
  5. var regex = [/\[css\s*=([^"']+?)\]([\s\S]+?)\[\/css\]/gi, /position\s*:(?:[^;:]+?;|[^;:]+$)?/i];
  6. $('td.c_post').each(function() {
  7. var $t = $(this),
  8. html = $t.html(),
  9. change = false;
  10.  
  11. while (regex[0].test(html)) {
  12. change = true;
  13. html = html.replace(regex[0], function(f, o, t, p) {
  14. return '<div style="' + o.replace(regex[1], '') + '">' + t + '</div>';
  15. });
  16. }
  17. if (change)
  18. $t.html(html);
  19. });
  20. })(jQuery);
  21. </script>
  22.  
  23. ABOVE THE BOARD:
  24.  
  25. <br>
  26. <p style="color:#e77700"><strong><marquee behavior="scroll" direction="left" scrollamount="9" onmouseover="this.stop()" onmouseout="this.start()"> </a></marquee></p></strong>
  27.  
  28. BELOW THE BOARD:
  29.  
  30. <script type='text/javascript'>
  31. //Tabs BBCode by Quozzo
  32. $('.c_post:contains("[/tabs]"):not(:has("textarea"))').each(function(){
  33. $(this).html($(this).html().replace(/\[tabs(?:=([^'"]+?))?\]([\s\S]+?)\[\/tabs\]/gi, function(tabs,g1,g2) {
  34. var tabrollheader="",
  35. tabcount = 2,
  36. tabrollbody = "";
  37. g2.replace(/\[tab=(.+?)\]([\s\S]+?)\[\/tab\]/gi, function(tab,h1,h2) {
  38. tabrollheader += "<td class='tabtab' name='"+tabcount+"' style='cursor:pointer;'>"+h1+"</td>";
  39. tabrollbody += "<div class='tabdiv' style='display:none;'>"+h2+"</div>";
  40. tabcount++
  41. });
  42. if(g1){tabwidth = " style='width:"+g1+"'";}else{tabwidth = "";};
  43. tabrollhead = "<table"+tabwidth+" class='posttabs'><tr><td style='width:5px;border-top:0;border-left:0;background:none;'></td>";
  44. tabroll = "</tr><tr><td colspan='"+tabcount+"'>"+tabrollbody+"</td></tr></table>";
  45. tabrollheader += "<td style='width:5px;border-top:0;border-right:0;background:none;'></td></tr>";
  46. return tabrollhead+tabrollheader+tabroll;
  47. }));
  48. });
  49.  
  50. $('.posttabs').each(function(){
  51. $(this).find('.tabtab:first').addClass("activetab");
  52. $(this).find('.tabdiv:first').show();
  53. });
  54.  
  55. $('.tabtab').live('click', function(){
  56. $(this).parent().parent().find('.activetab').removeClass('activetab');
  57. $(this).addClass('activetab');
  58. var tabnum = $(this).attr('name');
  59. tabnum=tabnum-2;
  60. $(this).parent().parent().find('.tabdiv').hide();
  61. $(this).parent().parent().find('.tabdiv:eq('+tabnum+')').show();
  62. });
  63.  
  64. $('#c_bbcode button:last').after(" <button type='button' onClick='gettabs(1)'>Tabs</button>")
  65.  
  66. function gettabs(num){
  67. switch(num){
  68. case 1:
  69. tabroll = "";
  70. gettabs(2)
  71. break;
  72. case 2:
  73. tabtitle = prompt("What is the title of the tab","");
  74. if(tabtitle){gettabs(3)}else{gettabs(6)};
  75. break;
  76. case 3:
  77. tabcontent = prompt("What are the contents of the tab","");
  78. if(tabcontent){gettabs(4)}else{gettabs(5)};
  79. break;
  80. case 4:
  81. tabroll += "[tab="+tabtitle+"]"+tabcontent+"[/tab]";
  82. gettabs(2)
  83. break;
  84. case 5:
  85. conf = confirm("Quit making tabs? You will lose what have done so far.");
  86. if(!conf){gettabs(2)};
  87. break;
  88. case 6:
  89. if(tabroll.length>0){
  90. text = $('textarea[name=post]').val();
  91. $('textarea[name=post]').val(text+"[tabs]"+tabroll+"[/tabs]");
  92. };
  93. };
  94. };
  95. </script>
  96. <style type='text/css'>
  97. .activetab{
  98. font-weight: 900;
  99. }
  100. </style>
  101.  
  102.  
  103. <script type="text/javascript">
  104. (function($) {
  105. var regex = [/\[css\s*=([^"']+?)\]([\s\S]+?)\[\/css\]/gi, /position\s*:(?:[^;:]+?;|[^;:]+$)?/i];
  106. $('td.c_post').each(function() {
  107. var $t = $(this),
  108. html = $t.html(),
  109. change = false;
  110.  
  111. while (regex[0].test(html)) {
  112. change = true;
  113. html = html.replace(regex[0], function(f, o, t, p) {
  114. return '<div style="' + o.replace(regex[1], '') + '">' + t + '</div>';
  115. });
  116. }
  117. if (change)
  118. $t.html(html);
  119. });
  120. })(jQuery);
  121.  
  122. </script>
  123.  
  124. <script type="text/javascript" src="http://z3.ifrm.com/63/1/0/p476647/BBCode_in_Topic_Titles.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement