Spyke

Replies

Comment on

Many of Kbin terms dont make sense.. Why not replace them?

Some of these things are being discussed at the Codeberg. There's some issues opened like #406 - Rename "Microblog" in header to "Posts" for consistency., or other ones requesting feedback like #680 - Rename 'posts' to 'microposts' everywhere. Truly, the best place to put these ideas or thoughts is on the Codeberg. That's where the action is - but it never hurts to discuss here too, just may not be passed along.

Comment on

What got you into selfhosting and what was the first thing that you hosted?

Some friends from high school and I were in an Cisco A+ class together. One night we ordered pizza, and after finishing it - we took the larger of the boxes, cleaned it out, and turned it into a server. We ended up running a few different game servers on there with the first being CS:Source, I believe. When that died, I started a 1&1 VPS that ran a Dark Age of Camelot freeshard for a while.

Comment on

[Userscript] kbin Feed Curator

Reply in thread

@fiofiofio

It may be worthwhile to add a check around your removeButtons.querySelectorAll("button").forEach(button => { section. For instance:

if (removeButtons.length > 0) {
    removeButtons.querySelectorAll("button").forEach(button => {
        button.style.backgroundColor = 'var(--kbin-vote-bg)';
        button.style.color = 'var(--kbin-vote-text-color)';
        button.style.marginLeft = 'var(--kbin-entry-element-spacing)';
        button.style.padding = '2px';
        button.style.border = 'var(--kbin-section-border)';
    });
}

Comment on

Kbin Notifications Panel

@blobcat
I love this - definitely something that should be in native kbin, albeit supported natively without a frame. I do have a couple notes.

The first is that I noticed you match multiple instances - which is great! However, you've hard-coded the notification path for kbin.social. To fix this, I've change the following:

// Line 60 in the original script. Change the following:
iframe.src = 'https://kbin.social/settings/notifications';
// To this:
iframe.src = 'https://' + window.location.hostname + '/settings/notifications';

The second is more a note for any instance admins who would like to support this...
The default config for kbin, at least the bare metal (I haven't dug into the docker setup at all), is to set add_header X-Frame-Options DENY; in nginx. First is that X-Frame-Options is obsolete anyway, and the second is that the frame won't work with DENY being the setting.
More reading: X-Frame-Options | MDN
More reading: Content-Security-Policy | MDN

Below are the steps you should take to enable functionality for this and to update away from X-Frame-Options:

# I'm assuming you followed either the current or the soon-to-be bare-metal configuration.
# First, login to your instance as a user with sudo.
sudo nano /etc/nginx/sites-available/kbin.conf

# Locate the following line near the bottom: add_header X-Frame-Options DENY;
# Comment it out by adding a # in front. Create a new line under it and enter the following (replace domain.tld with your domain):
add_header Content-Security-Policy "from-ancestors 'self' https://domain.tld https://www.domain.tld";
# Save and exit, <CTRL>+x, y, <ENTER>

# Restart nginx
sudo systemctl restart nginx