TP Reader
How do I make an tp reader?
What is a tp reader? How do you make a tp reader? This script and codes were developed by Eprouver on 15 September 2022, Thursday.
TP Reader - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>TP Reader</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
</head>
<body> <div class="container"> <h1>Nimi Lukin</h1> <p>Copy TP text below and click 'tawa pona'.</p> <p>Hover over lower text to see definitions.</p> <form> <div class="form-container"> <textarea id="source" rows="6" class="form-control">
telo li anpa tan pimeja walo suli
mi pilin e waso lon poka mi
waso li tawa kon li tawa ma luka luka weka wan
mi kepeken e nimi kepeken ala kalama
waso li alasa e kon mi </textarea> </div> <br/> <div class="row"> <div class="col-xs-6"> <div class="btn btn-danger btn-block" onclick="$('#source, #output').empty()">sin</div> </div> <div class="col-xs-6"> <div class="btn btn-success btn-block" onclick="replaceWords($('#source').val())">pana</div> </div> </div> </form> <hr/> <div id="output"> </div>
</div> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'></script>
<script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
TP Reader - Script Codes JS Codes
var words = [];
function replaceWords(txt) { txt = txt.split('\n'); var output = $('#output').empty(); txt.forEach(function(line){ var div = $('<p>'); line.split(' ').forEach(function(v){ div.append($('<span>').addClass('replace').text(v.replace(/[^\w\s]|_/g, "") + ' ')) }) output.append(div); }) $('.replace').each(function(i, s) { s = $(s); var avail = words.filter(function(v) { return v.word == s.text().trim(); }); var avail = _.sample(avail); //s.data('def', avail); s.attr('data-trigger', "hover"); if(!avail){ s.popover({ placement: 'top', content: 'nimi ala :(' }); s.css({ color: '#f66' }) return; } s.popover({ title: '<strong>' + avail.word + '</strong>', placement: 'top', html: true, content: avail.definitions.map(function(v){ return '<li>' + v.part + '. - ' + v.definition + '</li>' }) }) })
}
$.get('https://raw.githubusercontent.com/EvanHahn/toki-pona-to-hex/master/words.json', function(text) { words = JSON.parse(text).words; words = _(words).map(function(w) { w.definitions = w.definitions.map(function(d) { var def = d.split(':'); return { part: def[0], definition: def[1] } }); return w; });
})
Developer | Eprouver |
Username | eprouver |
Uploaded | September 15, 2022 |
Rating | 3 |
Size | 2,402 Kb |
Views | 20,240 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by eprouver | 1,599 Kb |
Wave Transitions | 3,245 Kb |
Toki Pona Boggle | 3,874 Kb |
Spaceship Battle | 5,012 Kb |
Exploding Squares | 2,770 Kb |
Google Speech | 26,860 Kb |
Square Friends Dropping By | 2,337 Kb |
Spinning Cubes | 2,315 Kb |
Sort the Knowlege | 3,915 Kb |
Weather Map | 32,525 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Nested flexbox layout for library catalog | Boycetrus | 3,271 Kb |
Expert Help | SinceSidSlid | 4,064 Kb |
Sign Up Form | Sicontis | 5,272 Kb |
Playing with FlexBox | _Billy_Brown | 3,162 Kb |
Calculator - codevember 08 - 2016 | Caiocares | 3,260 Kb |
Ghost | Mghayour | 11,738 Kb |
Parallax with only CSS | Thulioph | 2,297 Kb |
Countdown Timer | Massiebn | 3,001 Kb |
Atom | Bhlaird | 1,932 Kb |
Css color for svg | Ademilter | 2,392 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!