Full Circle

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

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==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);
}