Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <header>
  <h1><a href="https://codepen.io/knoa/full/BaNBvRO">カモレレロ変換器 <small>Electroharmonix Converter</small></a></h1>
  <p>Hello と打てば、カモレレロ と変換します。</p>
</header>
<textarea id="from" placeholder="Hello"></textarea>
<textarea id="to" placeholder="カモレレロ"></textarea>
<footer>
  <p>カモレレロ変換器は、<a href="http://typodermicfonts.com/electroharmonix/" target="_top">Electroharmonix</a> フォントの字形を元に、日本の文字で表現しきれない一部の文字を独自にアレンジして作られています。</p>
  <p>入力された内容はどこにも送信されずお手元のコンピュータ上で変換されるので、絶対に日本人に読まれたくない極秘スパイ暗号などにも安心してご利用いただけます。</p>
  <address>Twitter: <a href="https://twitter.com/kantankikaku" target="_top">@kantankikaku</a> <a href="https://twitter.com/hashtag/%E3%82%AB%E3%83%A2%E3%83%AC%E3%83%AC%E3%83%AD%E5%A4%89%E6%8F%9B%E5%99%A8" target="_top">#カモレレロ変換器</a></address>
</footer>
              
            
!

CSS

              
                header{
  background: royalblue;
  padding: 1px;
}
header h1{
  font-size: 200%;
  font-weight: bold;
  margin: 1vw 1vw 0 calc(1vw - .05em);
}
header h1 a{
  color: white !important;
  text-decoration: none !important;
}
header h1 a small{
  color: lightgray;
  margin-left: .5em;
}
header p{
  color: white;
  font-size: 90%;
  margin: .5vw 1vw .25vw;
}
p, textarea{
  margin: 1vw;
}
textarea{
  width: 80vw;
  height: 5em;
}
footer{
  font-size: 80%;
  text-align: left;
  color: gray;
}
footer p,
footer address{
  margin: .1em 1vw;
}
              
            
!

JS

              
                const ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789*#,.!? ';
const ELECTRISH = 'ム乃匸ワモチ彑カエ丁ケレ巾冂ロアQ尺丂ナ凵レ山メソ乙ム乃匸ワモチ彑カエ丁ケレ巾冂ロアQ尺丂ナ凵レ山メソ乙ロ亻己ヨ丩丂石フ日夕米井、。!? ';
const MAP = {};
Array.from(ALPHABET).forEach((c, i) => MAP[c] = ELECTRISH[i]);
let from = document.querySelector('textarea#from');
let to = document.querySelector('textarea#to');
from.addEventListener('input', function(e){
  to.value = Array.from(from.value).map(c => MAP[c] || c).join('');
});
              
            
!
999px

Console