151
152
 
 
153
154
 
 

In Lemmy, we've removed the TopSixHours / TopXTime in favor of a more fine grained time_range_seconds field. You can see it in action in this PR

The problem is, we need a good UI picker for a time interval: IE things like 5 seconds, 4 days, 7 months, etc.

I've found a million libraries for specific date and time pickers, but not a single one for time intervals.

Does anyone know of any?

Thanks in advance.

155
 
 

if you've ever tried it, that is.

I'm considering giving it a go

156
157
 
 

Is there any js module for lazy-loading a files content? in vanilla js, (that a import via a script tag), so that if i scroll enough, it will send a request to the server for more of a files content, at a specific chunk of it, and the browser will add the rest of the content to the file viewer/editor

I am making a filebrowser, and so far i implemented navigating folders, uploading files, next I would like to make a file editor, so its not the html page itself I want lazy-loaded, I want a file to be lazy-loaded into the editor, again, so you scroll enough, and it will fetch the chunks from the server (i can figure out the backend bit, I would like it if it worked with multexjs or multipart in rust and I dont have to manually sort out file chunking but thats not a hard requirement.)

Alternative to modules would just be code i can use

158
159
160
161
 
 

Decentralized Architecture: https://positive-intentions.com/blog/decentralised-architecture

While my approach here could be considered overly complicated (because, well, it is), I'm trying something new, and it's entirely possible this strategy won't be viable long-term. My philosophy is "there's only one way to find out." I'm not necessarily recommending this approach, just sharing my journey and what I'm doing.

Potential Benefits

I've identified some interesting benefits to this approach:

While I often see module federation and microfrontends discouraged in online discussions, I believe they're a good fit for my specific approach. I'm optimistic about the benefits and wanted to share the details.

When serving the federated modules, I can also host the Storybook statics. I think this could be an excellent way to document the modules in isolation.

Modules and Applications

Here are some examples of the modules and how they're being used:

This setup allows me to create microfrontends that consume these modules, enabling me to share functionality between different applications. The following applications, which have distinct codebases (and a distinction between open and closed source), would be able to leverage this:

Sharing these dependencies should make it easier to roll out updates to core mechanics across these diverse applications.

Furthermore, this functionality also works when I create an Android build with Tauri. This could streamline the process of creating new applications that utilize these established modules.

Considerations and Future

I'm sure there will be some distinct testing and maintenance overhead with this architecture. However, depending on how it's implemented, I believe it could work and make it easier to improve upon the current functionality.

It's important to note that everything about this project is far from finished. Some might view this as an overly complicated way to achieve what npm already does. However, I think this approach offers greater flexibility by allowing for the separation of open and closed-source code for the web. Of course, being JavaScript, the "source code" will always be accessible, especially in the age of AI where reverse-engineering is more possible than ever before.

162
 
 

Watched this a while back throughout enjoyed it and thought i might share this here.

163
164
165
Promise-based pipe in JS (blog.kaki87.net)
submitted 1 year ago* (last edited 10 months ago) by to c/javascript@programming.dev
166
 
 
167
168
 
 

cross-posted from: https://lemmy.world/post/31859998

Please see the cross-post as it is updated.

As a security-conscious user, I've used NoScript since Firefox's early days, but its restrictive nature has become frustrating. I'm often forced to go unprotected just to access websites with multiple scripts running on different domains, which defeats the purpose of using NoScript and balances security and usability that it once provided.

Is there a way to block browser JavaScript from executing commands that retrieve sensitive information from my local machine, while still allowing JavaScript that is only used for rendering web pages?

greatly appreciate any insight

cross-posted from: https://lemmy.world/post/31859998

Please see the cross-post as it is updated.

169
170
Biome v2 released (biomejs.dev)
submitted 1 year ago by to c/javascript@programming.dev
171
submitted 1 year ago* (last edited 10 months ago) by to c/javascript@programming.dev
172
173
Jest 30 released (jestjs.io)
submitted 1 year ago by to c/javascript@programming.dev
174
175
view more: ‹ prev next ›