|
|
@ -80,6 +80,34 @@ const DIAGRAM_4_B = |
|
|
|
'┃ complex │ │ │ │ ✓ │ ✓ ┃\n' + |
|
|
|
'┗━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━┷━━━━━━━━━┷━━━━━━━━┛\n'; |
|
|
|
|
|
|
|
const DIAGRAM_5_A = |
|
|
|
"+----------------+--------------+---------------+---------------+---------------+\n" + |
|
|
|
"| | {<float>:.2} | {<float>:.2f} | {<float>:.2e} | {<float>:.2%} |\n" + |
|
|
|
"+----------------+--------------+---------------+---------------+---------------+\n" + |
|
|
|
"| 0.000056789 | '5.7e-05' | '0.00' | '5.68e-05' | '0.01%' |\n" + |
|
|
|
"| 0.00056789 | '0.00057' | '0.00' | '5.68e-04' | '0.06%' |\n" + |
|
|
|
"| 0.0056789 | '0.0057' | '0.01' | '5.68e-03' | '0.57%' |\n" + |
|
|
|
"| 0.056789 | '0.057' | '0.06' | '5.68e-02' | '5.68%' |\n" + |
|
|
|
"| 0.56789 | '0.57' | '0.57' | '5.68e-01' | '56.79%' |\n" + |
|
|
|
"| 5.6789 | '5.7' | '5.68' | '5.68e+00' | '567.89%' |\n" + |
|
|
|
"| 56.789 | '5.7e+01' | '56.79' | '5.68e+01' | '5678.90%' |\n" + |
|
|
|
"| 567.89 | '5.7e+02' | '567.89' | '5.68e+02' | '56789.00%' |\n" + |
|
|
|
"+----------------+--------------+---------------+---------------+---------------+\n"; |
|
|
|
|
|
|
|
const DIAGRAM_5_B = |
|
|
|
"┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┓\n" + |
|
|
|
"┃ │ {<float>:.2} │ {<float>:.2f} │ {<float>:.2e} │ {<float>:.2%} ┃\n" + |
|
|
|
"┠────────────────┼──────────────┼───────────────┼───────────────┼───────────────┨\n" + |
|
|
|
"┃ 0.000056789 │ '5.7e-05' │ '0.00' │ '5.68e-05' │ '0.01%' ┃\n" + |
|
|
|
"┃ 0.00056789 │ '0.00057' │ '0.00' │ '5.68e-04' │ '0.06%' ┃\n" + |
|
|
|
"┃ 0.0056789 │ '0.0057' │ '0.01' │ '5.68e-03' │ '0.57%' ┃\n" + |
|
|
|
"┃ 0.056789 │ '0.057' │ '0.06' │ '5.68e-02' │ '5.68%' ┃\n" + |
|
|
|
"┃ 0.56789 │ '0.57' │ '0.57' │ '5.68e-01' │ '56.79%' ┃\n" + |
|
|
|
"┃ 5.6789 │ '5.7' │ '5.68' │ '5.68e+00' │ '567.89%' ┃\n" + |
|
|
|
"┃ 56.789 │ '5.7e+01' │ '56.79' │ '5.68e+01' │ '5678.90%' ┃\n" + |
|
|
|
"┃ 567.89 │ '5.7e+02' │ '567.89' │ '5.68e+02' │ '56789.00%' ┃\n" + |
|
|
|
"┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┛\n"; |
|
|
|
|
|
|
|
|
|
|
|
// isFontAvailable:
|
|
|
|
(function(d){function c(c){b.style.fontFamily=c;e.appendChild(b);f=b.clientWidth;e.removeChild(b);return f}var f,e=d.body,b=d.createElement("span");b.innerHTML=Array(100).join("wi");b.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;");var g=c("monospace"),h=c("serif"),k=c("sans-serif");window.isFontAvailable=function(b){return g!==c(b+",monospace")||k!==c(b+",sans-serif")||h!==c(b+",serif")}})(document); |
|
|
@ -89,6 +117,7 @@ if (!isFontAvailable('Menlo')) { |
|
|
|
$(`code:contains(${DIAGRAM_2_B})`).html(DIAGRAM_2_A); |
|
|
|
$(`code:contains(${DIAGRAM_3_B})`).html(DIAGRAM_3_A); |
|
|
|
$(`code:contains(${DIAGRAM_4_B})`).html(DIAGRAM_4_A); |
|
|
|
$(`code:contains(${DIAGRAM_5_B})`).html(DIAGRAM_5_A); |
|
|
|
// var htmlString = $('code:contains(ᴺᴱᵂ)').html().replace(/ᴺᴱᵂ/g, '');
|
|
|
|
// $('code:contains(ᴺᴱᵂ)').html(htmlString);
|
|
|
|
} |
|
|
|