LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code


WI†CH H⏀US∃ NᐃM∃ †HING
CSS
::selection {
  color: #fff;
  /* WebKit/Blink Browsers */
  background-color: #944;
}
::-moz-selection {
  color: #fff;
  background: #a34;
  /* Gecko Browsers */
}
* {
  box-sizing: border-box;
}
body {
  background-color: #000;
  font-family: "Poiret One";
}
.wrapper {
  width: 80%;
  margin: 0 auto;
  color: #fff;
  padding: 25px 20px;
}
.input {
  width: 100%;
  position: fixed;
  bottom: 0px;
  left: 0px;
  right: 0px;
}
.input input {
  text-transform: uppercase;
  text-align: center;
  width: 100%;
  font-size: 16px;
  padding: 28px 18px;
  border: none;
  color: #ddd;
  background-color: #000;
  border-top: 1px solid #222;
}
.input input:active,
.input input:focus {
  outline: none;
  color: #fee;
}
.output {
  text-align: center;
  margin-top: 3px;
  padding: 90px 10px;
  font-size: 68px;
  line-height: 80px;
  background-color: #000;
  color: #fff;
}
JS
console.clear()

input = $("input#user-input")
output = $("#out")

src = 'http://csbruce.com/software/utf-8.html'

dict = {
  'a': ['▲', '∧', 'Λ', 'ᐃ', 'ᴧ', '⋀', 'ᐞ', '∀'],
  'b': [],
  'c': ['ᐊ', '₵'],
  'd': ['ↁ'],
  'e': ['∃', '3', '∄', '≣'],
  'f': [],
  'g': [],
  'h': ['ʰ'],
  'i': ['ᴉ'],
  'j': [],
  'k': [],
  'l': ['⌊'],
  'm': [],
  'n': ['ɴ', 'Ͷ'],
  'o': ['▒', '∅', ' ⃣	', '∎', '◚', '⏀'],
  'p': [],
  'q': [],
  'r': [],
  's': ['$'],
  't': ['₸', '†','⊣', '⊺', '⏄'],
  'u': ['∪'],
  'v': ['▼', ],
  'w': ['⋈', '∨∨'],
  'x': ['✖', '✄'],
  'y': ['ʎ'],
  'z': [],
  ' ': ['_', '‸', '⋮', '•', '_', '⑊'],
  '1': [],
  '2': [],
  '3': [],
  '4': [],
  '5': [],
  '6': [],
  '0': [' ⃟', '☼'],
  '7': [],
  '8': [],
  '9': [],
  'oo': ['∞', '⺬⺬']
}

set = {}

randomChar = (letter) ->
  l = dict[letter].length
  return dict[letter][~~(Math.random()*l)]


witchify = (text) ->
  chance = 0.6
  return "" if text.length is 0
  letters = text.split("")
  n = letters.length - 1
  result = []
  for l in letters
    letter = l.toLowerCase()
    
    if set[letter] isnt undefined
      result.push set[letter]
      
    if set[letter] is undefined
      if (Math.random() >= chance) and (dict[letter] or []).length isnt 0
        set[letter] = randomChar(letter)
        result.push set[letter]
      else
        set[letter] = l.toUpperCase()
        result.push set[letter]
  
  return result.join("")
      
      
input.keyup (e) ->
  #console.log "changed?", this.value
	output.text(witchify(this.value))


$(document).click (e) ->
  if e.target.nodeName is "HTML"
    console.log "cycling", input.val()
    set = {}
    output.text(witchify(input.val()))
    
input.on "blur leave", () ->
  set = {}
  
  
  

Description

UTF-8 m8
Term
Mon, 11/27/2017 - 21:31

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv