lipu-linku / lipu-pini Goto Github PK
View Code? Open in Web Editor NEWToki Pona dictionary running vanilla js. Replaced by https://github.com/lipu-linku/lipu
Home Page: https://pini.linku.la
License: GNU General Public License v3.0
Toki Pona dictionary running vanilla js. Replaced by https://github.com/lipu-linku/lipu
Home Page: https://pini.linku.la
License: GNU General Public License v3.0
In the lipu Linku website, I found it annoying how most of the time you search, you will have to scroll down to find your result.
For example if you search "la", it returns results such as "ala", "alasa", "kala", and "kalama" before the exact match "la", because they rank higher alphabetically.
I found a fix to this would be to sort the dictionary of 256 words in the mirror/database first by character length, and then alphabetically, then the search results are always like that too.
I don't know how to code, so I just did it manually using regex, and it works a lot better imo. It still isn't perfect, for example if you just search "ake", it will return "pake" before "akesa" because it's fewer letters, but that doesn't matter so much imo.
The states of the detailed mode & definition search checkboxes aren't preserved when you reload the page.
This is because they don't have default values, and only the checkboxes that have default values get stored to localStorage, so I think you should make them have default values.
In line 616 of scripts.js, a comment says "do not save, user consideration", idk what that means, it also says it's like this because otherwise it's laggy, but I ran it on my computer and I don't think it's laggy.
There’s a hint in the jasima Linku page:
To import the database on your website, use:
<script src="https://lipu-linku.github.io/jasima/data.json"></script>
How am I supposed to use this on my site?
As far as I understand, in order to do something useful with the json, I have to load it from javascript like that:
const response = await fetch('https://lipu-linku.github.io/jasima/data.json');
const json = await response.json();
// do something with `json`
Am I wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.