aopsenhanced.user.js
// Credit to @happycupcake for hide/quote unblocker.
Credit to @happycupcake for hide/quote unblocker.
Credit to @happycupcake for hide / quote unblocker .
function hideunblocker(post_text) {
  let ret = "";
  let depth = -1;
  post_text.split("[hide").forEach((fragment) => {
    if (depth == 3) {
      ret += "$\\phantom{[/hide]}$[hide" + fragment;
    } else if (depth == -1) {
      ret += fragment;
    } else {
      ret += "[hide" + fragment;
      depth++;
    }
    for (var i of fragment.matchAll(/\[\/hide]/g)) {
      depth--;
    }
    if (depth < 0) {
      depth = 0;
    }
  });
  return ret;
}
function hideunblocker ( post_text ) { let ret = "" ; let depth = - 1 ; post_text . split ( "[hide" ) . forEach ( ( fragment ) => { if ( depth == 3 ) { ret += "$\\phantom{[/hide]}$[hide" + fragment ; } else if ( depth == - 1 ) { ret += fragment ; } else { ret += "[hide" + fragment ; depth ++ ; } for ( var i of fragment . matchAll ( / \[\/hide] / g ) ) { depth -- ; } if ( depth < 0 ) { depth = 0 ; } } ) ; return ret ; }
Credit to @happycupcake for hide/quote unblocker.
Credit to @happycupcake for hide / quote unblocker .