Full Circle

Styles some 4chan-related subreddits to look even more like 4chan

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name Full Circle
// @namespace Violentmonkey Scripts
// @description Styles some 4chan-related subreddits to look even more like 4chan
// @version 1.0
// @match *://*.reddit.com/r/4chan/*
// @match *://*.reddit.com/r/qasubreddit/*
// @grant none
// @run-at document-end
// ==/UserScript==

let is_qa = location.pathname.startsWith("/r/qasubreddit");

// Page title
if (is_qa) {
 document.title = "/qa/ - " + document.title.replace(/ : qasubreddit$/i, "") + " - 4chan"; 
} else {
 document.title = "/reddit/ - " + document.title.replace(/ : 4chan$/i, "") + " - 4chan"; 
}

// Favicon
document.head.querySelectorAll('link[rel="icon"]').forEach(function(e) {
  e.parentNode.removeChild(e);
});
let clover = document.createElement("link");
clover.setAttribute("rel", "shortcut icon");
if (is_qa || location.hostname.startsWith("yb.")) {
  // Yotsuba B ("worksafe") favicon
  clover.setAttribute("href", "//s.4cdn.org/image/favicon-ws.ico");
} else {
  clover.setAttribute("href", "//s.4cdn.org/image/favicon.ico");
}
document.head.appendChild(clover);

// Board title
let style = document.createElement("style");
document.head.appendChild(style);
if (is_qa) {
  style.textContent = "span.pagename>a{font-variant:normal}";
  document.querySelector("span.pagename > a").textContent = "/qa/ - Taking it Easy";
} else {
  style.textContent = "#ebintitle{display:block;font-family:Tahoma,sans-serif;font-size:28px;font-weight:700;letter-spacing:-2px}";
  let ebintitle = document.createElement("span");
  ebintitle.setAttribute("id", "ebintitle");
  ebintitle.textContent = "/reddit/ - New Tab";
  let anchornode = document.querySelector("ul.tabmenu");
  anchornode.parentNode.insertBefore(ebintitle, anchornode);
}