User talk:מקף/wikilambda editsource.js
Latest comment: 18 days ago by מקף in topic New wikilambda editsource script!🔌λ
New wikilambda editsource script!🔌λ
Moved from Wikifunctions:Project chat/Archive/2024/04#New wikilambda editsource script!🔌λ. · מקף Hyphen ෴ · 12:56, 10 May 2024 (UTC)
Hi everybody,
I created a script for a source code editor👆.
Hope it will be useful, and I would be even more happy if other JS programmers and interface editors agree to help me improve it, and maybe turn it into a gadget.
For now, you can easily try using it by jumping into Special:mypage/common.js and adding the following line:
mw.loader.load( '//www.wikifunctions.org/w/index.php?title=User:מקף/wikilambda_editsource.js&action=raw&ctype=text/javascript' ); // [[:f:User:מקף/wikilambda_editsource.js]]
Feedback is welcome.
Thank you, · מקף Hyphen ෴ · 02:18, 2 April 2024 (UTC)
- Can you say a bit more about what it does and in which circumstances you expect it to be most useful? --99of9 (talk) 05:17, 2 April 2024 (UTC)
- The script retrieves the content of the edited item, represented in JSON format (Wikifunctions:Function_model). It allows the editor to access the raw representation directly, and edit it textually.
- This feature is especially useful when there is a need or preference to perform operations, which are not easy to perform in the user interface. The interface includes a built-in limitation of repetitive selection and typing (which are also done in an order that cannot be changed or started in the middle/end).
For exmple:- Typing a long list of strings (such as Hebrew list of strings: Number names (default-female) (Z14617)).
- Import content that the user has produced elsewhere.
- Copying from one item to another, with some specific changes.
- Splitting an item
- Changing internal order (such as replacing the order of composition of multiple functions) without retyping everything.
- ...and maybe other things I haven't thought of.
I also created this script as a possible basic infrastructure for creating future scripts that can accompany and help us edit. For example, tasks suggest translations for fields with common names.
- ...and maybe other things I haven't thought of.
- ~ · מקף Hyphen ෴ · 17:42, 2 April 2024 (UTC)
- I have added the script to Wikifunctions:User scripts. --Ameisenigel (talk) 19:51, 2 April 2024 (UTC)
- @99of9 it also allows using an edit summary, something that is sorely lacking for the normal editing of connecting/disconnecting implementations and tests --DannyS712 (talk) 01:09, 9 April 2024 (UTC)