Vocabulary dictionary

Kanji dictionary

Grammar dictionary

Sentence lookup

test
 

Forums - renshuu user mods - Discussion and Suggestions

Top > renshuu.org > Developer corner



avatar
マイコー
Level: 325
Note: this is not yet a planned feature. It will depend on the activity and interest in this thread, which will help me examine the reality and difficulty of implementation.

Backdrop


There is a lot of changes that users have requested over the years that do not depend on access to renshuu's code base, but can be done with changes to the css/javascript within what is sent to the renshuu app/website. A few examples:

1. Color changes (theming)
2. Visual changes (smaller/larger text, different widths on certain boxes, different spacing, etc.
3. Interactive changes (keyboard shortcuts, buttons to automate actions on renshuu, etc.)

Many of these are excellent, but fall outside of my ability to implement them (time constraints), and can be niche in scope, so they would not be something I'd want to turn on for everyone.

User mod concept

1. Allow web developers to upload "mods" to renshuu for use by themselves and other users. These could be a mixture of css, javascript, or both.

2. All scripts would not be usable unless they were verified by me or another verified helper. This is to ensure the following:

2a. They do not break anything on renshuu (functionality wise)

2b. They do what they say they do

2c. They do not contain any code that interacts with third parties (other websites, apis, etc.) that might cause the loss or exposure of user credentials.

3. Similar to extensions or plugins for web browsers, users could then turn on and off. There would be a way to apply ratings, add comments/requests via a mini-forum, gets updates, etc.


Concerns

1. Although I feel like this can be verified through submissions, security and privacy is obviously of paramount importance - if I cannot guarantee this, then I do not think it will be worth doing.

2. renshuu is BIG. A discussion over mod scope would be necessary, as the bigger the changes, the larger the chance that it'll cause issues elsewhere. It would then be easy for a user to think "oh, renshuu is not working", instead of "this mod may be causing the issue".

3. renshuu's code is a mess - the css is all over the place, as is the javascript, and the DOM itself is not the cleanest, so I am not sure how "sloppy" the code in these mods will end up being. I am wondering if there will need to be a way for developers to request better marking (say, class names or ids) in certain areas of renshuu to allow them to target the right elements.

4. Although access to external urls will be disallowed, I think it would be very interesting to allow mod developers access to renshuu's api, so actually new functionality could be added to certain pages. I haven't thought too deeply on this, but it's possible.


What I'd like to hear from you! (Developers)

1. What do you think would be good and bad about such a system?

2. If this was available today, what mods would you want to make?

3. Do you think some kind of very simple "IDE" (for lack of a better term) would be necessary to write up and test the mods, or would external tools (tampermonkey, etc.) be enough for testing?

4. Anything else about this.


As noted above, response and discussion within this thread will determine if I move forward with this project.

5
3 days ago
avatar

I'm quite excited for this, even though I might not have a lot of time to work on mods kao_yoroshiku.png


2. I'd probably finish my "quiz timer" and make it into a proper mod. Would also re-submit a few versions of my CSS Theme. I've been using it since the CSS Contest, so I'd like to add a few options, and update a few things. Apart from that, maybe some quick, minor QOL mods.

3. I don't mind working with external tools, but it would be nice to have something more dedicated. Not strictly "necessary".


It could be worth having a few additional requirements for submissions. For example—a short documentation, and clear comments along with your code. This should help with moderation and verification. I, for one, find deciphering other people's code very annoying and often time-consuming.

This would, of course, depend on the scope and size of the mod.


"I am wondering if there will need to be a way for developers to request better marking (say, class names or ids) in certain areas of renshuu to allow them to target the right elements." — This would be nice to have, but not strictly required. It's also something that could be added down the line.


Question: When you say "access to external urls will be disallowed", does that mean we're not allowed to link to external libraries (e.g. from CDNs)? If not, would including the min.js file be allowed? I guess not, since you'd need to scan it to make sure it hasn't been tampered with?

I don't have anything in mind, just asking in general. I do remember someone wanted confetti on quiz completion (100% accuracy), and I sure as hell 'ain't writing that from scratch :D


Apart from that, I think it could be worth starting out with just CSS. Depending on how that goes, you can always expand to include JS.

Looking forward to seeing what everyone else thinks :)

2
3 days ago
avatar
myuu3
Level: 30

copying a previous post of mine here

"yea, for css at least validation check and then probably sri hash with an immutable url serverside and then when a user wants to use a mod, the mod code can be displayed directly as raw version of the immutable source with a verification check run on the hash. though probably easier thing would be for users to submit mods and u just check/verify them and pick the ones u like the most and then users can select the ones they want to enable."

as for things here in this thread i think linking in official js things or woffs from like google or smthin is ok, but maybe disclaimer popup that Michael and users not responsible for accident if server changes code? depending on license, pinned versions can be mirrored onto renshuu CDN and served from there to prevent supply chain issue or interruption

as for mods mine are mainly visual ones like progress bars, and then accessibility like left hand mode and lots more key bindings and a few other dynamic loading things.

in early stages, approved mods could be where user can view immutable as well even but then click button to enable them just like enabling any other feature maybe. so mods that have been preapproved or something to start?

mayb can b done in stages like css ones first then js ones later kao_nozoki.png

i totally understand safety first. ok i also interest in seeing other opinions on it!

1
1 day ago
avatar
マイコー
Level: 325
Only local code - no third party libraries, even well trusted ones.

No plans to allow unapproved ones - it will be a light approval process in a similar way that apps must be approved to go onto app/play stores.
2
1 day ago
avatar
myuu3
Level: 30

2 more things i think of

be clear about licensing, that code submitted is something like MIT, unlicense, or apache2 or something or copyright transferred to you

other thing is i think is be clear about "good faith" restrictions like dont want people submitting things for like changing different fonts which is a benefit of being a subscribed member. so just like a "please dont submit features that are replications of paid offerings"

kao_heart.png

0
1 day ago
avatar
マイコー
Level: 325

I'll probably make the code public domain for anyone to use. As far as the good faith thing goes - it'll be in the rules, but given that there will not be a way for a mod to be used until it is approved, I do not foresee any real issues with that part.

2
21 hours ago
Getting the posts




Top > renshuu.org > Developer corner


Loading the list
Lv.

Sorry, there was an error on renshuu! If it's OK, please describe what you were doing. This will help us fix the issue.

Characters to show:





Use your mouse or finger to write characters in the box.
■ Katakana ■ Hiragana