Dyslexia Reading simulator

by Ryan Perez

HTML

<p>I channel my ancestors 
They give the zap!
Zap is us.
Zap us and we will zap you right back.
All colors found in black. 
but zap is light.
So take flight.
Fuck with my ancestors.
You won't sleep at night. 
We send back your hate. 
Zap wipes your legacy.
Zap will determine your fate.
Zap is correction. 
Zap isn't hate. 
Black magic Is not tragic. 
Zap is balance..it is matriarchy.
Zap is carbon
zap is ether. 
Zap is God.
Zap is woman. 
It's the womb.
It has the power to create,
It has the power to destroy. 
Harmony is the key.
Beauty in the melody.
My zap is strong.
Powerful to make yoni wet.
powerful to make my dick long
It zap.
I will zap your microbes. 
All your cells get electrified. 
Shake up your egg.
You know
Powerful to make an embryo grow. 
It don't work on the white.
You know why.
Can't curse the curse 
Stay away. Watch them close.
They can't rap. Tap. They don't have that zap.
Zap is love. Zap is hurt. Zap is death. Zap is birth. 
Zap is rhythm.
Zap is light so Take flight.
Take head.
zap is all things and everything in between.
I have the zap.</p>


<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300;600&display=swap" rel="stylesheet">

CSS

p {
    font-family: arial;
    line-height: 25px;
    color:grey;
   letter-spacing: .5px;
   font-family: 'Quicksand', sans-serif;

}

JavaScript

function boldFirstHalf(str) {
  var words = str.split(' ');
  var result = '';
  for (var i = 0; i < words.length; i++) {
    var word = words[i];
    var half = Math.ceil(word.length / 2);
    result += '<b>' + word.substring(0, half) + '</b>' + word.substring(half) + ' ';
  }
  return result;
}

var paragraphs = document.getElementsByTagName('p');
for (var i = 0; i < paragraphs.length; i++) {
  var paragraph = paragraphs[i];
  paragraph.innerHTML = boldFirstHalf(paragraph.innerHTML);
}