diff options
| author | Radiohotline <radiohotline@disroot.org> | 2026-02-17 12:12:37 +0000 |
|---|---|---|
| committer | Radiohotline <radiohotline@disroot.org> | 2026-02-17 12:12:37 +0000 |
| commit | 223ef7acb24356fca6cf5ab40c02b43a09452093 (patch) | |
| tree | d845297a50e78f9ca9c37c113b78b8a2aaa1c138 /webring/linuxring/script/onionring-index.js | |
| parent | cae6b00e0f3352a323af2400bf7f9deb7460c7de (diff) | |
| parent | 37522616a3efcaa3c7b40821155e8f1fff5c9985 (diff) | |
about
Diffstat (limited to 'webring/linuxring/script/onionring-index.js')
| -rw-r--r-- | webring/linuxring/script/onionring-index.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webring/linuxring/script/onionring-index.js b/webring/linuxring/script/onionring-index.js new file mode 100644 index 0000000..0365b69 --- /dev/null +++ b/webring/linuxring/script/onionring-index.js @@ -0,0 +1,20 @@ +// onionring.js is made up of four files - onionring-widget.js, onionring-index.js (this one!), onionring-variables.js, and onionring.css +// it's licensed under the cooperative non-violent license (CNPL) v4+ (https://thufie.lain.haus/NPL.html) +// it was originally made by joey + mord of allium (蒜) house, last updated 2020-11-24 + +// === ONIONRING-INDEX === +//this file builds the list of sites in the ring for displaying on your index page + +var tag = document.getElementById('index'); +regex = /^https:\/\/|\/$/g; //strips the https:// and trailing slash off the urls for aesthetic purposes + +list = ""; +for (i = 0; i < sites.length; i++) { + list += `<li><a href='${sites[i]}'>${sites[i].replace(regex, "")}</a></li>`; +} + +tag.insertAdjacentHTML('afterbegin', ` +<ul> +${list} +</ul> +`); |
