World Wild Web > ☮︎ ∙ Other Communities & Webrings

[Release] LibreRing: Make your own webring!

(1/2) > >>

Guest:
Hey there!


Due to frustrations with the popular options for creating a webring, I decided to write my own webring script from scratch that addresses all of these issues!

Its notable improvements over various alternatives include:

* Works flawlessly with XHTML sites too due to properly formatted and closed HTML tags.
* Licensed as free and open source software under a sane, legally enforceable and free license: the LGPL v3 or later.
* A main logo badge, next/previous site links, a random site feature, and an info button.
* All in one richly commented and easy to understand javascript file; sacrificing technical elegance for readability.
* Customizable; both a text and a graphical template included, plus you can just edit the HTML in the script to change its output.
··· CLICK HERE  :) ···
Feel free to set up your own LibreRing, and if you do so, consider joining the official LibreRing users' webring on the same site, designed to be a meta-webring to discover more webrings!

Melooon:
This is cool! We definitely need a few ring script alternatives!  :grin:

HOWEVER, since you are someone who tends to appreciate a bit of pickiness about details; I made a few edits for you  :tongue: (I haven't tested this so made needs a fix or two, also feel free to ignore if you don't like this approach)

In general, it's better not to use global variables; particularly if your script is gonna run on someone else's site where you don't know what other scripts they might have and they might even have multiple instances of your script running! I can see you avoided that a bit by using the ring name in the variable names, but it's still better to use a single global object that you can be sure is unique. Also simplified a few of the if/else statements for clarity, and merged the duplicated URLs since most people won't need to edit those.

Guest:

--- Quote from: Melooon on March 12, 2023 @737.79 ---HOWEVER, since you are someone who tends to appreciate a bit of pickiness about details; I made a few edits for you  :tongue: (I haven't tested this so made needs a fix or two, also feel free to ignore if you don't like this approach)

--- End quote ---

Hey Melon, thanks for the suggestions!
The WEBRINGNAME array holding all data is a cool idea, and with your permission I'd merge the all-in-one-array approach into the file.

However, some of the other things are by design:

* 'let' and 'const' were added to the Javascript standard in 2015 and therefore will break compatibility with older systems. I will keep using vars for that reason.
* The image URLs were not concatenated because many people do not have their webring on the top level: if the ring URL is example.com/webring.html, then .../webring.html/badge.png won't make sense.

Melooon:
Thats a good point, I didn't think about older browsers  :omg:  And of course, I posted it so you could merge changes if you wanted to!

SilkSkull:
Hey this is awesome! I would love to set this up but when I clicked to download the JS file it just opened it in a new tab, is this just a firefox issue?

Navigation

[0] Message Index

[#] Next page

Go to full version