User:So9q/new-entry-creator.js/documentation
Jump to navigation
Jump to search
This script is meant to replace the official NEC.
It adds a tab on top next to watch when installed to your common.js, it is best partnered with User:So9q/CreateTranslation.js and they can be installed with:
importScript( 'User:So9q/CreateTranslation.js' ); // Backlink: [[User:So9q/CreateTranslation.js]] importScript( 'User:So9q/new-entry-creator.js' ); // Backlink: [[User:So9q/new-entry-creator.js]]
Customization
[edit]Default language
[edit]It can be customized by setting this variable like this in your common.js:
window.NEC_default_code == 'en'
Code structure
[edit]The code is structured in a dozen helper functions.
- First we get initialize the variables from GET if any.
- Then we check whether it is a stem update of inflections or if it is a first run.
- Then we call the processor with the relevant sub array from the necinfl object and display the result
- When "generate" is pressed we collect the values and generate the wikicode.