daily pastebin goal
85%
SHARE
TWEET

Untitled

a guest Feb 21st, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script language="javascript">
  2.     $("div.post-content , .parsedsig").each(function(){
  3.         if($(this).html().indexOf("[/tabulaScriptum]") != -1) {
  4.              pattern = /[tabulaScriptum=(.*?)]([^[]*)[/tabulaScriptum]/gi
  5.              $(this).html($(this).html().replace(pattern, "<div class='tabulaScriptum'><div class='tabulaNomen'>$1</div><div class='tabulaImpleo'>$2</div></div>"))
  6.         }
  7.     });
  8. </script>
  9.    
  10. $("div.post-content .code-box .tabulaScriptum").each(function () {
  11.     var $this = $(this);
  12.     $this.before('[tabulaScriptum=]' + $this.text() + '[/tabulascriptum]');
  13.     $this.remove();
  14. });
  15.    
  16. // Temporarily render .code-box contained tabulas unrecognizable
  17. $('.code-box').each(function () {
  18.     var pattern = /[tabula/gi;
  19.         $(this).html($(this).html().replace(pattern, "[placeholder"));
  20. });
  21.  
  22. // Search / Replace, as before...
  23.  
  24. // Restore .code-box contained tabulas
  25. $('.code-box').each(function () {
  26.     var pattern = /[placeholder/gi;
  27.         $(this).html($(this).html().replace(pattern, "[tabula"));
  28. });​
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top