summaryrefslogtreecommitdiff
path: root/webring/linuxring/script
diff options
context:
space:
mode:
Diffstat (limited to 'webring/linuxring/script')
-rw-r--r--webring/linuxring/script/onionring-index.js20
-rw-r--r--webring/linuxring/script/onionring-variables.js94
-rw-r--r--webring/linuxring/script/onionring-variablesnew.js9
-rw-r--r--webring/linuxring/script/onionring-variablesold.js94
-rw-r--r--webring/linuxring/script/onionring-widget.js73
-rw-r--r--webring/linuxring/script/onionring.css38
-rw-r--r--webring/linuxring/script/tuxicon.pngbin0 -> 16213 bytes
7 files changed, 328 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>
+`);
diff --git a/webring/linuxring/script/onionring-variables.js b/webring/linuxring/script/onionring-variables.js
new file mode 100644
index 0000000..393308a
--- /dev/null
+++ b/webring/linuxring/script/onionring-variables.js
@@ -0,0 +1,94 @@
+// onionring.js is made up of four files - onionring-widget.js, onionring-index.js, onionring-variables.js (this one!), 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-VARIABLES ===
+//this file contains the stuff you edit to set up your specific webring
+
+//the full URLs of all the sites in the ring
+var sites = [
+ 'https://teethinvitro.neocities.org/',
+ 'https://iwillneverbehappy.neocities.org/',
+ 'https://xn--ug8ht8h.ws/',
+ 'http://wirlaburla.worlio.com/',
+ 'https://hoppingtopping.com/',
+ 'https://kaa.neocities.org/',
+ 'https://foreverliketh.is/',
+ 'https://karma.computer/',
+ 'https://azuremillennium.neocities.org/',
+ 'https://i330.dev/',
+ 'https://alan460.is-hella.gay',
+ 'https://crystal.tilde.institute',
+ 'https://skeleg.org',
+ 'https://cronico.neocities.org',
+ 'https://theaio.neocities.org/',
+ 'https://risingthumb.xyz',
+ 'https://leap123.neocities.org',
+ 'https://tepiloxtl.net/',
+ 'https://antares.neocities.org/',
+ 'https://avas.space/',
+ 'https://0xf0xx0.eth.limo',
+ 'https://ophanimkei.com/',
+ 'https://kinisis.xyz/',
+ 'http://baccyflap.com/',
+ 'https://exlitry.world/',
+ 'https://circulars.dev/',
+ 'https://tommi.space/',
+ 'https://patrickwu.space/',
+ 'https://corvidae.digital/',
+ 'https://raum.neocities.org/',
+ 'https://avidseeker.github.io',
+ 'https://www.dreamwingsthegriffon.com/',
+ 'https://nicolabelluti.me',
+ 'https://xx-starbrite-xx.neocities.org',
+ 'https://heart143.neocities.org',
+ 'https://cassiecandles.net/',
+ 'https://mkultra.monster',
+ 'https://tiagorangel.com/',
+ 'https://sharkcave.me/',
+ 'https://scuti.neocities.org/',
+ 'https://appak.neocities.org',
+ 'https://myrdin.cx',
+ 'https://clygro.cc/',
+ 'https://fish.golf',
+ 'https://dagurthehorrible.neocities.org/',
+ 'https://spider-kyle.neocities.org/',
+ 'https://regirock.net',
+ 'https://hazelthats.me',
+ 'https://alexisgaming95.neocities.org',
+ 'https://gorkem.cc',
+ 'https://riomc.cloud',
+ 'https://unpop.neocities.org/',
+ 'https://shittyweb.org/',
+ 'https://pogmom.me',
+ 'https://april.nekoweb.org/',
+ 'https://goodgirl.dev/',
+ 'https://sor.neocities.org/',
+ 'https://www.starcrush.net',
+ 'https://bytesofprogress.net/',
+ 'https://projectc190.neocities.org',
+ 'https://privatenoob.top/',
+ 'https://alexzeecomedy.com',
+ 'https://wheelsbot.dev/',
+ 'https://8y7.nekoweb.org/',
+ 'https://igor360.neocities.org/',
+ 'https://zzfs.home.kg',
+ 'https://ari.lt/',
+ ];
+
+ //the name of the ring
+ var ringName = '*nixRing';
+
+ /* the unique ID of the widget. two things to note:
+ 1) make sure there are no spaces in it - use dashes or underscores if you must
+ 2) remember to change 'webringid' in the widget code you give out and all instances of '#webringid' in the css file to match this value!*/
+ var ringID = 'linuxring';
+
+ //should the widget include a link to an index page?
+ var useIndex = true;
+ //the full URL of the index page. if you're not using one, you don't have to specify anything here
+ var indexPage = 'https://teethinvitro.neocities.org/webring/linuxring/index.html';
+
+ //should the widget include a random button?
+ var useRandom = false;
+
diff --git a/webring/linuxring/script/onionring-variablesnew.js b/webring/linuxring/script/onionring-variablesnew.js
new file mode 100644
index 0000000..fe15a95
--- /dev/null
+++ b/webring/linuxring/script/onionring-variablesnew.js
@@ -0,0 +1,9 @@
+let script = document.createElement("script");
+script.src = "https://teethinvitro.neocities.org/webring/linuxring/ring.js";
+setTimeout(() => {
+ document.getElementById("linuxring").replaceWith(script);
+}, 100);
+
+console.log("%cThis page is using an outdated version of the *nixRing widget. Head over to https://teethinvitro.neocities.org/webring/linuxring to grab the new one.");
+
+// webstring v2.1 by june @ juneish.neocities.org
diff --git a/webring/linuxring/script/onionring-variablesold.js b/webring/linuxring/script/onionring-variablesold.js
new file mode 100644
index 0000000..393308a
--- /dev/null
+++ b/webring/linuxring/script/onionring-variablesold.js
@@ -0,0 +1,94 @@
+// onionring.js is made up of four files - onionring-widget.js, onionring-index.js, onionring-variables.js (this one!), 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-VARIABLES ===
+//this file contains the stuff you edit to set up your specific webring
+
+//the full URLs of all the sites in the ring
+var sites = [
+ 'https://teethinvitro.neocities.org/',
+ 'https://iwillneverbehappy.neocities.org/',
+ 'https://xn--ug8ht8h.ws/',
+ 'http://wirlaburla.worlio.com/',
+ 'https://hoppingtopping.com/',
+ 'https://kaa.neocities.org/',
+ 'https://foreverliketh.is/',
+ 'https://karma.computer/',
+ 'https://azuremillennium.neocities.org/',
+ 'https://i330.dev/',
+ 'https://alan460.is-hella.gay',
+ 'https://crystal.tilde.institute',
+ 'https://skeleg.org',
+ 'https://cronico.neocities.org',
+ 'https://theaio.neocities.org/',
+ 'https://risingthumb.xyz',
+ 'https://leap123.neocities.org',
+ 'https://tepiloxtl.net/',
+ 'https://antares.neocities.org/',
+ 'https://avas.space/',
+ 'https://0xf0xx0.eth.limo',
+ 'https://ophanimkei.com/',
+ 'https://kinisis.xyz/',
+ 'http://baccyflap.com/',
+ 'https://exlitry.world/',
+ 'https://circulars.dev/',
+ 'https://tommi.space/',
+ 'https://patrickwu.space/',
+ 'https://corvidae.digital/',
+ 'https://raum.neocities.org/',
+ 'https://avidseeker.github.io',
+ 'https://www.dreamwingsthegriffon.com/',
+ 'https://nicolabelluti.me',
+ 'https://xx-starbrite-xx.neocities.org',
+ 'https://heart143.neocities.org',
+ 'https://cassiecandles.net/',
+ 'https://mkultra.monster',
+ 'https://tiagorangel.com/',
+ 'https://sharkcave.me/',
+ 'https://scuti.neocities.org/',
+ 'https://appak.neocities.org',
+ 'https://myrdin.cx',
+ 'https://clygro.cc/',
+ 'https://fish.golf',
+ 'https://dagurthehorrible.neocities.org/',
+ 'https://spider-kyle.neocities.org/',
+ 'https://regirock.net',
+ 'https://hazelthats.me',
+ 'https://alexisgaming95.neocities.org',
+ 'https://gorkem.cc',
+ 'https://riomc.cloud',
+ 'https://unpop.neocities.org/',
+ 'https://shittyweb.org/',
+ 'https://pogmom.me',
+ 'https://april.nekoweb.org/',
+ 'https://goodgirl.dev/',
+ 'https://sor.neocities.org/',
+ 'https://www.starcrush.net',
+ 'https://bytesofprogress.net/',
+ 'https://projectc190.neocities.org',
+ 'https://privatenoob.top/',
+ 'https://alexzeecomedy.com',
+ 'https://wheelsbot.dev/',
+ 'https://8y7.nekoweb.org/',
+ 'https://igor360.neocities.org/',
+ 'https://zzfs.home.kg',
+ 'https://ari.lt/',
+ ];
+
+ //the name of the ring
+ var ringName = '*nixRing';
+
+ /* the unique ID of the widget. two things to note:
+ 1) make sure there are no spaces in it - use dashes or underscores if you must
+ 2) remember to change 'webringid' in the widget code you give out and all instances of '#webringid' in the css file to match this value!*/
+ var ringID = 'linuxring';
+
+ //should the widget include a link to an index page?
+ var useIndex = true;
+ //the full URL of the index page. if you're not using one, you don't have to specify anything here
+ var indexPage = 'https://teethinvitro.neocities.org/webring/linuxring/index.html';
+
+ //should the widget include a random button?
+ var useRandom = false;
+
diff --git a/webring/linuxring/script/onionring-widget.js b/webring/linuxring/script/onionring-widget.js
new file mode 100644
index 0000000..6872f28
--- /dev/null
+++ b/webring/linuxring/script/onionring-widget.js
@@ -0,0 +1,73 @@
+// onionring.js is made up of four files - onionring-widget.js (this one!), onionring-index.js, 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-WIDGET ===
+//this file contains the code which builds the widget shown on each page in the ring. ctrl+f 'EDIT THIS' if you're looking to change the actual html of the widget
+
+var tag = document.getElementById(ringID); //find the widget on the page
+
+thisSite = window.location.href; //get the url of the site we're currently on
+thisIndex = null;
+
+// go through the site list to see if this site is on it and find its position
+for (i = 0; i < sites.length; i++) {
+ if (thisSite.startsWith(sites[i])) { //we use startswith so this will match any subdirectory, users can put the widget on multiple pages
+ thisIndex = i;
+ break; //when we've found the site, we don't need to search any more, so stop the loop
+ }
+}
+
+function randomSite() {
+ otherSites = sites.slice(); //create a copy of the sites list
+ otherSites.splice(thisIndex, 1); //remove the current site so we don't just land on it again
+ randomIndex = Math.floor(Math.random() * otherSites.length);
+ location.href = otherSites[randomIndex];
+}
+
+//if we didn't find the site in the list, the widget displays a warning instead
+if (thisIndex == null) {
+ tag.insertAdjacentHTML('afterbegin', `
+<table>
+ <tr>
+ <td>This site isn't part of the ${ringName} webring yet.</td>
+ </tr>
+</table>
+ `);
+}
+else {
+ //find the 'next' and 'previous' sites in the ring. this code looks complex
+ //because it's using a shorthand version of an if-else statement to make sure
+ //the first and last sites in the ring join together correctly
+ previousIndex = (thisIndex-1 < 0) ? sites.length-1 : thisIndex-1;
+ nextIndex = (thisIndex+1 >= sites.length) ? 0 : thisIndex+1;
+
+ indexText = ""
+ //if you've chosen to include an index, this builds the link to that
+ if (useIndex) {
+ indexText = `<a href='${indexPage}'><img src="https://teethinvitro.neocities.org/webring/linuxring/script/tuxicon.png" width="10%"></a>`;
+ }
+
+ randomText = ""
+ //if you've chosen to include a random button, this builds the link that does that
+ if (useRandom) {
+ randomText = `<a href='javascript:void(0)' onclick='randomSite()'>random</a> | `;
+ }
+
+ //this is the code that displays the widget - EDIT THIS if you want to change the structure
+ tag.insertAdjacentHTML('afterbegin', `
+ <table>
+ <tr>
+ <td class='webring-prev'><a href='${sites[previousIndex]}'>← </a></td>
+ <td class='webring-info'>
+ Member of the ${ringName}</br>
+ <span class='webring-links'>
+ ${indexText}
+ </span>
+ </td>
+ <td class='webring-next'><a href='${sites[nextIndex]}'> →</a></td>
+ </tr>
+ </table>
+ `);
+
+}
diff --git a/webring/linuxring/script/onionring.css b/webring/linuxring/script/onionring.css
new file mode 100644
index 0000000..70c2ea2
--- /dev/null
+++ b/webring/linuxring/script/onionring.css
@@ -0,0 +1,38 @@
+/* onionring.js is made up of four files - onionring-widget.js, onionring-index.js, onionring-variables.js and onionring.css (this one!)
+// 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-10-24 */
+
+#linuxring {
+ margin: 0 auto;
+ padding: 0px;
+}
+
+#linuxring a {
+ color: black;
+}
+
+#linuxring table {
+ background-color: #ffffff;
+ margin: 0 auto;
+ border-radius: 10px;
+}
+
+#linuxring table tr td {
+ padding: 10px;
+}
+
+#linuxring .webring-prev {
+ text-align:right;
+}
+
+#linuxring .webring-info {
+ text-align:center;
+}
+
+#linuxring .webring-next {
+ text-align:left;
+}
+
+#linuxring .webring-links {
+ font-size: 11pt;
+}
diff --git a/webring/linuxring/script/tuxicon.png b/webring/linuxring/script/tuxicon.png
new file mode 100644
index 0000000..ab5907e
--- /dev/null
+++ b/webring/linuxring/script/tuxicon.png
Binary files differ