User JS: Difference between revisions

From Soyjak Wiki, The Free Soycyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
Line 36: Line 36:




Install from [https://greasyfork.org/en/scripts/456980-sharty-fixes-gemerald Greasy Fork] into a userscript manager or paste
Install from [https://greasyfork.org/en/scripts/456980-sharty-fixes-gemerald Greasy Fork] into a userscript manager.
load_js("<nowiki>https://greasyfork.org/en/scripts/456980-sharty-fixes-gemerald/code/Sharty%20fixes.user.js</nowiki>");
into the User JS settings. Source code is plain-text in the load_js link, not here directly as it keeps requiring updates.


====SoyParty-X====
==== Sharty Themes ====
Features:
Should be used with Sharty Fixes Gemerald
 
* Detects flood posts and hides them (you can set amount of lines and words to hide)
 
* Forced anonymity (hides namefags, can be disabled)
 
* Hides emailfags or sagefags (can be disabled for sagefags)
 
* Highlights triple parentheses
 
* Highlights datamining (makes posts glow)
 
* Inline Youtube Previews (+invidious support)
 
* Replaces "Gem" and "Coal" with minecraft icons
 
* Replaces "Bump" and "Sage" with upvote and downvote icons
<i>Expand to view the script</i>
<i>Expand to view the script</i>
{| class="mw-collapsible mw-collapsed"
{| class="mw-collapsible mw-collapsed"
|+
|
|<pre>// ==UserScript==
|-
// @name         SoyParty-X
|<pre>
// @namespace   datamining
// ==UserScript==
// @version      0.2
// @name       Sharty Themes
// @description  Cure the cancer that is killing soyjak.party
// @namespace   soyjak.partythemes
// @author       Chud (You)
// @match      http*://soyjak.party/*
// @match        https://soyjak.party/*
// @match      http*://www.soyjak.party/*
// @icon        https://soyjak.party/static/favicon.png
// @grant      GM_getValue
// @grant        none
// @grant       GM_setValue
// @grant      GM_xmlhttpRequest
// @grant      GM_addStyle
// @connect    *
// @license MIT
// @version    1.0
// @author      Base framework by Zyl, Mainly created by Doughy
// @description The Gemmiest Enhancements for the 'ty
// ==/UserScript==
// ==/UserScript==


/* eslint-env jquery */
const version = "v1.0";
console.log(`Sharty Themes ${version}`);


/*
const namespace = "ShartyThemes.";
function setValue(key, value) {
  if (key == "hiddenthreads" || key == "hiddenimages") {
    if (typeof GM_setValue == "function") {
      GM_setValue(key, value);
    }
    localStorage.setItem(key, value);
  } else {
    if (typeof GM_setValue == "function") {
      GM_setValue(namespace + key, value);
    } else {
      localStorage.setItem(namespace + key, value);
    }
  }
}


Changelog:
function getValue(key) {
 
  if (key == "hiddenthreads" || key == "hiddenimages") {
0.2:
    if (typeof GM_getValue == "function" && GM_getValue(key)) {
 
      localStorage.setItem(key, GM_getValue(key).toString());
- hidePosts() now detects flood posts.
    }
    return localStorage.getItem(key);
  }
  if (typeof GM_getValue == "function") {
    return GM_getValue(namespace + key);
  } else {
    return localStorage.getItem(namespace + key);
  }
}


0.1:
function themeEnabled(key) {
  let value = getValue(key);
  if (value == null) {
    value = optionsEntries[key][2];
    setValue(key, value);
  }
  return value.toString() == "true";
}


- hidePosts()
function getNumber(key) {
- forcedAnonymity()
  let value = parseInt(getValue(key));
- highlightTripleParentheses()
  if (Number.isNaN(value)) {
- highlightDatamining()
    value = 0;
- inlineYoutubePreviews()
  }
- replaceCoalAndGemsWithIcon()
  return value;
- replaceBumpAndSageWithIcons()
}


*/
function getJson(key) {
  let value = getValue(key);
  if (value == null) {
    value = "{}";
  }
  return JSON.parse(value);
}


(function SoyPartyX() {
function addToJson(key, jsonKey, value) {
   // true = hide posts where the e-mail is "sage".
   let json = getJson(key);
   const _hideMailtoSage = true;
  let parent = json;
  jsonKey.split(".").forEach((e, index, array) => {
    if (index < array.length - 1) {
      if (!parent.hasOwnProperty(e)) {
        parent[e] = {};
      }
      parent = parent[e];
    } else {
      parent[e] = value;
    }
  });
  setValue(key, JSON.stringify(json));
   return json;
}


   // true = scrub email, trip, and force all names to be "Chud".
function removeFromJson(key, jsonKey) {
   // - Emailfags and tripfags are already hidden.
   let json = getJson(key);
   // - Namefags aren't hidden, but turning this on will anonymize them.
  let parent = json;
   // false = don't change posts (default).
  jsonKey.split(".").forEach((e, index, array) => {
   const _enableForcedAnonymity = false;
    if (index < array.length - 1) {
 
      parent = parent[e];
   // Sets the limit for a post to be considered a flood post.
    } else {
   // If one of the criteria is met, the post is hidden.
      delete parent[e];
   const floodThresholdLines = 30;
    }
   const floodThresholdCharacters = 3000;
   });
  setValue(key, JSON.stringify(json));
   return json;
}
 
function customAlert(a) {
    document.body.insertAdjacentHTML("beforeend", `
<div id="alert_handler">
  <div id="alert_background" onclick="this.parentNode.remove()"></div>
   <div id="alert_div">
    <a id='alert_close' href="javascript:void(0)" onclick="this.parentNode.parentNode.remove()"><i class='fa fa-times'></i></a>
    <div id="alert_message">${a}</div>
    <button class="button alert_button" onclick="this.parentNode.parentNode.remove()">OK</button>
   </div>
</div>`);
}
 
 
const optionsEntries = {
  "underwater": ["checkbox", "Underwater Theme", false],
  "soot": ["checkbox", "Soot Theme", false],
   "beta": ["checkbox", "Beta Theme", false],
  "leftypol": ["checkbox", "Leftycoal Theme", false],
   "cafe": ["checkbox", "Crystal Theme", false],
   "gurochan": ["checkbox", "Gurochan Theme", false],
   "colorjak": ["checkbox", "Colorjak Theme", false],
}


  hidePosts();
  forcedAnonymity(); // Must come AFTER hidePosts()
  highlightTripleParentheses();
  highlightDatamining();
  inlineYoutubePreviews();
  replaceCoalAndGemsWithIcon();
  replaceBumpAndSageWithIcons();


  function hidePosts() {
    $(".post").each((i, el) => {
      const $el = $(el);
      const reasons = [];


      const isOp = $el.hasClass("op");


      if ($el.has(".trip").length) {
        reasons.push("tripfag");
      }
      if (_hideMailtoSage && $el.has('a.email[href^="mailto:sage"]').length) {
        reasons.push("sagefag");
      }
      if ($el.has('a.email:not([href^="mailto:sage"])').length) {
        reasons.push("emailfag");
      }


      const body = $el.has(".body");
      const bodyLines = body.html().split("<br>").length;
      const bodyLength = body.text().length;


      if (
let options = Options.add_tab("sharty-themes", "gear", "Sharty Themes").content[0];
        bodyLines > floodThresholdLines ||
        bodyLength > floodThresholdCharacters
      ) {
        reasons.push(
          `possible flooding: ${bodyLength} characters in ${bodyLines} lines`
        );
      }


      if (reasons.length) {
        const $notice = $("<div>")
          .addClass(`post ${isOp ? "op" : "reply"}`)
          .html(
            `<div class='body'><em>Post hidden (${reasons.join(
              ", "
            )}). Click to show.</em></div>`
          )
          .after($("<br>"));
        $notice.click(() => {
          $el.show();
          if (isOp) $el.prev(".files").show();
          $notice.hide();
        });
        $el.after($notice);
        $el.hide();
        if (isOp) $el.prev(".files").hide();
      }
    });
  }


  function forcedAnonymity() {
let optionsHTML = `<span style="display: block; text-align: center">${version}</span>`;
    if (!_enableForcedAnonymity) return;
optionsHTML += `<a style="display: block; text-align: center" href="https://greasyfork.org/en/scripts/456980-sharty-fixes-gemerald">Best used with Sharty Fixes Gemerald</a><br>`;
    // Remove all emails.
optionsHTML += `<span style="display: block; text-align: center"><h1></h1></span>`;
    $("a.email").prop("outerHTML", "<span class='name'>Chud</span>");
for ([optKey, optValue] of Object.entries(optionsEntries)) {
    // Remove all tripcodes.
  optionsHTML += `<input type="${optValue[0]}" id="${optKey}" name="${optKey}"><label for="${optKey}">${optValue[1]}</label><br>`;
    $(".trip").prop("outerHTML", "");
}
    // Set all names to Chud.
options.insertAdjacentHTML("beforeend", optionsHTML);
    // Make sure not to overwrite (You)'s.
    $(".name")
      .filter((i, el) => !$(el).has(".own_post").length)
      .text("Chud");
  }


  function replaceWordWithIcon(re, icon) {
options.querySelectorAll("input[type=checkbox]").forEach(e => {
    const matchesRe = (index, post) => $(post).html().match(re);
  e.checked = themeEnabled(e.id);
  e.addEventListener("change", e => {
    setValue(e.target.id, e.target.checked);
  });
});


    const template = (match) =>
      `<img src="${icon}" style="max-height:2em; vertical-align:middle">`;


    const applyTemplate = (index, post) => {
      const $post = $(post);
      const html = $post.html();
      $post.html(html.replace(re, template));
    };


    $("div.body").filter(matchesRe).each(applyTemplate);
  }


  function replaceCoalAndGemsWithIcon() {
document.head.insertAdjacentHTML("beforeend", `
    replaceWordWithIcon(/coal/gi, "https://i.imgur.com/O9iRcRv.png");
<style>
    replaceWordWithIcon(/gems?/gi, "https://i.imgur.com/BvjFdau.png");
  }


  function replaceBumpAndSageWithIcons() {
    // replaceWordWithIcon(/bump/gi, "https://i.imgur.com/zM2xOGh.png");
    // replaceWordWithIcon(/sage/gi, "https://i.imgur.com/2bsauzj.png");
    replaceWordWithIcon(/bump/gi, "https://i.imgur.com/Y7cpsW0.png");
    replaceWordWithIcon(/\bsage\b/gi, "https://i.imgur.com/ZarQtY3.png");
  }


  function highlightTripleParentheses() {
    const re = /\(\(\(.+?\)\)\)/g;
    const hasRe = (i, post) => post.innerHTML.match(re);


    const template = (match) =>
      `<span style='background-color:white;color:#0038B8;font-family:monospace;'>${match}</span>`;
    const applyTemplate = (i, post) => {
      post.innerHTML = post.innerHTML.replace(re, template);
    };


    $("div.body").filter(hasRe).each(applyTemplate);
  }


  function highlightDatamining() {
    const reGlowie =
      /data(\s*|-)min(ing|er|ed)|(sell|selling|sold)\s+(my|our)?\s+data|cuckflare|cloudflare|cloud fleur/i;
    const hasReGlowie = (i, post) => post.innerHTML.match(reGlowie);
    const applyTemplate = (i, post) =>
      $(post).css({
        backgroundColor: "#D7EFD7",
        boxShadow: "#66FF66 0 0 2rem 0",
      });
    $(".reply").filter(hasReGlowie).each(applyTemplate);
  }


  function inlineYoutubePreviews() {
    const re = /(?:youtu\.be\/|\/watch\?v=)(.{11})/;
    const previewTemplate = (videoId) =>
      `<a href="https://youtube.com/watch?v=${videoId}">https://youtube.com/watch?v=${videoId}</a><br><img style="max-width:255px;max-height:255px" src="https://i.ytimg.com/vi/${videoId}/hqdefault.jpg" /><br><em>Watch on <a href="https://yewtu.be/${videoId}">Invidious</a> (less datamining)</em><br>`;
    $(".body a")
      .filter(function (i) {
        return $(this).prop("href").match(re);
      })
      .each(function (i) {
        $(this).prop("outerHTML", previewTemplate(this.href.match(re)[1]));
      });
  }
})();
</pre>
|}
====Post Filters====
Allows you to filter posts based on comments, subject, name, and tripcode
To access filters click on options button.


<i>Expand to view the script</i>
${themeEnabled("gurochan") ? `
{| class="mw-collapsible mw-collapsed"
html, body {
|+
        font-size:10pt;
|<pre>
         background:#EDDAD2;
// @name         Post Filters for soyjak.party
         color: #800;
// @namespace    datamining
}
// @version      0.1
* {
// @description  Filter posts on soyjak.party
        font-family: Tahoma, Verdana, Arial, sans-serif;
// @author      Chud (You)
        font-size: 10pt;
// @match        https://soyjak.party/*
}
// @icon         https://soyjak.party/static/favicon.png
input, textarea {
// @grant        none
         background-color: #E6CBC0;
// ==/UserScript==
         border: 1px solid #CA927B;
/*
}
* post-menu.js - adds dropdown menu to posts
 
*
a, a:visited{
* Creates a global Menu object with four public methods:
color: #AF0A0F;
*
}
*  Menu.onclick(fnc)
 
*    registers a function to be executed after button click, before the menu is displayed
 
*  Menu.add_item(id, text[, title])
a:hover {
*    adds an item to the top level of menu
color: #D00;
*  Menu.add_submenu(id, text)
}
*    creates and returns a List object through which to manipulate the content of the submenu
*  Menu.get_submenu(id)
*    returns the submenu with the specified id from the top level menu
*
*  The List object contains all the methods from Menu except onclick()
*
*  Example usage:
*    Menu.add_item('filter-menu-hide', 'Hide post');
*    Menu.add_item('filter-menu-unhide', 'Unhide post');
*
*    submenu = Menu.add_submenu('filter-menu-add', 'Add filter');
*         submenu.add_item('filter-add-post-plus', 'Post +', 'Hide post and all replies');
*         submenu.add_item('filter-add-id', 'ID');
* Usage:
*  $config['additional_javascript'][] = 'js/jquery.min.js';
*  $config['additional_javascript'][] = 'js/post-menu.js';
*/
$(document).ready(function () {


var List = function (menuId, text) {
a.quotelink {
this.id = menuId;
        color:#DD0000;
this.text = text;
}
this.items = [];
div.post.reply.highlighted{
 
        background:#D9AF9E
this.add_item = function (itemId, text, title) {
}
this.items.push(new Item(itemId, text, title));
form table tr th {
};
        background: #D9AF9E;
this.list_items = function () {
        border: 1px solid #CA927B;
var array = [];
        padding: 2px 5px 2px 5px;
var i, length, obj, $ele;
}
div.banner{
        background: #D9AF9E;
        border: 1px solid #CA927B;
        color: #800;
        font-weight: bold;
        padding: 2px 5px 2px 5px;
}
div.post.reply{
        padding: 2px 5px 2px 5px;
background:#E6CBC0;
color:#800;
border:1px solid #D9AF9E;
}
div.post.reply div.body a{
      color: #AF0A0F;
}


if ($.isEmptyObject(this.items))
.bar
return;
{
      background:#D9AF9E;
      color:#800;
}


length = this.items.length;
.bar a {
for (i = 0; i < length; i++) {
        color:#800;
obj = this.items[i];
}


$ele = $('<li>', {id: obj.id}).text(obj.text);
.bar.bottom {
if ('title' in obj) $ele.attr('title', obj.title);
    border-top: 1px solid #CA927B;
}


if (obj instanceof Item) {
.desktop-style div.boardlist:not(.bottom), .desktop-style div.boardlist:not(.bottom) a {
$ele.addClass('post-item');
    font-size: 10pt;
} else {
    background:#D9AF9E;
$ele.addClass('post-submenu');
    color:#800;
    border-bottom: 1px solid #CA927B;
}


$ele.prepend(obj.list_items());
h1.glitch a{
$ele.append($('<span>', {class: 'post-menu-arrow'}).text('»'));
        font-size: 24pt;
}
        color: #AF0A0F;
 
        font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
array.push($ele);
}
}
h1.glitch {
 
        font-size: 24pt;
return $('<ul>').append(array);
        color: #AF0A0F;
};
        font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
this.add_submenu = function (menuId, text) {
}
var ele = new List(menuId, text);
hr {
this.items.push(ele);
        border-top: 1px dotted #D9AF9E;
return ele;
}
};
#options_div {
this.get_submenu = function (menuId) {
        background: #D9AF9E;
for (var i = 0; i < this.items.length; i++) {
        border: 2px solid #CA927B;
if ((this.items[i] instanceof Item) || this.items[i].id != menuId) continue;
}
return this.items[i];
#options_tablist {
}
border: 1px solid #CA927B;
};
}
};
div.module, div.ban {
 
        background: #D9AF9E;
var Item = function (itemId, text, title) {
        border: 1px solid #CA927B;
this.id = itemId;
}
this.text = text;
div.ban h2 {
 
        background: #CA927B;
// optional
}
if (typeof title != 'undefined') this.title = title;
.fc td, .fc th {
};
        background: #CA927B;
 
}
function buildMenu(e) {
.hljs, .hljs-subst {
var pos = $(e.target).offset();
        background: #EDDAD2;
var i, length;
        border: 1px solid #CA927B;
 
var $menu = $('<div class="post-menu"></div>').append(mainMenu.list_items());
 
//  execute registered click handlers
length = onclick_callbacks.length;
for (i = 0; i < length; i++) {
onclick_callbacks[i](e, $menu);
}
 
//  set menu position and append to page
$menu.css({top: pos.top, left: pos.left + 20});
$('body').append($menu);
}
}


function addButton(post) {
.intro a.email:hover{
var $ele = $(post);
    color: #D00;
$ele.find('input.delete').after(
$('<a>', {href: '#', class: 'post-btn', title: 'Post menu'}).text('▶')
);
}
}


.intro a.email span.name {
    color: #AF0A0F;
}


/* * * * * * * * * *
.intro span.name {
     Public methods
     color: #AF0A0F;
* * * * * * * * * */
}
var Menu = {};
var mainMenu = new List();
var onclick_callbacks = [];


Menu.onclick = function (fnc) {
.intro span.subject {
onclick_callbacks.push(fnc);
    color: #800;
};
}


Menu.add_item = function (itemId, text, title) {
.options_tab_icon{
mainMenu.add_item(itemId, text, title);
    color: #AF0A0F;
};
}


Menu.add_submenu = function (menuId, text) {
return mainMenu.add_submenu(menuId, text);
};


Menu.get_submenu = function (id) {
#quick-reply th {
return mainMenu.get_submenu(id);
    border: 1px solid #D9AF9E;
};
}


window.Menu = Menu;


div.pages input{
    background:#D9AF9E;
    color:#800;
}


/* * * * * * * *
div.pages a.selected{
     Initialize
     color:#800;
* * * * * * * */
}


/*  Styling
.quote {
*/
    color: #866;
var $ele, cssStyle, cssString;
}


$ele = $('<div>').addClass('post reply').hide().appendTo('body');
cssStyle = $ele.css(['border-top-color']);
cssStyle.hoverBg = $('body').css('background-color');
$ele.remove();


cssString =
div.banner a, textarea {
'\n/*** Generated by post-menu ***/\n' +
    color: #800;
'.post-menu {position: absolute; font-size: 12px; line-height: 1.3em;}\n' +
}
'.post-menu ul {\n' +
'    background-color: '+ cssStyle['border-top-color'] +'; border: 1px solid #666;\n' +
'    list-style: none; padding: 0; margin: 0; white-space: nowrap;\n}\n' +
'.post-menu .post-submenu{white-space: normal; width: 90px;}' +
'.post-menu .post-submenu>ul{white-space: nowrap; width: auto;}' +
'.post-menu li {cursor: pointer; position: relative; padding: 4px 4px; vertical-align: middle;}\n' +
'.post-menu li:hover {background-color: '+ cssStyle.hoverBg +';}\n' +
'.post-menu ul ul {display: none; position: absolute;}\n' +
'.post-menu li:hover>ul {display: block; left: 100%; margin-top: -3px;}\n' +
'.post-menu-arrow {float: right; margin-left: 10px;}\n' +
'.post-menu.hidden, .post-menu .hidden {display: none;}\n' +
'.post-btn {transition: transform 0.1s; width: 15px; text-align: center; font-size: 10pt; opacity: 0.8; text-decoration: none; margin: -6px 0px 0px -5px !important; display: inline-block;}\n' +
'.post-btn:hover {opacity: 1;}\n' +
'.post-btn-open {transform: rotate(90deg);}\n';


if (!$('style.generated-css').length) $('<style class="generated-css">').appendTo('head');
$('style.generated-css').html($('style.generated-css').html() + cssString);


/*  Add buttons
a.selected:nth-child(1) {
*/
        color:#800;
$('.reply:not(.hidden), .thread>.op').each(function () {
}
addButton(this);
` : ""}
});


/*  event handlers
  */
$('form[name=postcontrols]').on('click', '.post-btn', function (e) {
e.preventDefault();
var post = e.target.parentElement.parentElement;
$('.post-menu').remove();


if ($(e.target).hasClass('post-btn-open')) {
${themeEnabled("underwater") ? `
$('.post-btn-open').removeClass('post-btn-open');
} else {
//  close previous button
$('.post-btn-open').removeClass('post-btn-open');
$(post).find('.post-btn').addClass('post-btn-open');


buildMenu(e);
a:link, a:visited {
}
text-decoration: none;
});
color: #00637B;
}


$(document).on('click', function (e){
a:link:hover, a:visited:hover {
if ($(e.target).hasClass('post-btn') || $(e.target).hasClass('post-submenu'))
color: #DD0000;
return;
}


$('.post-menu').remove();
a.post_no {
$('.post-btn-open').removeClass('post-btn-open');
color: #000033;
});
}


// on new posts
.intro a.email span.name {
$(document).on('new_post', function (e, post) {
color: #0093AB;
addButton(post);
}
});


$(document).trigger('menu_ready');
.intro a.email:hover span.name {
});
color: #DD0000;
}


h2, div.title, h1 {
color: #800000;
}


// Post Filters
form table tr th {
if (active_page === 'thread' || active_page === 'index' || active_page === 'catalog' || active_page === 'ukko') {
background: #95D2D3;
$(document).on('menu_ready', function () {
}
'use strict';
// returns blacklist object from storage
function getList() {
return JSON.parse(localStorage.postFilter);
}


// stores blacklist into storage and reruns the filter
div.banner {
function setList(blacklist) {
background-color: #E04000;
localStorage.postFilter = JSON.stringify(blacklist);
}
$(document).trigger('filter_page');
}


// unit: seconds
div.post.op hr {
function timestamp() {
border-color: #B7C9D5;
return Math.floor((new Date()).getTime() / 1000);
}
}


function initList(list, boardId, threadId) {
.intro span.subject {
if (typeof list.postFilter[boardId] == 'undefined') {
color: #117743;
list.postFilter[boardId] = {};
font-weight: 800;
list.nextPurge[boardId] = {};
}
}
if (typeof list.postFilter[boardId][threadId] == 'undefined') {
list.postFilter[boardId][threadId] = [];
}
list.nextPurge[boardId][threadId] = {timestamp: timestamp(), interval: 86400}; // 86400 seconds == 1 day
}


function addFilter(type, value, useRegex) {
.intro span.name {
var list = getList();
color: #117743;
var filter = list.generalFilter;
font-weight: 800;
var obj = {
}
type: type,
value: value,
regex: useRegex
};


for (var i=0; i<filter.length; i++) {
div.post.reply.highlighted {
if (filter[i].type == type && filter[i].value == value && filter[i].regex == useRegex)
background: #a9d8ff;
return;
}
}


filter.push(obj);
div.post.reply {
setList(list);
background: #B6DDDE;
drawFilterList();
border-color: #8FCCCD;
}
}


function removeFilter(type, value, useRegex) {
div.ban {
var list = getList();
border: 1px solid #0093AB;
var filter = list.generalFilter;
}


for (var i=0; i<filter.length; i++) {
div.ban h2 {
if (filter[i].type == type && filter[i].value == value && filter[i].regex == useRegex) {
background: #B6DDDE;
filter.splice(i, 1);
color: #0093AB;
break;
}
}
}


setList(list);
div.pages {
drawFilterList();
color: #8899AA;
}
background: #B6DDDE;
border-right: 1px solid #8FCCCD;
border-bottom: 1px solid #8FCCCD;
}


function nameSpanToString(el) {
hr {
var s = '';  
border-color: #B7D9C5;
}


$.each($(el).contents(), function(k,v) {
div.boardlist {
if (v.nodeName === 'IMG')
color: #0093AB;
s=s+$(v).attr('alt')
    background-color: rgba(65%, 85%, 95%, 0.2);
}
if (v.nodeName === '#text')
s=s+v.nodeValue
});
return s.trim();
}


var blacklist = {
.desktop-style div.boardlist:nth-child(1) {
add: {
  text-shadow: #D2FFEE 1px 1px 1px, #D2FFEE -1px -1px 1px;
post: function (boardId, threadId, postId, hideReplies) {
}
var list = getList();
* {
var filter = list.postFilter;
  background-image: url('https://files.catbox.moe/hp03xs.png');
}


initList(list, boardId, threadId);
.soifish {
  background-image: url('https://files.catbox.moe/rxmvyr.png');
  position: fixed;
    pointer-events: none;
  -webkit-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  -moz-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  -o-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
}


for (var i in filter[boardId][threadId]) {
@-webkit-keyframes moveX {
if (filter[boardId][threadId][i].post == postId) return;
  from { left: 0; } to { left: 100%; }
}
}
filter[boardId][threadId].push({
@-moz-keyframes moveX {
post: postId,
  from { left: 0; } to { left: 100%; }
hideReplies: hideReplies
}
});
@-o-keyframes moveX {
setList(list);
  from { left: 0; } to { left: 100%; }
},
}
uid: function (boardId, threadId, uniqueId, hideReplies) {
@keyframes moveX {
var list = getList();
  from { left: 0; } to { left: 100%; }
var filter = list.postFilter;
}


initList(list, boardId, threadId);
@-webkit-keyframes moveY {
 
  from { top: 0; } to { top: 100%; }
for (var i in filter[boardId][threadId]) {
}
if (filter[boardId][threadId][i].uid == uniqueId) return;
@-moz-keyframes moveY {
}
  from { top: 0; } to { top: 100%; }
filter[boardId][threadId].push({
}
uid: uniqueId,
@-o-keyframes moveY {
hideReplies: hideReplies
  from { top: 0; } to { top: 100%; }
});
}
setList(list);
@keyframes moveY {
}
  from { top: 0; } to { top: 100%; }
},
}
remove: {
post: function (boardId, threadId, postId) {
var list = getList();
var filter = list.postFilter;


// thread already pruned
if (typeof filter[boardId] == 'undefined' || typeof filter[boardId][threadId] == 'undefined')
return;


for (var i=0; i<filter[boardId][threadId].length; i++) {
if (filter[boardId][threadId][i].post == postId) {
filter[boardId][threadId].splice(i, 1);
break;
}
}


if ($.isEmptyObject(filter[boardId][threadId])) {
.post.reply .body a:hover:after {
delete filter[boardId][threadId];
    content: url(https://soyjak.download/f.php?h=0lnyi5TW&p=1);
delete list.nextPurge[boardId][threadId];
    display: block;
    position: absolute;
    left: 20px;
    top: -255px;
    pointer-events: none;
    z-index: 999;
}


if ($.isEmptyObject(filter[boardId])) {
.post.reply .body a:hover {
delete filter[boardId];
    position: relative;
delete list.nextPurge[boardId];
}
}
}
setList(list);
},
uid: function (boardId, threadId, uniqueId) {
var list = getList();
var filter = list.postFilter;


// thread already pruned
body:after {
if (typeof filter[boardId] == 'undefined' || typeof filter[boardId][threadId] == 'undefined')
    content: url(https://soyjak.download/f.php?h=3EFSgyRY&p=1);
return;
    display: block;
    position: fixed;
    bottom: 0px;
    right: 0px;
    pointer-events: none;


for (var i=0; i<filter[boardId][threadId].length; i++) {
.desktop-style div.boardlist:nth-child(1):hover, .desktop-style div.boardlist:nth-child(1).cb-menu {
if (filter[boardId][threadId][i].uid == uniqueId) {
  background-color: rgba(70%, 95%, 100%, 0.45);
filter[boardId][threadId].splice(i, 1);
}` : ""}
break;
}
}


if ($.isEmptyObject(filter[boardId][threadId])) {
delete filter[boardId][threadId];
delete list.nextPurge[boardId][threadId];


if ($.isEmptyObject(filter[boardId])) {
${themeEnabled("soot") ? `
delete filter[boardId];
@import url("/stylesheets/dark.css");
delete list.nextPurge[boardId];
/*soot theme*/
}
}
setList(list);
}
}
};


/*
.name {
*  hide/show the specified thread/post
    color: #FDD73A !important;
*/
}
function hide(ele) {
var $ele = $(ele);


if ($(ele).data('hidden'))
body {
return;
    background: black url(https://i.imgur.com/FeQmhfL.png) right bottom no-repeat fixed;
}


$(ele).data('hidden', true);
div.post.reply {
if ($ele.hasClass('op')) {
    background-color: #646464 !important;
$ele.parent().find('.body, .files, .video-container').not($ele.children('.reply').children()).hide();
    color: black;
    border-radius:0;
}
 
div#post-moderation-fields , div#style-select {
    padding:4px;
    background-color:rgba(0,0,0,28);
}


// hide thread replies on index view
span.heading {
if (active_page == 'index' || active_page == 'ukko') $ele.parent().find('.omitted, .reply:not(.hidden), post_no, .mentioned, br').hide();
    color: #FF565C !important;
} else {
}
// normal posts
$ele.children('.body, .files, .video-container').hide();
}
}
function show(ele) {
var $ele = $(ele);


$(ele).data('hidden', false);
.remove-btn {
if ($ele.hasClass('op')) {
    color: rgba(255,255,255,128) !important;
$ele.parent().find('.body, .files, .video-container').show();
}
if (active_page == 'index') $ele.parent().find('.omitted, .reply:not(.hidden), post_no, .mentioned, br').show();
} else {
// normal posts
$ele.children('.body, .files, .video-container').show();
}
}


/*
hr {
*  create filter menu when the button is clicked
    border-color:transparent;
*/
}
function initPostMenu(pageData) {
var Menu = window.Menu;
var submenu;
Menu.add_item('filter-menu-hide', _('Hide post'));
Menu.add_item('filter-menu-unhide', _('Unhide post'));


submenu = Menu.add_submenu('filter-menu-add', _('Add filter'));
` : ""}
submenu.add_item('filter-add-post-plus', _('Post +'), _('Hide post and all replies'));
submenu.add_item('filter-add-id', _('ID'));
submenu.add_item('filter-add-id-plus', _('ID +'), _('Hide ID and all replies'));
submenu.add_item('filter-add-name', _('Name'));
submenu.add_item('filter-add-trip', _('Tripcode'));


submenu = Menu.add_submenu('filter-menu-remove', _('Remove filter'));
submenu.add_item('filter-remove-id', _('ID'));
submenu.add_item('filter-remove-name', _('Name'));
submenu.add_item('filter-remove-trip', _('Tripcode'));


Menu.onclick(function (e, $buffer) {
${themeEnabled("beta") ? `
var ele = e.target.parentElement.parentElement;
@import url("https://soyjak.party/stylesheets/dark.css");
var $ele = $(ele);
/**
* Beta.css
* by kalyx
*this might work well on phones
*/
 
body
{
display:block;
padding-top: 26px;
background: #0d1010;
color: #e8e8e3;
font-family: sans-serif;
font-size: 18px;


var threadId = $ele.parent().attr('id').replace('thread_', '');
var boardId = $ele.parent().data('board');
var postId = $ele.find('.post_no').not('[id]').text();
if (pageData.hasUID) {
var postUid = $ele.find('.poster_id').text();
}


var postName;
width: 100%;
var postTrip = '';
}
if (!pageData.forcedAnon) {
postName = (typeof $ele.find('.name').contents()[0] == 'undefined') ? '' : nameSpanToString($ele.find('.name')[0]);
postTrip = $ele.find('.trip').text();
}


/* display logic and bind click handlers
html {
*/
/* Size of largest container or bigger */
  background:#0d1010;
width: 100%;
margin-left: auto;
  margin-right: auto;


// unhide button
}
if ($ele.data('hidden')) {
/*banner*/
$buffer.find('#filter-menu-unhide').click(function () {
.board_image{
//  if hidden due to post id, remove it from blacklist
border: double 0px #e8e8e3;
//  otherwise just show this post
box-shadow: 2px 2px #e8e8e3;
blacklist.remove.post(boardId, threadId, postId);
}
show(ele);
});
$buffer.find('#filter-menu-hide').addClass('hidden');
} else {
$buffer.find('#filter-menu-unhide').addClass('hidden');
$buffer.find('#filter-menu-hide').click(function () {
blacklist.add.post(boardId, threadId, postId, false);
});
}


// post id
    /*gives images border/shadow*/
if (!$ele.data('hiddenByPost')) {
    div.files img.post-image {
$buffer.find('#filter-add-post-plus').click(function () {
border: solid 1px #e8e8e3;
blacklist.add.post(boardId, threadId, postId, true);
box-shadow: 2px 2px #e8e8e3;
});
        padding: 0px;
} else {
        border-radius: 0;
$buffer.find('#filter-add-post-plus').addClass('hidden');
        margin-bottom: 5px;
}
}
div.sidearrows{
display: none;
}


// UID
span.quote
if (pageData.hasUID && !$ele.data('hiddenByUid')) {
{
$buffer.find('#filter-add-id').click(function () {
    color:#e8d928;
blacklist.add.uid(boardId, threadId, postUid, false);
}
});
@font-face
$buffer.find('#filter-add-id-plus').click(function () {
{
blacklist.add.uid(boardId, threadId, postUid, true);
  font-family: 'lain';
});
  src: url('./fonts/nrdyyh.woff') format('woff'),
      url('./fonts/tojcxo.TTF') format('truetype');
}
h1
{
display: none;
font-family: 'lain', tahoma;


$buffer.find('#filter-remove-id').addClass('hidden');
letter-spacing: -2px;
} else if (pageData.hasUID) {
font-size: 42pt;
$buffer.find('#filter-remove-id').click(function () {
text-align: center;
blacklist.remove.uid(boardId, threadId, postUid);
color: #e8e8e3;
});


$buffer.find('#filter-add-id').addClass('hidden');
}
$buffer.find('#filter-add-id-plus').addClass('hidden');
header div.subtitle
} else {
{
// board doesn't use UID
display: none;
$buffer.find('#filter-add-id').addClass('hidden');
    color: #e8e8e3;
$buffer.find('#filter-add-id-plus').addClass('hidden');
font-size: 13px;
$buffer.find('#filter-remove-id').addClass('hidden');
  margin-left: auto;
}
  margin-right: auto;
max-width:385px;
}
div.title
{
display: none;
color: #e8e8e3;
font-family: Arial, Helvetica, sans-serif;


//  name
}
if (!pageData.forcedAnon && !$ele.data('hiddenByName')) {
div.title p
$buffer.find('#filter-add-name').click(function () {
{
addFilter('name', postName, false);
font-size: 8px;
});
color: #e8e8e3;
 
}
$buffer.find('#filter-remove-name').addClass('hidden');
a:link, a:visited, p.intro a.email span.name
} else if (!pageData.forcedAnon) {
{
$buffer.find('#filter-remove-name').click(function () {
color: #e8e8e3;
removeFilter('name', postName, false);
text-transform: uppercase;
});
font-size: 10px;
 
text-decoration: none;
$buffer.find('#filter-add-name').addClass('hidden');
font-family: sans-serif;
} else {
}
// board has forced anon
a:link, a:visited, p.intro a.email span.name
$buffer.find('#filter-remove-name').addClass('hidden');
{
$buffer.find('#filter-add-name').addClass('hidden');
        -moz-transition: 0.15s text-shadow, 0.15s color;
}
-webkit-transition: 0.15s text-shadow, 0.15s color;
 
-khtml-transition: 0.15s text-shadow, 0.15s color;
//  tripcode
-o-transition: 0.15s text-shadow, 0.15s color;
if (!pageData.forcedAnon && !$ele.data('hiddenByTrip') && postTrip !== '') {
-ms-transition: 0.15s text-shadow, 0.15s color;
$buffer.find('#filter-add-trip').click(function () {
transition: 0.15s text-shadow, 0.15s color;
addFilter('trip', postTrip, false);
}
});
input[type="text"], textarea
 
{
$buffer.find('#filter-remove-trip').addClass('hidden');
-moz-transition: 0.15s border-color;
} else if (!pageData.forcedAnon && postTrip !== '') {
-webkit-transition: 0.15s border-color;
$buffer.find('#filter-remove-trip').click(function () {
-khtml-transition: 0.15s border-color;
removeFilter('trip', postTrip, false);
-o-transition: 0.15s border-color;
});
-ms-transition: 0.15s border-color;
 
transition: 0.15s border-color;
$buffer.find('#filter-add-trip').addClass('hidden');
}
} else {
input[type="submit"]
// board has forced anon
{
$buffer.find('#filter-remove-trip').addClass('hidden');
-moz-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
$buffer.find('#filter-add-trip').addClass('hidden');
-webkit-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
}
-khtml-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
 
-o-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
/*  hide sub menus if all items are hidden
-ms-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
*/
transition: 0.15s border-color, 0.15s background-color, 0.15s color;
if (!$buffer.find('#filter-menu-remove > ul').children().not('.hidden').length) {
}
$buffer.find('#filter-menu-remove').addClass('hidden');
a:link:hover, a:visited:hover
}
{
if (!$buffer.find('#filter-menu-add > ul').children().not('.hidden').length) {
color: #e8d928;
$buffer.find('#filter-menu-add').addClass('hidden');
font-family: sans-serif;
}
text-decoration: none;
});
text-shadow: 0px 0px 5px #d2e7e8;
}
}
 
a.post_no
/*
{
* hide/unhide thread on index view
color: #e8d928;
*/
text-decoration: none;
function quickToggle(ele, threadId, pageData) {
}
/*if ($(ele).find('.hide-thread-link').length)
p.intro a.post_no:hover
$('.hide-thread-link').remove();*/
{
        color: #e8d928!important;
}
div.post.reply
{
background: #0d1010;
align: center;
max-width:100% !important;
min-width: 100%!important;
border: solid 1px #e8e8e3;
box-shadow: 2px 2px #e8e8e3;
 
 
}


if ($(ele).hasClass('op') && !$(ele).find('.hide-thread-link').length) {
div.postcontainer
$('<a class="hide-thread-link" style="float:left;margin-right:5px" href="javascript:void(0)">[' + ($(ele).data('hidden') ? '+' : '&ndash;') + ']</a>')
{
.insertBefore($(ele).find(':not(h2,h2 *):first'))
max-width:100% !important;
.click(function() {
min-width: 100%!important;
var postId = $(ele).find('.post_no').not('[id]').text();
var hidden = $(ele).data('hidden');
var boardId = $(ele).parents('.thread').data('board');
if (hidden) {
blacklist.remove.post(boardId, threadId, postId, false);
$(this).html('[&ndash;]');
} else {
blacklist.add.post(boardId, threadId, postId, false);
$(this).text('[+]');
}
});
}
}


/*
}
*  determine whether the reply post should be hidden
div.post.reply.highlighted
- applies to all posts on page load or filtering rule change
{
- apply to new posts on thread updates
background: #1e2324;
*   - must explicitly set the state of each attributes because filter will reapply to all posts after filtering rule change
border: solid 1px #93e0e3;
*/
        box-shadow: 3px 5px #5c8c8e;
function filter(post, threadId, pageData) {
  margin-left: auto;
var $post = $(post);
   margin-right: auto;
}
div.post.reply div.body a:link, div.post.reply div.body a:visited
{
color: #CCCCCC;


var list = getList();
}
var postId = $post.find('.post_no').not('[id]').text();
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover
var name, trip, uid, subject, comment;
{
var i, length, array, rule, pattern; // temp variables
color: #e8d928;


var boardId       = $post.data('board');
}
if (!boardId) boardId = $post.parents('.thread').data('board');
p.intro span.subject
{
font-size: 12px;
font-family: sans-serif;
color: #e8d928;
font-weight: 800;


var localList  = pageData.localList;
}
var noReplyList = pageData.noReplyList;
p.intro span.name
var hasUID      = pageData.hasUID;
{
var forcedAnon  = pageData.forcedAnon;
color: #c3e849;
font-weight: 800;
}
p.intro a.capcode, p.intro a.nametag
{
color: magenta;
margin-left: 0;
}
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name
{
color: #d2e7e8;


var hasTrip = ($post.find('.trip').length > 0);
}
var hasSub = ($post.find('.subject').length > 0);
input[type="text"], textarea, select
 
{
$post.data('hidden', false);
background: #0d1010!important;
$post.data('hiddenByUid', false);
color: #CCCCCC!important;
$post.data('hiddenByPost', false);
border: solid  1px #e8e8e3;
$post.data('hiddenByName', false);
box-shadow: 1px 1px #0d1010;
$post.data('hiddenByTrip', false);
  margin-left: auto;
$post.data('hiddenBySubject', false);
  margin-right: auto;
$post.data('hiddenByComment', false);


// add post with matched UID to localList
if (hasUID &&
typeof list.postFilter[boardId] != 'undefined' &&
typeof list.postFilter[boardId][threadId] != 'undefined') {
uid = $post.find('.poster_id').text();
array = list.postFilter[boardId][threadId];


for (i=0; i<array.length; i++) {
}
if (array[i].uid == uid) {
input[type="password"]
$post.data('hiddenByUid', true);
{
localList.push(postId);
background: #0d1010!important;
if (array[i].hideReplies) noReplyList.push(postId);
color: #CCCCCC!important;
break;
border: #d2e7e8 1px double!important;
}
}
}
form table tr th
}
{
background: #0d1010!important;
color: #e8e8e3!important;
border: solid  1px #d2e7e8;
box-shadow: 1px 1px #0d1010;
text-align: right;


// match localList
}
if (localList.length) {
div.banner
if ($.inArray(postId, localList) != -1) {
{
if ($post.data('hiddenByUid') !== true) $post.data('hiddenByPost', true);
 
hide(post);
background: #E04000;
}
border: 0px solid hsl(17, 100%, 60%);
}
color: #EEE;
text-align: center;
height: 15px;
padding: 1px 1px 4px 1px;
margin-left: auto;
margin-right: auto;
}
div.banner a
{
    color:#000;
}
input[type="submit"]
{
background: #333333;
border: #666 1px solid;
color: #CCCCCC;
}
input[type="submit"]:hover
{
background: #555;
border: #888 1px solid;
color: #e8d928;
}
input[type="text"]:focus, textarea:focus
{
    border:#888 1px solid!important;
}
p.fileinfo a:hover
{
text-decoration: underline;
}
span.trip
{
color: #AAA;
}
.bar
{
background: #0c0c0c!important;
-moz-box-shadow: 0 0 0px #000;
-webkit-box-shadow: 0 0 0px #000;


// matches generalFilter
if (!forcedAnon)
name = (typeof $post.find('.name').contents()[0] == 'undefined') ? '' : nameSpanToString($post.find('.name')[0]);
if (!forcedAnon && hasTrip)
trip = $post.find('.trip').text();
if (hasSub)
subject = $post.find('.subject').text();
array = $post.find('.body').contents().filter(function () {if ($(this).text() !== '') return true;}).toArray();
array = $.map(array, function (ele) {
return $(ele).text().trim();
});
comment = array.join(' ');




for (i = 0, length = list.generalFilter.length; i < length; i++) {
rule = list.generalFilter[i];


if (rule.regex) {
}
pattern = new RegExp(rule.value);
.bar.top
switch (rule.type) {
{
case 'name':
border: solid  1px #e8e8e3;
if (!forcedAnon && pattern.test(name)) {
box-shadow: 0px 1px #d2e7e8;
$post.data('hiddenByName', true);
 
hide(post);
}
}
.bar.bottom
break;
{
case 'trip':
border-top: 0px solid #666;
if (!forcedAnon && hasTrip && pattern.test(trip)) {
border: solid  1px #e8e8e3;
$post.data('hiddenByTrip', true);
 
hide(post);
 
}
}
break;
div.pages
case 'sub':
{
if (hasSub && pattern.test(subject)) {
color: #d2e7e8 ;
$post.data('hiddenBySubject', true);
background: #333;
hide(post);
border: #666 0px solid;
}
font-family: sans-serif;
break;
font-size: 10pt;
case 'com':
}
if (pattern.test(comment)) {
div.pages a.selected
$post.data('hiddenByComment', true);
{
hide(post);
color: #d2e7e8 ;
}
}
break;
hr
}
{
} else {
height: 0px;
switch (rule.type) {
border: #e8e8e3 2px solid;
case 'name':
 
if (!forcedAnon && rule.value == name) {
}
$post.data('hiddenByName', true);
div.boardlist
hide(post);
{
}
color: #e8e8e3;
break;
}
case 'trip':
if (!forcedAnon && hasTrip && rule.value == trip) {
$post.data('hiddenByTrip', true);
hide(post);
}
break;
case 'sub':
pattern = new RegExp('\\b'+ rule.value+ '\\b');
if (hasSub && pattern.test(subject)) {
$post.data('hiddenBySubject', true);
hide(post);
}
break;
case 'com':
pattern = new RegExp('\\b'+ rule.value+ '\\b');
if (pattern.test(comment)) {
$post.data('hiddenByComment', true);
hide(post);
}
break;
}
}
}


// check for link to filtered posts
div.ban
$post.find('.body a').not('[rel="nofollow"]').each(function () {
{
var replyId = $(this).text().match(/^>>(\d+)$/);
background-color: #0d1010;
 
border: 0px solid #555;
if (!replyId)
-moz-border-radius: 2px;
return;
-webkit-border-radius: 2px;
border-radius: 2px;
text-align: left!important;
font-size: 13px;


replyId = replyId[1];
}
if ($.inArray(replyId, noReplyList) != -1) {
div.ban h2
hide(post);
{
}
background: #333;
});
color: #e8e8e3;
padding: 3px 7px;
font-size: 12pt;
border-bottom: 1px solid #555;
}
div.ban h2:not(:nth-child(1))
{
border-top: 0px solid #555;
}
table.modlog tr th
{
background: #333;
color: #AAA;
}


// post didn't match any filters
div.report
if (!$post.data('hidden')) {
{
show(post);
color: #666;
}
}
}
.pages, .board_image, input, .reply, form table th, textarea, a img, select, .banner
{
        -webkit-border-radius: 2px;
        -khtml-border-radius: 2px;
        -moz-border-radius: 2px;
-o-border-radius: 2px;
-ms-border-radius: 2px;
        border-radius: 2px;
}
.blur
{
    filter: blur(20px);
    -webkit-filter: blur(23px);
    -moz-filter: blur(23px);
    -o-filter: blur(23px);
    -ms-filter: blur(23px);
    filter: url(svg/blur.svg#blur);
}


/* (re)runs the filter on the entire page
/* options.js */
*/
#options_div
function filterPage(pageData) {
{
var list = getList();
      background: #333333;
}
.options_tab_icon
{
      color: #AAAAAA;
}
.options_tab_icon.active
{
      color: #FFFFFF;
}


if (active_page != 'catalog') {


// empty the local and no-reply list
pageData.localList = [];
pageData.noReplyList = [];


$('.thread').each(function () {
.blotter
var $thread = $(this);
{
// disregard the hidden threads constructed by post-hover.js
color: #e8e8e3!important;
if ($thread.css('display') == 'none')
}
return;
s` : ""}


var threadId = $thread.attr('id').replace('thread_', '');
var boardId = $thread.data('board');
var op = $thread.children('.op')[0];
var i, array;  // temp variables


// add posts to localList and noReplyList
if (typeof list.postFilter[boardId] != 'undefined' && typeof list.postFilter[boardId][threadId] != 'undefined') {
array = list.postFilter[boardId][threadId];
for (i=0; i<array.length; i++) {
if ( typeof array[i].post == 'undefined')
continue;


pageData.localList.push(array[i].post);
if (array[i].hideReplies) pageData.noReplyList.push(array[i].post);
}
}
// run filter on OP
filter(op, threadId, pageData);
quickToggle(op, threadId, pageData);


// iterate filter over each post
${themeEnabled("leftypol") ? `
if (!$(op).data('hidden') || active_page == 'thread') {
body {
$thread.find('.reply').not('.hidden').each(function () {
background: #1E1E1E;
filter(this, threadId, pageData);
color: #999999;
});
font-family: Verdana, sans-serif;
}
font-size: 14px;
 
}
});
.quote {
} else {
    color:#B8D962;
var postFilter = list.postFilter[pageData.boardId];
}
var $collection = $('.mix');
@font-face {
 
  font-family: 'lain';
if ($.isEmptyObject(postFilter))
  src: url('./fonts/nrdyyh.woff') format('woff'),
return;
        url('./fonts/tojcxo.TTF') format('truetype');
 
}
// for each thread that has filtering rules
h1
// check if filter contains thread OP and remove the thread from catalog
{
$.each(postFilter, function (key, thread) {
letter-spacing: -2px;
var threadId = key;
font-size: 20pt;
$.each(thread, function () {
text-align: center;
if (this.post == threadId) {
color: #32DD72;
$collection.filter('[data-id='+ threadId +']').remove();
}
}
div.title, h1 {
});
color: #32DD72;
});
}
}
div.title p {
}
font-size: 10px;
 
}
function initStyle() {
a:link, a:visited, .intro a.email span.name {
var $ele, cssStyle, cssString;
color: #CCCCCC;
 
text-decoration: none;
$ele = $('<div>').addClass('post reply').hide().appendTo('body');
font-family: sans-serif;
cssStyle = $ele.css(['background-color', 'border-color']);
}
cssStyle.hoverBg = $('body').css('background-color');
a:link:hover, a:visited:hover {
$ele.remove();
color: #fff;
 
font-family: sans-serif;
cssString = '\n/*** Generated by post-filter ***/\n' +
text-decoration: none;
'#filter-control input[type=text] {width: 130px;}' +
}
'#filter-control input[type=checkbox] {vertical-align: middle;}' +
a.post_no {
'#filter-control #clear {float: right;}\n' +
color: #AAAAAA;
'#filter-container {margin-top: 20px; border: 1px solid; height: 270px; overflow: auto;}\n' +
text-decoration: none;
'#filter-list {width: 100%; border-collapse: collapse;}\n' +
}
'#filter-list th {text-align: center; height: 20px; font-size: 14px; border-bottom: 1px solid;}\n' +
a.post_no:hover {
'#filter-list th:nth-child(1) {text-align: center; width: 70px;}\n' +
color: #32DD72 !important;
'#filter-list th:nth-child(2) {text-align: left;}\n' +
text-decoration: underline overline;
'#filter-list th:nth-child(3) {text-align: center; width: 58px;}\n' +
}
'#filter-list tr:not(#header) {height: 22px;}\n' +
div.post.reply {
'#filter-list tr:nth-child(even) {background-color:rgba(255, 255, 255, 0.5);}\n' +
background: #333333;
'#filter-list td:nth-child(1) {text-align: center; width: 70px;}\n' +
border: #555555 1px solid;
'#filter-list td:nth-child(3) {text-align: center; width: 58px;}\n' +
}
'#confirm {text-align: right; margin-bottom: -18px; padding-top: 2px; font-size: 14px; color: #FF0000;}';
div.post.reply.highlighted {
 
background: #555;
if (!$('style.generated-css').length) $('<style class="generated-css">').appendTo('head');
border: transparent 1px solid;
$('style.generated-css').html($('style.generated-css').html() + cssString);
}
}
div.post.reply div.body a:link, div.post.reply div.body a:visited {
 
color: #CCCCCC;
function drawFilterList() {
}
var list = getList().generalFilter;
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover {
var $ele = $('#filter-list');
color: #32DD72;
var $row, i, length, obj, val;
}
 
.intro span.subject {
var typeName = {
font-size: 12px;
name: 'name',
font-family: sans-serif;
trip: 'tripcode',
color: #446655;
sub: 'subject',
font-weight: 800;
com: 'comment'
}
};
.intro span.name {
 
color: #32DD72;
$ele.empty();
font-weight: 800;
 
}
$ele.append('<tr id="header"><th>Type</th><th>Content</th><th>Remove</th></tr>');
.intro a.capcode, p.intro a.nametag {
for (i = 0, length = list.length; i < length; i++) {
color: magenta;
obj = list[i];
margin-left: 0;
 
}
// display formatting
.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name {
val = (obj.regex) ? '/'+ obj.value +'/' : obj.value;
color: #32ddaf;
 
}
$row = $('<tr>');
input[type="text"], textarea, select {
$row.append(
background: #333333;
'<td>'+ typeName[obj.type] +'</td>',
color: #CCCCCC;
'<td>'+ val +'</td>',
border: #666666 1px solid;
$('<td>').append(
padding-left: 5px;
$('<a>').html('X')
padding-right: -5px;
.addClass('del-btn')
font-family: sans-serif;
.attr('href', '#')
font-size: 10pt;
.data('type', obj.type)
}
.data('val', obj.value)
input[type="password"] {
.data('useRegex', obj.regex)
background: #333333;
)
color: #CCCCCC;
);
border: #666666 1px solid;
$ele.append($row);
}
}
form table tr th {
}
background: #333333;
 
color: #AAAAAA;
function initOptionsPanel() {
font-weight: 800;
if (window.Options && !Options.get_tab('filter')) {
text-align: left;
Options.add_tab('filter', 'list', _('Filters'));
padding: 0;
Options.extend_tab('filter',
}
'<div id="filter-control">' +
div.banner {
'<select>' +
background: #32DD72;
'<option value="name">'+_('Name')+'</option>' +
color: #000;
'<option value="trip">'+_('Tripcode')+'</option>' +
text-align: center;
'<option value="sub">'+_('Subject')+'</option>' +
width: 250px;
'<option value="com">'+_('Comment')+'</option>' +
padding: 4px;
'</select>' +
padding-left: 12px;
'<input type="text">' +
padding-right: 12px;
'<input type="checkbox">' +
margin-left: auto;
'regex ' +
margin-right: auto;
'<button id="set-filter">'+_('Add')+'</button>' +
font-size: 12px;
'<button id="clear">'+_('Clear all filters')+'</button>' +
}
'<div id="confirm" class="hidden">' +
div.banner a {
_('This will clear all filtering rules including hidden posts.')+' <a id="confirm-y" href="#">'+_('yes')+'</a> | <a id="confirm-n" href="#">'+_('no')+'</a>' +
    color:#000;
'</div>' +
}
'</div>' +
input[type="submit"] {
'<div id="filter-container"><table id="filter-list"></table></div>'
background: #333333;
);
border: #888888 1px solid;
drawFilterList();
color: #CCCCCC;
 
}
// control buttons
input[type="submit"]:hover {
$('#filter-control').on('click', '#set-filter', function () {
background: #555555;
var type = $('#filter-control select option:selected').val();
border: #888888 1px solid;
var value = $('#filter-control input[type=text]').val();
color: #32DD72;
var useRegex = $('#filter-control input[type=checkbox]').prop('checked');
}
 
input[type="text"]:focus {
//clear the input form
    border:#aaa 1px solid;
$('#filter-control input[type=text]').val('');
}
 
p.fileinfo a:hover {
addFilter(type, value, useRegex);
text-decoration: underline;
drawFilterList();
}
});
span.trip {
$('#filter-control').on('click', '#clear', function () {
color: #AAAAAA;
$('#filter-control #clear').addClass('hidden');
}
$('#filter-control #confirm').removeClass('hidden');
div.pages {
});
background: #1E1E1E;
$('#filter-control').on('click', '#confirm-y', function (e) {
font-family: sans-serif;
e.preventDefault();
}
 
.bar.bottom {
$('#filter-control #clear').removeClass('hidden');
    bottom: 0px;
$('#filter-control #confirm').addClass('hidden');
    border-top: 1px solid #333333;
setList({
    background-color: #1E1E1E;
generalFilter: [],
}
postFilter: {},
div.pages a.selected {
nextPurge: {},
color: #CCCCCC;
lastPurge: timestamp()
}
});
hr {
drawFilterList();
height: 1px;
});
border: #333333 1px solid;
$('#filter-control').on('click', '#confirm-n', function (e) {
}
e.preventDefault();
div.boardlist {
text-align: center;
color: #999999;
}
div.ban {
background-color: transparent;
border: transparent 0px solid;
}
div.ban h2 {
background: transparent;
color: lime;
font-size: 12px;
}
table.modlog tr th {
background: #333333;
color: #AAAAAA;
}
div.boardlist:not(.bottom) {
  background-color: #1E1E1E;


$('#filter-control #clear').removeClass('hidden');
}
$('#filter-control #confirm').addClass('hidden');
.desktop-style div.boardlist:not(.bottom) {
});
  position:static;
 
  text-shadow: black 1px 1px 1px, black -1px -1px 1px, black -1px 1px 1px, black 1px -1px 1px;
 
  color: #999999;
// remove button
  background-color: #1E1E1E;
$('#filter-list').on('click', '.del-btn', function (e) {
}
e.preventDefault();
div.report {
 
color: #666666;
var $ele = $(e.target);
}
var type = $ele.data('type');
#options_div, #alert_div {
var val = $ele.data('val');
background: #333333;
var useRegex = $ele.data('useRegex');
}
 
.options_tab_icon {
removeFilter(type, val, useRegex);
color: #AAAAAA;
});
}
}
.options_tab_icon.active {
}
color: #FFFFFF;
 
}
/*
#quick-reply table {
* clear out pruned threads
background: none repeat scroll 0% 0% #333 !important;
*/
}
function purge() {
.modlog tr:nth-child(even), .modlog th {
var list = getList();
background-color: #282A2E;
var board, thread, boardId, threadId;
}
var deferred;
.box {
var requestArray = [];
background: #333333;
 
border-color: #555555;
var successHandler = function (boardId, threadId) {
color: #C5C8C6;
return function () {
border-radius: 10px;
// thread still alive, keep it in the list and increase the time between checks.
}
var list = getList();
.box-title {
var thread = list.nextPurge[boardId][threadId];
background: transparent;
 
color: #32DD72;
thread.timestamp = timestamp();
  }
thread.interval = Math.floor(thread.interval * 1.5);
table thead th {
setList(list);
background: #333333;
};
border-color: #555555;
};
color: #C5C8C6;
var errorHandler = function (boardId, threadId) {
border-radius: 4px;
return function (xhr) {
}
if (xhr.status == 404) {
table tbody tr:nth-of-type( even ) {
var list = getList();
background-color: #333333;
}
table.board-list-table .board-uri .board-sfw {
color: #CCCCCC;
}
tbody.board-list-omitted td {
background: #333333;
border-color: #555555;
}
table.board-list-table .board-tags .board-cell:hover {
background: #1e1e1e;
}
table.board-list-table tr:nth-of-type( even ) .board-tags .board-cell {
background: #333333;
}
/* red accents */
div.blotter, h1, h2, header div.subtitle, div.title, a:link:hover, a:visited:hover p.intro a.post_no:hover,
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover, p.intro span.name,
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name,
input[type="submit"]:hover, div.ban h2 {
color: #DD3232;
}
 
p.intro span.subject {
color: #962C22;
}` : ""}


delete list.nextPurge[boardId][threadId];
delete list.postFilter[boardId][threadId];
if ($.isEmptyObject(list.nextPurge[boardId])) delete list.nextPurge[boardId];
if ($.isEmptyObject(list.postFilter[boardId])) delete list.postFilter[boardId];
setList(list);
}
};
};


if ((timestamp() - list.lastPurge) < 86400)  // less than 1 day
${themeEnabled("colorjak") ? `
return;
for (boardId in list.nextPurge) {
board = list.nextPurge[boardId];
for (threadId in board) {
thread = board[threadId];
if (timestamp() > (thread.timestamp + thread.interval)) {
// check if thread is pruned
deferred = $.ajax({
cache: false,
url: '/'+ boardId +'/res/'+ threadId +'.json',
success: successHandler(boardId, threadId),
error: errorHandler(boardId, threadId)
});
requestArray.push(deferred);
}
}
}


// when all requests complete
*{
$.when.apply($, requestArray).always(function () {
    background-image: url('https://soyjak.download/f.php?h=0ubQjIwX&p=1');
var list = getList();
}
list.lastPurge = timestamp();
setList(list);
});
}


function init() {
.soifish {
if (typeof localStorage.postFilter === 'undefined') {
    background-image: ('https//files.catbox.moe/rxmvyr.png');
localStorage.postFilter = JSON.stringify({
    position: absolute;
generalFilter: [],
    -webkit-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
postFilter: {},
    -moz-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
nextPurge: {},
    -o-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
lastPurge: timestamp()
    animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
});
}
}


var pageData = {
@-webkit-keyframes moveX {
boardId: board_name,  // get the id from the global variable
    from { left: 0; } to { left: 100%; }
localList: [],  // all the blacklisted post IDs or UIDs that apply to the current page
}
noReplyList: [],  // any posts that replies to the contents of this list shall be hidden
@-moz-keyframes moveX {
hasUID: (document.getElementsByClassName('poster_id').length > 0),
    from { left: 0; } to { left: 100%; }
forcedAnon: ($('th:contains(Name)').length === 0)  // tests by looking for the Name label on the reply form
}
};
@-o-keyframes moveX {
    from { left: 0; } to { left: 100%; }
}
@keyframes moveX {
    from { left: 0; } to { left: 100%;}
}
 
@-webkit-keyframes moveY {
    from { top: 0; } to { top: 100%; }
}
@-moz-keyframes moveY {
    from { top: 0; } to { top: 100%; }
}
@-o-keyframes moveY {
    from { top: 0; } to { top: 100%; }
}
@keyframes moveY {
    from { top: 0; } to { top: 100%; }
}
 
` : ""}


initStyle();
initOptionsPanel();
initPostMenu(pageData);
filterPage(pageData);


// on new posts
${themeEnabled("cafe") ? `
$(document).on('new_post', function (e, post) {
body{background:#fdfdfe;color:#666;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;margin:0 8px;padding-left:5px;padding-right:5px}table *{margin:0}a,a:visited{text-decoration:none;color:#2b0f51!important}a.post_no{text-decoration:none;margin:0;padding:0}p.intro a.post_no{color:inherit}p.intro a.post_no,p.intro a.email{margin:0}p.intro a.email span.name{color:#34345c}p.intro a.email:hover span.name{color:red}p.intro label{display:inline}p.intro time,p.intro a.ip-link,p.intro a.capcode{direction:ltr;unicode-bidi:embed}h2{color:#af0a0f;font-size:11pt;margin:0;padding:0}header{margin:1em 0}h1{font-family:tahoma;letter-spacing:-2px;font-size:20pt;margin:0}header div.subtitle,h1{color:#af0a0f;text-align:center}header div.subtitle{font-size:8pt}form{margin-bottom:2em!important}form table{margin:auto}form table input{height:auto}input[type=text],input[type=password],textarea{border:1px solid #a9a9a9;text-indent:0;text-shadow:none;text-transform:none;word-spacing:normal}form table tr td{text-align:left;margin:0;padding:0}form table.mod tr td{padding:2px}form table tr th{text-align:left;padding:4px}form table tr th{background:#98e}form table tr td div{text-align:center;float:left;padding-left:3px}form table tr td div input{display:block;margin:2px auto 0}form table tr td div label{font-size:10px}.unimportant,.unimportant *{font-size:10px}p.fileinfo{display:block;margin:0;padding-right:7em}div.banner{background-color:#ffb0aa;text-align:center;font-size:12pt;font-weight:700;text-align:center;margin:1em 0;padding-bottom:2px}div.banner,div.banner a{color:#fff}div.banner a:hover{color:#eef2ff;text-decoration:none}img.banner{display:block;width:300px;height:100px;border:1px solid #a9a9a9;margin:20px auto 0}img.post-image{display:block;float:left;margin:10px 20px;border:none}div.post img.post-image{padding:5px;margin:5px 20px 0 0}div.post img.icon{display:inline;margin:0 5px;padding:0}div.post i.fa{margin:0 4px;font-size:16px}div.post.op{margin-right:20px;margin-bottom:5px}div.post.op hr{border-color:#d9bfb7}p.intro{margin:.5em 0;padding:0;padding-bottom:.2em}input.delete{float:left;margin:1px 6px 0 0}p.intro span.subject{color:#0f0c5d;font-weight:700}p.intro span.name{color:#117743;font-weight:700}p.intro span.capcode,p.intro a.capcode,p.intro a.nametag{color:#f00000;margin-left:0}p.intro a{margin-left:8px}div.delete{float:right}div.post.reply p{margin:.3em 0 0}div.post.reply div.body{margin-left:1.8em;margin-top:.8em;padding-right:3em;padding-bottom:.3em}div.post.reply.highlighted{background:#d6bad0}div.post.reply div.body a{color:#d00}div.post{max-width:97%}div.post div.body{word-wrap:break-word;white-space:pre-wrap}div.post.reply{background:#d6daf0;margin:.2em 16px;padding:.2em .3em .5em .7em;border-width:1px;border-style:none solid solid none;border-color:#b7c5d9;display:inline-block}span.trip{color:#228854}span.quote{color:#789922}span.omitted{display:block;margin-top:1em}br.clear{clear:left;display:block}span.controls{float:right;margin:0;padding:0;font-size:80%}span.controls.op{float:none;margin-left:10px}span.controls a{margin:0}div#wrap{width:900px;margin:0 auto}div.ban{background:#fff;border:1px solid #98e;max-width:700px;margin:30px auto}div.ban p,div.ban h2{padding:3px 7px}div.ban h2{background:#98e;color:#000;font-size:12pt}div.ban p{font-size:12px;margin-bottom:12px}div.ban p.reason{font-weight:700}span.heading{color:#af0a0f;font-size:11pt;font-weight:700}span.spoiler{background:#000;color:#000;padding:0 1px}div.post.reply div.body span.spoiler a{color:#000}span.spoiler:hover,div.post.reply div.body span.spoiler:hover a{color:#fff}div.styles{float:right;padding-bottom:20px}div.styles a{margin:0 10px}div.styles a.selected{text-decoration:none}table.test{width:100%}table.test td,table.test th{text-align:left;padding:5px}table.test tr.h th{background:#98e}table.test td img{margin:0}fieldset label{display:block}div.pages{color:#89a;background:#d6daf0;display:inline;padding:8px;border-right:1px solid #b7c5d9;border-bottom:1px solid #b7c5d9}div.pages.top{display:block;padding:5px 8px;margin-bottom:5px;position:fixed;top:0;right:0;opacity:.9}@media screen and (max-width:800px){div.pages.top{display:none!important}}div.pages a.selected{color:#000;font-weight:bolder}div.pages a{text-decoration:none}div.pages form{margin:0;padding:0;display:inline}div.pages form input{margin:0 5px;display:inline}hr{border:none;border-top:1px solid #b7c5d9;height:0;clear:left}div.boardlist{color:#89a;font-size:9pt;margin-top:3px}div.boardlist.bottom{margin-top:30px!important}div.boardlist a{text-decoration:none}div.report{color:#333}table.modlog{margin:auto;width:100%}table.modlog tr td{text-align:left;margin:0;padding:4px 15px 0 0}table.modlog tr th{text-align:left;padding:4px 15px 5px 5px;white-space:nowrap}table.modlog tr th{background:#98e}td.minimal,th.minimal{width:1%;white-space:nowrap}div.top_notice{text-align:center;margin:5px auto}span.public_ban{display:block;color:red;font-weight:700;margin-top:15px}span.toolong{display:block;margin-top:15px}div.blotter{color:red;font-weight:700;text-align:center}table.mod.config-editor{font-size:9pt;width:100%}table.mod.config-editor td{text-align:left;padding:5px;border-bottom:1px solid #98e}table.mod.config-editor input[type=text]{width:98%}p.intro.thread-hidden{margin:0;padding:0}form.ban-appeal{margin:9px 20px}form.ban-appeal textarea{display:block}.theme-catalog div.thread img{float:none!important;margin:auto;margin-bottom:12px;max-height:150px;max-width:200px;box-shadow:0 0 4px rgba(0,0,0,.55);border:2px solid transparent}.theme-catalog div.thread{display:inline-block;vertical-align:top;margin-bottom:25px;margin-left:20px;margin-right:15px;text-align:center;font-weight:400;width:205px;overflow:hidden;position:relative;font-size:11px;padding:15px;max-height:300px;background:rgba(182,182,182,.12);border:2px solid rgba(111,111,111,.34)}.theme-catalog div.thread strong{display:block}.compact-boardlist{padding:3px;padding-bottom:0}.compact-boardlist .cb-item{display:inline-block;vertical-align:middle}.compact-boardlist .cb-icon{padding-bottom:1px}.compact-boardlist .cb-fa{font-size:21px;padding:2px;padding-top:0}.compact-boardlist .cb-cat{padding:5px 6px 8px}.cb-menuitem{display:table-row}.cb-menuitem span{padding:5px;display:table-cell;text-align:left;border-top:1px solid rgba(0,0,0,.5)}.cb-menuitem span.cb-uri{text-align:right}.boardlist:not(.compact-boardlist) #watch-pinned::before{content:" [ "}.boardlist:not(.compact-boardlist) #watch-pinned::after{content:" ] "}.boardlist:not(.compact-boardlist) #watch-pinned{display:inline}.boardlist:not(.compact-boardlist) #watch-pinned a{margin-left:3pt}.boardlist:not(.compact-boardlist) #watch-pinned a:first-child{margin-left:0}.compact-boardlist #watch-pinned{display:inline-block;vertical-align:middle}video.post-image{display:block;float:left;margin:10px 20px;border:none}div.post video.post-image{padding:0;margin:10px 25px 5px 5px}span.settings{display:inline;float:right;margin-left:10px;margin-top:30px}.archive-link{font-weight:700;margin-left:5px;color:#1100c0!important}.blinker{color:#ff0404;font-family:comic sans ms;font-size:115%}.mentioned{word-wrap:break-word}.yt-dl-link{font-weight:700}.yt-dl-embed{float:left;clear:both;margin:5px 0 12px 5px}.video-container+.body{clear:left}.label-block{margin:10px 10px 0 5px}.label-img{display:inline-block;padding:5px;max-height:90px}.capcode-owner{color:#9370db!important;font-weight:700}#canvas-loading{display:none;background-image:url(https://i.imgur.com/c7z4Rx0.gif);width:20px;height:20px}#canvas-box{display:none}#literally-canvas{height:500px;width:600px}.canvas-button{cursor:pointer}#show-oekaki{cursor:pointer}.lol{cursor:pointer}#search-bar{width:25%;padding-top:10px;margin-bottom:25px;margin-left:5px}.forum-using{padding-left:3px;font-style:italic}.use-button{margin-left:2px}.reset-button{margin-left:5px}.avatar.forum{display:none}.signature.forum{display:none}.signature-text-forum{display:none}#chatango-prompt{margin-top:35px;margin-bottom:45px;margin-left:63px;width:160px;cursor:pointer;font-weight:700}.hide-chatango iframe[width='75px']{display:none!important}body{background-image:url(https://i.imgur.com/P31ggRr.png);color:#666;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;margin:0 8px;padding-left:5px;padding-right:5px}hr{border:none;border-top:1px solid #649e66;height:0;clear:left}div.pages.top{display:block;padding:5px 8px;margin-bottom:5px;position:fixed;top:3px;right:3px;opacity:.9;border-radius:5px}div.pages{color:#6d6d6d;background:#ffd0cd;display:inline;padding:8px;border-right:1px solid #da7c75;border-bottom:1px solid #c17b76;border-radius:5px}form table tr th{padding:3px 5px 4px 4px!important;font-size:97%!important;background:rgba(34,228,85,.16);border-radius:7px}div.post.reply{background:#d7ffd8;margin:.2em 16px;padding:.2em .3em .5em .7em!important;border-width:1px;border-style:none solid solid none;border-color:#6cce70;display:inline-block;border-radius:10px}div.post.reply.highlighted{background:#ffd2cf;border-color:#e69994}div.blotter{color:#af0a0f;font-weight:700;text-align:center}header div.subtitle,h1{color:##b1362d;text-align:center}p.intro span.subject{color:#fd4b4b;font-weight:700}#spoiler{padding-left:3px;margin-left:3px;margin-right:3px}#sage{padding-left:3px;margin-left:3px;margin-right:3px}.sage-tip{font-size:85%;color:#a8ada8}.post-arrow{font-size:12px!important;margin-left:0!important}a.arrow-post-options:hover{color:#4e366f!important}.date-link{color:#807e7e!important;font-size:11.5px;margin-right:6px!important}a.date-link:hover{color:#807e7e!important;text-decoration:underline}.thread-hide-button{margin-right:1px;font-size:95%}.fileinfo a{font-size:85%}.fileinfo.reply{margin-left:3px!important}.boardlist{text-align:center!important;font-size:9.3pt!important;margin-top:6px!important;margin-bottom:24px!important}.scroll-button{color:#1a4c0a!important}
var threadId;
 
.desktop-style div.boardlist:nth-child(1) {
background-color: rgba(255,0,0,0);
}


if ($(post).hasClass('reply')) {
threadId = $(post).parents('.thread').attr('id').replace('thread_', '');
} else {
threadId = $(post).attr('id').replace('thread_', '');
post = $(post).children('.op')[0];
}


filter(post, threadId, pageData);
` : ""}
quickToggle(post, threadId, pageData);
 
});
 
</style>
`);


$(document).on('filter_page', function () {
filterPage(pageData);
});


// shift+click on catalog to hide thread
if (active_page == 'catalog') {
$(document).on('click', '.mix', function(e) {
if (e.shiftKey) {
var threadId = $(this).data('id').toString();
var postId = threadId;
blacklist.add.post(pageData.boardId, threadId, postId, false);
}
});
}


// clear out the old threads
purge();
}
init();
});
if (typeof window.Menu !== "undefined") {
$(document).trigger('menu_ready');
}
}


initFixes();
</pre>
</pre>
|}
|}


==== Mass reply ====
====SoyParty-X====
<big><i>This is now included in  [[#Sharty fixes|Sharty Fixes]]</i></big>
Features:
 
* Detects flood posts and hides them (you can set amount of lines and words to hide)


Reply to everyone in a thread.
* Forced anonymity (hides namefags, can be disabled)


<i>Expand to view the script</i>
* Hides emailfags or sagefags (can be disabled for sagefags)
{| class="mw-collapsible mw-collapsed"
|+
|


<pre>
* Highlights triple parentheses
// ==UserScript==
 
// @name        Mass Reply for soyjak.party
* Highlights datamining (makes posts glow)
 
* Inline Youtube Previews (+invidious support)
 
* Replaces "Gem" and "Coal" with minecraft icons
 
* Replaces "Bump" and "Sage" with upvote and downvote icons
<i>Expand to view the script</i>
{| class="mw-collapsible mw-collapsed"
|+
|<pre>// ==UserScript==
// @name        SoyParty-X
// @namespace    datamining
// @namespace    datamining
// @version      0.1
// @version      0.2
// @description  Mass reply
// @description  Cure the cancer that is killing soyjak.party
// @author      Chud (You)
// @author      Chud (You)
// @match        https://soyjak.party/*
// @match        https://soyjak.party/*
Line 1,356: Line 1,283:
// @grant        none
// @grant        none
// ==/UserScript==
// ==/UserScript==
(function () {
  function insert_after(new_node, ref_node) {
    ref_node.parentNode.insertBefore(new_node, ref_node.nextSibling);
  }
  function mass_reply() {
    let form_textarea = document.getElementById('body');
    let post_no_nodes = document.getElementsByClassName("post_no");
    for(const node of post_no_nodes) {
      let post_no_text = node.textContent;
      if(!post_no_text.includes("No")) {
        form_textarea.value += `>>${post_no_text}\n`;
      }
    }
    form_textarea.focus();
  }
 
  function add_button() {
    let ref_node = document.querySelectorAll(".op .intro .post_no")[1];
    let button = document.createElement("input");
    button.type = "button";
    button.value = "Mass Reply";
    button.style.marginLeft = "5px";
    button.addEventListener("click", function() {
      mass_reply();
    }, false);
   
    insert_after(button, ref_node);
  }
 
  add_button();
})();</pre>
|}


==== Wojakificator ====
/* eslint-env jquery */
Wojakificator is a JS script made by a [[bunkerchan]] user that automatically quotes any post you want an attaches a soyjak image
 
/*
 
Changelog:
 
0.2:
 
- hidePosts() now detects flood posts.
 
0.1:


The script might work  using User JS option, but it is recommended to use a userscript manager like [https://violentmonkey.github.io/ Violentmonkey] instead
- hidePosts()
 
- forcedAnonymity()
[https://github.com/Wojakposter/Wojakificator Source code]
- highlightTripleParentheses()
- highlightDatamining()
- inlineYoutubePreviews()
- replaceCoalAndGemsWithIcon()
- replaceBumpAndSageWithIcons()


{{Redtext|Warning: includes some lefty and NAS images}}
*/


<i>Expand to view the script</i>
(function SoyPartyX() {
{| class="mw-collapsible mw-collapsed"
  // true = hide posts where the e-mail is "sage".
|+
  const _hideMailtoSage = true;
|[https://soyjak.download/f.php?h=3KGYIYNd Download link]
|}


==== Anti 4channeler posts ====
  // true = scrub email, trip, and force all names to be "Chud".
Hides posts made by 4channelers.
  // - Emailfags and tripfags are already hidden.
  // - Namefags aren't hidden, but turning this on will anonymize them.
  // false = don't change posts (default).
  const _enableForcedAnonymity = false;


{{Redtext|Warning: Updates the page every 4 seconds to check for new posts, can be adjusted.}}
  // Sets the limit for a post to be considered a flood post.
  // If one of the criteria is met, the post is hidden.
  const floodThresholdLines = 30;
  const floodThresholdCharacters = 3000;


<i>Expand to view the script</i>
  hidePosts();
{| class="mw-collapsible mw-collapsed"
  forcedAnonymity(); // Must come AFTER hidePosts()
|+
  highlightTripleParentheses();
|
  highlightDatamining();
  inlineYoutubePreviews();
  replaceCoalAndGemsWithIcon();
  replaceBumpAndSageWithIcons();


<pre>
  function hidePosts() {
// ==UserScript==
    $(".post").each((i, el) => {
// @name        Anti 4channeler posts on soyjak.party
      const $el = $(el);
// @namespace    datamining
      const reasons = [];
// @version      0.1
 
// @description  Hides 4channeler posts
      const isOp = $el.hasClass("op");
// @author       Chud (You)
 
// @match        https://soyjak.party/*
       if ($el.has(".trip").length) {
// @icon         https://soyjak.party/static/favicon.png
         reasons.push("tripfag");
// @grant        none
      }
// ==/UserScript==
      if (_hideMailtoSage && $el.has('a.email[href^="mailto:sage"]').length) {
let posts = document.querySelectorAll('.body');
        reasons.push("sagefag");
let replies = document.querySelectorAll(".replies");
      }
keys= [
      if ($el.has('a.email:not([href^="mailto:sage"])').length) {
  "newfag",
        reasons.push("emailfag");
  "fag",
      }
  "gem",
 
  "faggot",
      const body = $el.has(".body");
  "new fag",
      const bodyLines = body.html().split("<br>").length;
  "newfren",
      const bodyLength = body.text().length;
  "newfrien",
 
  "chud",
      if (
  "frogposter",
        bodyLines > floodThresholdLines ||
  "nas",
        bodyLength > floodThresholdCharacters
  "kys",
      ) {
  "killyourself",
        reasons.push(
  "go back",
          `possible flooding: ${bodyLength} characters in ${bodyLines} lines`
  "goback",
        );
  "reddit",
      }
  "kill yourself",
 
  "hang",
      if (reasons.length) {
  "coal",
        const $notice = $("<div>")
  "reddit frog",
          .addClass(`post ${isOp ? "op" : "reply"}`)
    "frog",
          .html(
    "what does the reddit",
            `<div class='body'><em>Post hidden (${reasons.join(
    "frog has to do with",
              ", "
    "redditfrog",
            )}). Click to show.</em></div>`
    "frogtranny",
          )
"nigger",
          .after($("<br>"));
    "tranny"
        $notice.click(() => {
]
          $el.show();
function containsNonLatinCodepoints(s) {
          if (isOp) $el.prev(".files").show();
    return /[^\u0000-\u00ff]/.test(s);
          $notice.hide();
}
        });
function start_filtering()
        $el.after($notice);
{
        $el.hide();
posts = document.querySelectorAll('.body');
        if (isOp) $el.prev(".files").hide();
replies = document.querySelectorAll(".replies");
      }
for(let i =0 ; i<posts.length;i++)
    });
{
  }
for(let j=0;j<keys.length;j++)
 
{
  function forcedAnonymity() {
  if(posts[i].innerHTML.toLowerCase().includes(keys[j].toLowerCase()) || containsNonLatinCodepoints(posts[i].innerHTML.toLowerCase()) == true )
    if (!_enableForcedAnonymity) return;
{
    // Remove all emails.
posts[i].innerHTML= "<span style='color:green;font-weight:bold;font-size:14px;'>[HIDDEN 4channeler post]</span>";
    $("a.email").prop("outerHTML", "<span class='name'>Chud</span>");
}
    // Remove all tripcodes.
}
    $(".trip").prop("outerHTML", "");
    // Set all names to Chud.
}
    // Make sure not to overwrite (You)'s.
    $(".name")
      .filter((i, el) => !$(el).has(".own_post").length)
      .text("Chud");
  }


for(let i =0 ; i<replies.length;i++)
  function replaceWordWithIcon(re, icon) {
{
    const matchesRe = (index, post) => $(post).html().match(re);
for(let j=0;j<keys.length;j++)
{
  if(replies[i].innerHTML.toLowerCase().includes(keys[j].toLowerCase()))
{
replies[i].innerHTML= "<span style='color:green;font-weight:bold;font-size:14px;'>[HIDDEN 4channeler post]</span>";
}
}
}


}
    const template = (match) =>
      `<img src="${icon}" style="max-height:2em; vertical-align:middle">`;


start_filtering();
    const applyTemplate = (index, post) => {
setInterval(start_filtering,2000);
      const $post = $(post);
//Interval
      const html = $post.html();
      $post.html(html.replace(re, template));
    };


    $("div.body").filter(matchesRe).each(applyTemplate);
  }
  function replaceCoalAndGemsWithIcon() {
    replaceWordWithIcon(/coal/gi, "https://i.imgur.com/O9iRcRv.png");
    replaceWordWithIcon(/gems?/gi, "https://i.imgur.com/BvjFdau.png");
  }


//Gifs hider
  function replaceBumpAndSageWithIcons() {
document.querySelectorAll("img").forEach(i=>{if(i.src.includes(".gif")){i.src="";}});</pre>
    // replaceWordWithIcon(/bump/gi, "https://i.imgur.com/zM2xOGh.png");
|}
    // replaceWordWithIcon(/sage/gi, "https://i.imgur.com/2bsauzj.png");
    replaceWordWithIcon(/bump/gi, "https://i.imgur.com/Y7cpsW0.png");
    replaceWordWithIcon(/\bsage\b/gi, "https://i.imgur.com/ZarQtY3.png");
  }


==== Preview for Youtube Videos ====
  function highlightTripleParentheses() {
Show preview for youtube video links.  
    const re = /\(\(\(.+?\)\)\)/g;
    const hasRe = (i, post) => post.innerHTML.match(re);


<i>Expand to view the script</i>
    const template = (match) =>
{| class="mw-collapsible mw-collapsed"
      `<span style='background-color:white;color:#0038B8;font-family:monospace;'>${match}</span>`;
|+
    const applyTemplate = (i, post) => {
|<pre>
       post.innerHTML = post.innerHTML.replace(re, template);
// ==UserScript==
    };
// @name        YouTube preview for soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Previews YouTube videos
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon        https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
(function youtubeInlinePreviews() {


const re = /(?:youtube\.com\/watch\?v=|youtu\.be\/)(.{11})/;
    $("div.body").filter(hasRe).each(applyTemplate);
  }


const previewTemplate = (videoId) => `<img
  function highlightDatamining() {
    const reGlowie =
      /data(\s*|-)min(ing|er|ed)|(sell|selling|sold)\s+(my|our)?\s+data|cuckflare|cloudflare|cloud fleur/i;
    const hasReGlowie = (i, post) => post.innerHTML.match(reGlowie);
    const applyTemplate = (i, post) =>
      $(post).css({
        backgroundColor: "#D7EFD7",
        boxShadow: "#66FF66 0 0 2rem 0",
      });
    $(".reply").filter(hasReGlowie).each(applyTemplate);
  }


style="max-width:255px;max-height:255px"
  function inlineYoutubePreviews() {
 
    const re = /(?:youtu\.be\/|\/watch\?v=)(.{11})/;
src="<nowiki>https://i.ytimg.com/vi/${videoId}/hqdefault.jpg</nowiki>"
    const previewTemplate = (videoId) =>
 
      `<a href="https://youtube.com/watch?v=${videoId}">https://youtube.com/watch?v=${videoId}</a><br><img style="max-width:255px;max-height:255px" src="https://i.ytimg.com/vi/${videoId}/hqdefault.jpg" /><br><em>Watch on <a href="https://yewtu.be/${videoId}">Invidious</a> (less datamining)</em><br>`;
/>`;
    $(".body a")
 
      .filter(function (i) {
Array.from(document.querySelectorAll(".body a"))
        return $(this).prop("href").match(re);
 
      })
.filter((link) => link.href.match(re))
      .each(function (i) {
 
        $(this).prop("outerHTML", previewTemplate(this.href.match(re)[1]));
.forEach((link) => {
      });
 
  }
const videoId = link.href.match(re)[1];
})();
 
</pre>
const inlinePreview = previewTemplate(videoId);
 
link.innerHTML = inlinePreview;
 
});
 
})();</pre>
|}
|}
 
====Post Filters====
==== Filter tripchuds ====
Allows you to filter posts based on comments, subject, name, and tripcode
To use it, change "!!TRIP GOES HERE" to any trip you want to filter (ex: !incelchud1 or !!incelchud1), can also be used to filter names if you change <blockquote> (/class="trip">!!TRIP GOES HERE</) </blockquote> to <blockquote> (/class="name">name of the chudcel you want to filter</) </blockquote>
To access filters click on options button.
if you want to filter multiple tripchuds, you have to do this <blockquote> (/class="trip">!!FIRST TRIP CHUD|!SECOND TRIPCHUD|!THIRD TRIPCHUD</) </blockquote>


<i>Expand to view the script</i>
<i>Expand to view the script</i>
Line 1,552: Line 1,468:
|+
|+
|<pre>
|<pre>
// ==UserScript==
// @name        Post Filters for soyjak.party
// @name        Tripfag filter for soyjak.party
// @namespace    datamining
// @namespace    datamining
// @version      0.1
// @version      0.1
// @description  Filters tripfags
// @description  Filter posts on soyjak.party
// @author      Chud (You)
// @author      Chud (You)
// @match        https://soyjak.party/*
// @match        https://soyjak.party/*
Line 1,562: Line 1,477:
// @grant        none
// @grant        none
// ==/UserScript==
// ==/UserScript==
$(".post")
/*
   .filter(function (index) {
* post-menu.js - adds dropdown menu to posts
     return this.innerHTML.match(/class="trip">!!TRIP GOES HERE</);
*
  })
* Creates a global Menu object with four public methods:
   .each(function (index) {
*
     let whatToHide = "#" + this.id;
*   Menu.onclick(fnc)
     if (this.id.startsWith("op_")) {
*    registers a function to be executed after button click, before the menu is displayed
      whatToHide = "#" + this.id.replace("op_", "thread_");
*  Menu.add_item(id, text[, title])
    }
*     adds an item to the top level of menu
     $(whatToHide).hide();
*  Menu.add_submenu(id, text)
  });
*    creates and returns a List object through which to manipulate the content of the submenu
 
*   Menu.get_submenu(id)
if (!localStorage.favorites) {
*     returns the submenu with the specified id from the top level menu
localStorage.favorites = '[]';
*
}</pre>
*  The List object contains all the methods from Menu except onclick()
|}
*
 
*  Example usage:
==== Hide tripchud posts from catalog ====
*     Menu.add_item('filter-menu-hide', 'Hide post');
Hides all tripchud posts from catalog, no exceptions.
*    Menu.add_item('filter-menu-unhide', 'Unhide post');
*
*     submenu = Menu.add_submenu('filter-menu-add', 'Add filter');
*        submenu.add_item('filter-add-post-plus', 'Post +', 'Hide post and all replies');
*        submenu.add_item('filter-add-id', 'ID');
* Usage:
*  $config['additional_javascript'][] = 'js/jquery.min.js';
*  $config['additional_javascript'][] = 'js/post-menu.js';
*/
$(document).ready(function () {


<i>Expand to view the script</i>
var List = function (menuId, text) {
{| class="mw-collapsible mw-collapsed"
this.id = menuId;
|+
this.text = text;
|<pre>// ==UserScript==
this.items = [];
// @name        Tripfag catalog filter for soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Filters tripfags
// @author      Chud (You)
// @match        https://soyjak.party/*
// @icon        https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
// --- start: purgeTripsFromCatalog ---


(function purgeTripsFromCatalog() {
this.add_item = function (itemId, text, title) {
  // If on a catalog page
this.items.push(new Item(itemId, text, title));
  if (document.location.href.match(/catalog\.html$/)) {
};
    // Call the API for that page
this.list_items = function () {
    fetch(document.location.href.replace(".html", ".json"))
var array = [];
      .then((res) => res.json())
var i, length, obj, $ele;
      .then((json) =>
        json
          // Find the threads where OP is using a tripcode
          .reduce((acc, cur) => [...acc, ...cur.threads], [])
          .filter((op) => op.trip)
          // Hide them
          .forEach((filtered) => $(`div[data-id='${filtered.no}']`).hide())
      );
  }
})();


// --- end: purgeTripsFromCatalog ---</pre>
if ($.isEmptyObject(this.items))
|}
return;


=== Disable gif autoplay ===
length = this.items.length;
for (i = 0; i < length; i++) {
obj = this.items[i];


<i>Expand to view the script</i>
$ele = $('<li>', {id: obj.id}).text(obj.text);
{| class="mw-collapsible mw-collapsed"
if ('title' in obj) $ele.attr('title', obj.title);
|+
|<pre>// ==UserScript==
// @name    disable gif autoplay
// @version  1
// @grant    none
// @match https://soyjak.party/*
// ==/UserScript==


window.addEventListener('load', function () {
if (obj instanceof Item) {
[].slice.apply(document.images).filter(is_gif_image).map(freeze_gif);
$ele.addClass('post-item');
} else {
$ele.addClass('post-submenu');


function is_gif_image(i) {
$ele.prepend(obj.list_items());
    return /^(?!data:).*\.gif/i.test(i.src);
$ele.append($('<span>', {class: 'post-menu-arrow'}).text('»'));
}
}


function freeze_gif(i) {
array.push($ele);
    var c = document.createElement('canvas');
}
    var w = c.width = i.width;
    var h = c.height = i.height;
    c.getContext('2d').drawImage(i, 0, 0, w, h);
    try {
        i.src = c.toDataURL("image/gif");
    } catch(e) {
        for (var j = 0, a; a = i.attributes[j]; j++)
            c.setAttribute(a.name, a.value);
        i.parentNode.replaceChild(c, i);
    }
}
})</pre>
|}
=== Strip jump.kolyma.net Links ===
<b>NOTE</b>: KolymaNET's jump script automatically blocks harmful websites, such as IP grabbers. Use this script at your own risk.


>umm it doesn't work i can still see the link when i hover over it even doe it strips it on click so it does work actually
return $('<ul>').append(array);
 
};
<i>Expand to view the script.</i>
this.add_submenu = function (menuId, text) {
{| class="mw-collapsible mw-collapsed"
var ele = new List(menuId, text);
|+
this.items.push(ele);
|<pre>
return ele;
// ==UserScript==
};
// @name        Kolyma jump stripper
this.get_submenu = function (menuId) {
// @namespace    datamining
for (var i = 0; i < this.items.length; i++) {
// @version      1.0
if ((this.items[i] instanceof Item) || this.items[i].id != menuId) continue;
// @description  Strips Kolyma jump links from soyjak.party
return this.items[i];
// @author      Chud (You)
}
// @match        https://soyjak.party/*
};
// @icon        https://soyjak.party/static/favicon.png
};
// @grant        none
// ==/UserScript==
function strip(e) {
  if (!!e.target.href) {
    e.target.href = decodeURIComponent(e.target.href.replace("https://jump.kolyma.net/?", ""));
  }
}


document.addEventListener("click", e => strip(e));
var Item = function (itemId, text, title) {
document.addEventListener("auxclick", e => strip(e));</pre>
this.id = itemId;
|}
this.text = text;


=== Ratio script ===
// optional
adds a [ratio] button that starts posting automated replies from a selection of 4 types: "generic","[[Cobson|cob]]","[[Trannies|trans]]" and "[[chud]]". perfect for shitposting
if (typeof title != 'undefined') this.title = title;
};


(feel free to add more quotes to the code, the "chud" one is very incomplete)
function buildMenu(e) {
{| class="mw-collapsible mw-collapsed"
var pos = $(e.target).offset();
|+
var i, length;
|
 
var $menu = $('<div class="post-menu"></div>').append(mainMenu.list_items());
 
//  execute registered click handlers
length = onclick_callbacks.length;
for (i = 0; i < length; i++) {
onclick_callbacks[i](e, $menu);
}


<pre>
// set menu position and append to page
// ==UserScript==
$menu.css({top: pos.top, left: pos.left + 20});
// @name        Sharty Ratio
$('body').append($menu);
// @namespace   soyjak.party
// @match       http*://soyjak.party/*
// @version     1.0
// @author      God Tier Wojack
// @description Ratio that nigga
// ==/UserScript==
const modifiers = ["==", "%%", "--", "'", ""];
let done = new Array(20);
let stringSets = {
  "Generic": ["holy shit", "holy shiiiit", "holy fuck", "holy fuck.", "fuckin hell", "holy fuckk", "holy fuckkk", "holy fuckkkk", "lfg", "lfggg", "lfgggg", "lfg!", "lfg!!", "lfgg!!!", "w", "dub", "massive w", "huge w", "gigantic w", "massive dub", "huge dub", "another dub", "another w", "gigantic w", "get his ass", "get that nigga", "lets fucking go", "lets fucking gooo", "lets fucking goooo", "lets fucking goooo", "lets fucking go!", "lets fucking go!!", "lets fucking go!!!", "lets fucking go!!!!!", "yo get his ass", "yo get em", "yooo", "yoooo", "yooooooo", "yoooooooooooo", "god damn", "got damn", "god damnnn", "damnnnnn", "own that fraud", "expose that fraud", "lets gooo", "lets gooooo", "let's goooooo", "keyed", "keyed af", "holy keyed", "gem", "massive gem", "gemerald", "wem", "huge gem", "gigantic gem", "sharty saving gem", "diamond", "sharty saving diamond", "up", "go up", "go the fuck up", "up up up", "go tf up", "'chup", "own that fraud", "get they ass", "beat his ass", "kill that nigga", "can't stop winning", "we cant stop winning bros", "diamonderald", "btfo", "eternally btfo", "zamn", "zamnnn", "holy based", "based af"],
  "Cob": ["another cob w", "#cobgang", "another gemson victory", "gemson win", "gemson victory", "gemson up", "god tier wojack", "gem tier godjack", "cobby up", "cobby go up", "godson up", "upson", "keyedson", "winson", "cob w", "cob dub", "cobby win", "#cobgang win", "#cobgang victory", "hwabag", "god tier winjack", "diamondson go up", "winson up", "gemson go up", "godson go up", "gemson dub", "gemson w", "godson dub", "godson w", "#cobgang dub", "#cobgang w", "cobwin", "he won", "he fucking won", "he cant stop winning"],
  "Trans": ["trans rights", "trans fucking rights", "trans rights won", "sisters...", "trans rights w", "trans rights dub", "trans folx won", "w trans rights", "trans rights go up", "transphobes btfo", "transphobes destroyed", "trans rights victory", "w for trans rights", "trans victory", "transerald", "trans diamond", "bump up the trans", "uptrans", "sisters go up", "upsis", "trans top", "estrogem", "estrogemerald", "bumpstrogen", "topstrogen", "winstrogen"],
   "chud":["1488","fuck niggers","kill all blacks","kanye 2024","dial eight","-ACK!","sieg heil!","jews","media is kiked","goyslop","hang yourself troon","the west has fallen","back to /leftypol/","amerimutt","women are made for rape"]
}
}
let targetPosts = [];
let sets = [stringSets["Generic"]];
setInterval(() => {
  document.querySelectorAll(".button.alert_button").forEach(e => e.click());
  if (targetPosts.length == 0 || sets.length == 0) {
    return;
  }
  let post = "";
  targetPosts.forEach(p => post += `>>${p}\n`);
  let effect = "";
  if (Math.random() > 0.5) {
    effect = modifiers[Math.floor(Math.random() * modifiers.length)];
  }
  post += effect;
  let strings = sets.flat();
  stringsLength = strings.length;
  let found = false;
  while (!found) {
    text = strings[(Math.floor(Math.random() * stringsLength))];
    if (!done.includes(text)) {
      if (Math.random() > 0.5) {
        text = text.toUpperCase();
      }
      post += text;
      found = true;
      done.unshift(text);
      done.pop();
    }
  }
  post += effect;
  document.querySelector("form[name=post] textarea#body").value = post;
  document.querySelector("form[name=post] input[value*='Reply']").click();
}, 12000);
function addRatioButton(post) {
  post.querySelector(".intro").insertAdjacentHTML("beforeend", `<a href="javascript:void(0);" class="ratio" postNumber="${post.getElementsByClassName("post_no")[1].textContent}">[Ratio]</a>`);
}
let options = Options.add_tab("ratio", "gear", "Ratio").content[0];
let optionsHTML = "";
for ([key, value] of Object.entries(stringSets)) {
  optionsHTML += `<input type="checkbox" id="ratio-${key}" name="${key}"><label for="ratio-${key}">${key}</label><br>`;
}
options.insertAdjacentHTML("beforeend", optionsHTML);
options.querySelectorAll("input[type=checkbox]").forEach(e => {
  e.addEventListener("change", e => {
    sets = [];
    options.querySelectorAll("input[type=checkbox]:checked").forEach(c => sets.push(stringSets[c.getAttribute("name")]));
  });
  e.checked = e.getAttribute("name") == "Generic";
});
const updateObserver = new MutationObserver(list => {
  list.forEach(node => {
    if (node.addedNodes[0].nodeName == "DIV") {
      addRatioButton(node.addedNodes[0]);
    }
  });
});
updateObserver.observe(document.querySelector(".thread"), {
  childList: true
});
[...document.getElementsByClassName("post")].forEach(e => {
  addRatioButton(e);
});
document.addEventListener("click", e => {
  let t = e.target;
  if (t.classList.contains("ratio")) {
    if (t.textContent == "[Ratio]") {
      t.textContent = "[Unratio]";
      targetPosts.push(t.getAttribute("postNumber"));
    } else {
      targetPosts = targetPosts.filter(p => p != t.getAttribute("postNumber"));
      t.textContent = "[Ratio]";
    }
  }
});
</pre>
|}


=== Sharty Themes ===
function addButton(post) {
<i>Expand to view the script</i>
var $ele = $(post);
{| class="mw-collapsible mw-collapsed"
$ele.find('input.delete').after(
|
$('<a>', {href: '#', class: 'post-btn', title: 'Post menu'}).text('▶')
|-
);
|<pre>
}
// ==UserScript==
 
// @name        Sharty Themes
 
// @namespace  soyjak.partythemes
/* * * * * * * * * *
// @match      http*://soyjak.party/*
    Public methods
// @match      http*://www.soyjak.party/*
* * * * * * * * * */
// @grant      GM_getValue
var Menu = {};
// @grant      GM_setValue
var mainMenu = new List();
// @grant      GM_xmlhttpRequest
var onclick_callbacks = [];
// @grant      GM_addStyle
 
// @connect    *
Menu.onclick = function (fnc) {
// @license MIT
onclick_callbacks.push(fnc);
// @version    1.0
};
// @author      Base framework by Zyl, Mainly created by Doughy
 
// @description The Gemmiest Enhancements for the 'ty
Menu.add_item = function (itemId, text, title) {
// ==/UserScript==
mainMenu.add_item(itemId, text, title);
};
 
Menu.add_submenu = function (menuId, text) {
return mainMenu.add_submenu(menuId, text);
};
 
Menu.get_submenu = function (id) {
return mainMenu.get_submenu(id);
};
 
window.Menu = Menu;
 
 
/* * * * * * * *
    Initialize
* * * * * * * */
 
/* Styling
*/
var $ele, cssStyle, cssString;
 
$ele = $('<div>').addClass('post reply').hide().appendTo('body');
cssStyle = $ele.css(['border-top-color']);
cssStyle.hoverBg = $('body').css('background-color');
$ele.remove();
 
cssString =
'\n/*** Generated by post-menu ***/\n' +
'.post-menu {position: absolute; font-size: 12px; line-height: 1.3em;}\n' +
'.post-menu ul {\n' +
'    background-color: '+ cssStyle['border-top-color'] +'; border: 1px solid #666;\n' +
'    list-style: none; padding: 0; margin: 0; white-space: nowrap;\n}\n' +
'.post-menu .post-submenu{white-space: normal; width: 90px;}' +
'.post-menu .post-submenu>ul{white-space: nowrap; width: auto;}' +
'.post-menu li {cursor: pointer; position: relative; padding: 4px 4px; vertical-align: middle;}\n' +
'.post-menu li:hover {background-color: '+ cssStyle.hoverBg +';}\n' +
'.post-menu ul ul {display: none; position: absolute;}\n' +
'.post-menu li:hover>ul {display: block; left: 100%; margin-top: -3px;}\n' +
'.post-menu-arrow {float: right; margin-left: 10px;}\n' +
'.post-menu.hidden, .post-menu .hidden {display: none;}\n' +
'.post-btn {transition: transform 0.1s; width: 15px; text-align: center; font-size: 10pt; opacity: 0.8; text-decoration: none; margin: -6px 0px 0px -5px !important; display: inline-block;}\n' +
'.post-btn:hover {opacity: 1;}\n' +
'.post-btn-open {transform: rotate(90deg);}\n';
 
if (!$('style.generated-css').length) $('<style class="generated-css">').appendTo('head');
$('style.generated-css').html($('style.generated-css').html() + cssString);


const version = "v1.0";
/*  Add buttons
console.log(`Sharty Themes ${version}`);
*/
$('.reply:not(.hidden), .thread>.op').each(function () {
addButton(this);
});


const namespace = "ShartyThemes.";
/*  event handlers
function setValue(key, value) {
  */
  if (key == "hiddenthreads" || key == "hiddenimages") {
$('form[name=postcontrols]').on('click', '.post-btn', function (e) {
    if (typeof GM_setValue == "function") {
e.preventDefault();
      GM_setValue(key, value);
var post = e.target.parentElement.parentElement;
    }
$('.post-menu').remove();
    localStorage.setItem(key, value);
 
  } else {
if ($(e.target).hasClass('post-btn-open')) {
    if (typeof GM_setValue == "function") {
$('.post-btn-open').removeClass('post-btn-open');
      GM_setValue(namespace + key, value);
} else {
    } else {
//  close previous button
      localStorage.setItem(namespace + key, value);
$('.post-btn-open').removeClass('post-btn-open');
    }
$(post).find('.post-btn').addClass('post-btn-open');
  }
}


function getValue(key) {
buildMenu(e);
  if (key == "hiddenthreads" || key == "hiddenimages") {
}
    if (typeof GM_getValue == "function" && GM_getValue(key)) {
});
      localStorage.setItem(key, GM_getValue(key).toString());
    }
    return localStorage.getItem(key);
  }
  if (typeof GM_getValue == "function") {
    return GM_getValue(namespace + key);
  } else {
    return localStorage.getItem(namespace + key);
  }
}


function themeEnabled(key) {
$(document).on('click', function (e){
  let value = getValue(key);
if ($(e.target).hasClass('post-btn') || $(e.target).hasClass('post-submenu'))
  if (value == null) {
return;
    value = optionsEntries[key][2];
 
    setValue(key, value);
$('.post-menu').remove();
  }
$('.post-btn-open').removeClass('post-btn-open');
  return value.toString() == "true";
});
}
 
// on new posts
$(document).on('new_post', function (e, post) {
addButton(post);
});


function getNumber(key) {
$(document).trigger('menu_ready');
  let value = parseInt(getValue(key));
});
  if (Number.isNaN(value)) {
    value = 0;
  }
  return value;
}


function getJson(key) {
  let value = getValue(key);
  if (value == null) {
    value = "{}";
  }
  return JSON.parse(value);
}


function addToJson(key, jsonKey, value) {
// Post Filters
  let json = getJson(key);
if (active_page === 'thread' || active_page === 'index' || active_page === 'catalog' || active_page === 'ukko') {
  let parent = json;
$(document).on('menu_ready', function () {
  jsonKey.split(".").forEach((e, index, array) => {
'use strict';
    if (index < array.length - 1) {
      if (!parent.hasOwnProperty(e)) {
// returns blacklist object from storage
        parent[e] = {};
function getList() {
      }
return JSON.parse(localStorage.postFilter);
      parent = parent[e];
}
    } else {
 
      parent[e] = value;
// stores blacklist into storage and reruns the filter
    }
function setList(blacklist) {
  });
localStorage.postFilter = JSON.stringify(blacklist);
  setValue(key, JSON.stringify(json));
$(document).trigger('filter_page');
  return json;
}
}


function removeFromJson(key, jsonKey) {
// unit: seconds
  let json = getJson(key);
function timestamp() {
  let parent = json;
return Math.floor((new Date()).getTime() / 1000);
  jsonKey.split(".").forEach((e, index, array) => {
}
    if (index < array.length - 1) {
      parent = parent[e];
    } else {
      delete parent[e];
    }
  });
  setValue(key, JSON.stringify(json));
  return json;
}


function customAlert(a) {
function initList(list, boardId, threadId) {
    document.body.insertAdjacentHTML("beforeend", `
if (typeof list.postFilter[boardId] == 'undefined') {
<div id="alert_handler">
list.postFilter[boardId] = {};
  <div id="alert_background" onclick="this.parentNode.remove()"></div>
list.nextPurge[boardId] = {};
  <div id="alert_div">
}
    <a id='alert_close' href="javascript:void(0)" onclick="this.parentNode.parentNode.remove()"><i class='fa fa-times'></i></a>
if (typeof list.postFilter[boardId][threadId] == 'undefined') {
    <div id="alert_message">${a}</div>
list.postFilter[boardId][threadId] = [];
    <button class="button alert_button" onclick="this.parentNode.parentNode.remove()">OK</button>
}
  </div>
list.nextPurge[boardId][threadId] = {timestamp: timestamp(), interval: 86400};  // 86400 seconds == 1 day
</div>`);
}
}


function addFilter(type, value, useRegex) {
var list = getList();
var filter = list.generalFilter;
var obj = {
type: type,
value: value,
regex: useRegex
};


const optionsEntries = {
for (var i=0; i<filter.length; i++) {
if (filter[i].type == type && filter[i].value == value && filter[i].regex == useRegex)
  "underwater": ["checkbox", "Underwater Theme", false],
return;
  "soot": ["checkbox", "Soot Theme", false],
}
  "beta": ["checkbox", "Beta Theme", false],
  "leftypol": ["checkbox", "Leftycoal Theme", false],
  "cafe": ["checkbox", "Crystal Theme", false],
  "gurochan": ["checkbox", "Gurochan Theme", false],
  "colorjak": ["checkbox", "Colorjak Theme", false],
}
 


filter.push(obj);
setList(list);
drawFilterList();
}


function removeFilter(type, value, useRegex) {
var list = getList();
var filter = list.generalFilter;


for (var i=0; i<filter.length; i++) {
if (filter[i].type == type && filter[i].value == value && filter[i].regex == useRegex) {
filter.splice(i, 1);
break;
}
}


setList(list);
drawFilterList();
}


let options = Options.add_tab("sharty-themes", "gear", "Sharty Themes").content[0];
function nameSpanToString(el) {
var s = '';  


$.each($(el).contents(), function(k,v) {
if (v.nodeName === 'IMG')
s=s+$(v).attr('alt')
if (v.nodeName === '#text')
s=s+v.nodeValue
});
return s.trim();
}


let optionsHTML = `<span style="display: block; text-align: center">${version}</span>`;
var blacklist = {
optionsHTML += `<a style="display: block; text-align: center" href="https://greasyfork.org/en/scripts/456980-sharty-fixes-gemerald">Best used with Sharty Fixes Gemerald</a><br>`;
add: {
optionsHTML += `<span style="display: block; text-align: center"><h1></h1></span>`;
post: function (boardId, threadId, postId, hideReplies) {
for ([optKey, optValue] of Object.entries(optionsEntries)) {
var list = getList();
  optionsHTML += `<input type="${optValue[0]}" id="${optKey}" name="${optKey}"><label for="${optKey}">${optValue[1]}</label><br>`;
var filter = list.postFilter;
}
options.insertAdjacentHTML("beforeend", optionsHTML);


options.querySelectorAll("input[type=checkbox]").forEach(e => {
initList(list, boardId, threadId);
  e.checked = themeEnabled(e.id);
  e.addEventListener("change", e => {
    setValue(e.target.id, e.target.checked);
  });
});


for (var i in filter[boardId][threadId]) {
if (filter[boardId][threadId][i].post == postId) return;
}
filter[boardId][threadId].push({
post: postId,
hideReplies: hideReplies
});
setList(list);
},
uid: function (boardId, threadId, uniqueId, hideReplies) {
var list = getList();
var filter = list.postFilter;


initList(list, boardId, threadId);


for (var i in filter[boardId][threadId]) {
if (filter[boardId][threadId][i].uid == uniqueId) return;
}
filter[boardId][threadId].push({
uid: uniqueId,
hideReplies: hideReplies
});
setList(list);
}
},
remove: {
post: function (boardId, threadId, postId) {
var list = getList();
var filter = list.postFilter;


document.head.insertAdjacentHTML("beforeend", `
// thread already pruned
<style>
if (typeof filter[boardId] == 'undefined' || typeof filter[boardId][threadId] == 'undefined')
 
return;
 
 


for (var i=0; i<filter[boardId][threadId].length; i++) {
if (filter[boardId][threadId][i].post == postId) {
filter[boardId][threadId].splice(i, 1);
break;
}
}


if ($.isEmptyObject(filter[boardId][threadId])) {
delete filter[boardId][threadId];
delete list.nextPurge[boardId][threadId];


if ($.isEmptyObject(filter[boardId])) {
delete filter[boardId];
delete list.nextPurge[boardId];
}
}
setList(list);
},
uid: function (boardId, threadId, uniqueId) {
var list = getList();
var filter = list.postFilter;


${themeEnabled("gurochan") ? `
// thread already pruned
html, body {
if (typeof filter[boardId] == 'undefined' || typeof filter[boardId][threadId] == 'undefined')
        font-size:10pt;
return;
        background:#EDDAD2;
        color: #800;
}
* {
        font-family: Tahoma, Verdana, Arial, sans-serif;
        font-size: 10pt;
}
input, textarea {
        background-color: #E6CBC0;
        border: 1px solid #CA927B;
}


a, a:visited{
for (var i=0; i<filter[boardId][threadId].length; i++) {
color: #AF0A0F;
if (filter[boardId][threadId][i].uid == uniqueId) {
}
filter[boardId][threadId].splice(i, 1);
break;
}
}


if ($.isEmptyObject(filter[boardId][threadId])) {
delete filter[boardId][threadId];
delete list.nextPurge[boardId][threadId];
if ($.isEmptyObject(filter[boardId])) {
delete filter[boardId];
delete list.nextPurge[boardId];
}
}
setList(list);
}
}
};
/*
*  hide/show the specified thread/post
*/
function hide(ele) {
var $ele = $(ele);


a:hover {
if ($(ele).data('hidden'))
color: #D00;
return;
}


a.quotelink {
$(ele).data('hidden', true);
        color:#DD0000;
if ($ele.hasClass('op')) {
}
$ele.parent().find('.body, .files, .video-container').not($ele.children('.reply').children()).hide();
div.post.reply.highlighted{
        background:#D9AF9E
}
form table tr th {
        background: #D9AF9E;
        border: 1px solid #CA927B;
        padding: 2px 5px 2px 5px;
}
div.banner{
        background: #D9AF9E;
        border: 1px solid #CA927B;
        color: #800;
        font-weight: bold;
        padding: 2px 5px 2px 5px;
}
div.post.reply{
        padding: 2px 5px 2px 5px;
background:#E6CBC0;
color:#800;
border:1px solid #D9AF9E;
}
div.post.reply div.body a{
      color: #AF0A0F;
}


.bar
// hide thread replies on index view
{
if (active_page == 'index' || active_page == 'ukko') $ele.parent().find('.omitted, .reply:not(.hidden), post_no, .mentioned, br').hide();
      background:#D9AF9E;
} else {
      color:#800;
// normal posts
}
$ele.children('.body, .files, .video-container').hide();
}
}
function show(ele) {
var $ele = $(ele);


.bar a {
$(ele).data('hidden', false);
        color:#800;
if ($ele.hasClass('op')) {
}
$ele.parent().find('.body, .files, .video-container').show();
if (active_page == 'index') $ele.parent().find('.omitted, .reply:not(.hidden), post_no, .mentioned, br').show();
} else {
// normal posts
$ele.children('.body, .files, .video-container').show();
}
}


.bar.bottom {
/*
    border-top: 1px solid #CA927B;
*  create filter menu when the button is clicked
}
*/
function initPostMenu(pageData) {
var Menu = window.Menu;
var submenu;
Menu.add_item('filter-menu-hide', _('Hide post'));
Menu.add_item('filter-menu-unhide', _('Unhide post'));


.desktop-style div.boardlist:not(.bottom), .desktop-style div.boardlist:not(.bottom) a {
submenu = Menu.add_submenu('filter-menu-add', _('Add filter'));
    font-size: 10pt;
submenu.add_item('filter-add-post-plus', _('Post +'), _('Hide post and all replies'));
    background:#D9AF9E;
submenu.add_item('filter-add-id', _('ID'));
    color:#800;
submenu.add_item('filter-add-id-plus', _('ID +'), _('Hide ID and all replies'));
    border-bottom: 1px solid #CA927B;
submenu.add_item('filter-add-name', _('Name'));
}
submenu.add_item('filter-add-trip', _('Tripcode'));


h1.glitch a{
submenu = Menu.add_submenu('filter-menu-remove', _('Remove filter'));
        font-size: 24pt;
submenu.add_item('filter-remove-id', _('ID'));
        color: #AF0A0F;
submenu.add_item('filter-remove-name', _('Name'));
        font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
submenu.add_item('filter-remove-trip', _('Tripcode'));
}
h1.glitch {
        font-size: 24pt;
        color: #AF0A0F;
        font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
}
hr {
        border-top: 1px dotted #D9AF9E;
}
#options_div {
        background: #D9AF9E;
        border: 2px solid #CA927B;
}
#options_tablist {
border: 1px solid #CA927B;
}
div.module, div.ban {
        background: #D9AF9E;
        border: 1px solid #CA927B;
}
div.ban h2 {
        background: #CA927B;
}
.fc td, .fc th {
        background: #CA927B;
}
.hljs, .hljs-subst {
        background: #EDDAD2;
        border: 1px solid #CA927B;
}


.intro a.email:hover{
Menu.onclick(function (e, $buffer) {
    color: #D00;
var ele = e.target.parentElement.parentElement;
}
var $ele = $(ele);


.intro a.email span.name {
var threadId = $ele.parent().attr('id').replace('thread_', '');
    color: #AF0A0F;
var boardId = $ele.parent().data('board');
}
var postId = $ele.find('.post_no').not('[id]').text();
if (pageData.hasUID) {
var postUid = $ele.find('.poster_id').text();
}


.intro span.name {
var postName;
    color: #AF0A0F;
var postTrip = '';
}
if (!pageData.forcedAnon) {
postName = (typeof $ele.find('.name').contents()[0] == 'undefined') ? '' : nameSpanToString($ele.find('.name')[0]);
postTrip = $ele.find('.trip').text();
}


.intro span.subject {
/*  display logic and bind click handlers
    color: #800;
*/
}


.options_tab_icon{
// unhide button
    color: #AF0A0F;
if ($ele.data('hidden')) {
}
$buffer.find('#filter-menu-unhide').click(function () {
 
//  if hidden due to post id, remove it from blacklist
 
//  otherwise just show this post
#quick-reply th {
blacklist.remove.post(boardId, threadId, postId);
    border: 1px solid #D9AF9E;
show(ele);
}
});
$buffer.find('#filter-menu-hide').addClass('hidden');
} else {
$buffer.find('#filter-menu-unhide').addClass('hidden');
$buffer.find('#filter-menu-hide').click(function () {
blacklist.add.post(boardId, threadId, postId, false);
});
}


//  post id
if (!$ele.data('hiddenByPost')) {
$buffer.find('#filter-add-post-plus').click(function () {
blacklist.add.post(boardId, threadId, postId, true);
});
} else {
$buffer.find('#filter-add-post-plus').addClass('hidden');
}


div.pages input{
// UID
    background:#D9AF9E;
if (pageData.hasUID && !$ele.data('hiddenByUid')) {
    color:#800;
$buffer.find('#filter-add-id').click(function () {
}
blacklist.add.uid(boardId, threadId, postUid, false);
});
$buffer.find('#filter-add-id-plus').click(function () {
blacklist.add.uid(boardId, threadId, postUid, true);
});


div.pages a.selected{
$buffer.find('#filter-remove-id').addClass('hidden');
    color:#800;
} else if (pageData.hasUID) {
}
$buffer.find('#filter-remove-id').click(function () {
blacklist.remove.uid(boardId, threadId, postUid);
});


.quote {
$buffer.find('#filter-add-id').addClass('hidden');
    color: #866;
$buffer.find('#filter-add-id-plus').addClass('hidden');
}
} else {
// board doesn't use UID
$buffer.find('#filter-add-id').addClass('hidden');
$buffer.find('#filter-add-id-plus').addClass('hidden');
$buffer.find('#filter-remove-id').addClass('hidden');
}


//  name
if (!pageData.forcedAnon && !$ele.data('hiddenByName')) {
$buffer.find('#filter-add-name').click(function () {
addFilter('name', postName, false);
});


div.banner a, textarea {
$buffer.find('#filter-remove-name').addClass('hidden');
    color: #800;
} else if (!pageData.forcedAnon) {
}
$buffer.find('#filter-remove-name').click(function () {
removeFilter('name', postName, false);
});


$buffer.find('#filter-add-name').addClass('hidden');
} else {
// board has forced anon
$buffer.find('#filter-remove-name').addClass('hidden');
$buffer.find('#filter-add-name').addClass('hidden');
}


a.selected:nth-child(1) {
//  tripcode
        color:#800;
if (!pageData.forcedAnon && !$ele.data('hiddenByTrip') && postTrip !== '') {
}
$buffer.find('#filter-add-trip').click(function () {
` : ""}
addFilter('trip', postTrip, false);
});


$buffer.find('#filter-remove-trip').addClass('hidden');
} else if (!pageData.forcedAnon && postTrip !== '') {
$buffer.find('#filter-remove-trip').click(function () {
removeFilter('trip', postTrip, false);
});


${themeEnabled("underwater") ? `
$buffer.find('#filter-add-trip').addClass('hidden');
} else {
// board has forced anon
$buffer.find('#filter-remove-trip').addClass('hidden');
$buffer.find('#filter-add-trip').addClass('hidden');
}


a:link, a:visited {
/*  hide sub menus if all items are hidden
text-decoration: none;
*/
color: #00637B;
if (!$buffer.find('#filter-menu-remove > ul').children().not('.hidden').length) {
}
$buffer.find('#filter-menu-remove').addClass('hidden');
}
if (!$buffer.find('#filter-menu-add > ul').children().not('.hidden').length) {
$buffer.find('#filter-menu-add').addClass('hidden');
}
});
}


a:link:hover, a:visited:hover {
/*
color: #DD0000;
*  hide/unhide thread on index view
}
*/
function quickToggle(ele, threadId, pageData) {
/*if ($(ele).find('.hide-thread-link').length)
$('.hide-thread-link').remove();*/


a.post_no {
if ($(ele).hasClass('op') && !$(ele).find('.hide-thread-link').length) {
color: #000033;
$('<a class="hide-thread-link" style="float:left;margin-right:5px" href="javascript:void(0)">[' + ($(ele).data('hidden') ? '+' : '&ndash;') + ']</a>')
}
.insertBefore($(ele).find(':not(h2,h2 *):first'))
.click(function() {
var postId = $(ele).find('.post_no').not('[id]').text();
var hidden = $(ele).data('hidden');
var boardId = $(ele).parents('.thread').data('board');
if (hidden) {
blacklist.remove.post(boardId, threadId, postId, false);
$(this).html('[&ndash;]');
} else {
blacklist.add.post(boardId, threadId, postId, false);
$(this).text('[+]');
}
});
}
}


.intro a.email span.name {
/*
color: #0093AB;
*  determine whether the reply post should be hidden
}
*  - applies to all posts on page load or filtering rule change
 
*  - apply to new posts on thread updates
.intro a.email:hover span.name {
*  - must explicitly set the state of each attributes because filter will reapply to all posts after filtering rule change
color: #DD0000;
*/
}
function filter(post, threadId, pageData) {
var $post = $(post);


h2, div.title, h1 {
var list = getList();
color: #800000;
var postId = $post.find('.post_no').not('[id]').text();
}
var name, trip, uid, subject, comment;
var i, length, array, rule, pattern; // temp variables


form table tr th {
var boardId       = $post.data('board');
background: #95D2D3;
if (!boardId) boardId = $post.parents('.thread').data('board');
}


div.banner {
var localList  = pageData.localList;
background-color: #E04000;
var noReplyList = pageData.noReplyList;
}
var hasUID      = pageData.hasUID;
var forcedAnon  = pageData.forcedAnon;


div.post.op hr {
var hasTrip = ($post.find('.trip').length > 0);
border-color: #B7C9D5;
var hasSub = ($post.find('.subject').length > 0);
}


.intro span.subject {
$post.data('hidden', false);
color: #117743;
$post.data('hiddenByUid', false);
font-weight: 800;
$post.data('hiddenByPost', false);
}
$post.data('hiddenByName', false);
$post.data('hiddenByTrip', false);
$post.data('hiddenBySubject', false);
$post.data('hiddenByComment', false);


.intro span.name {
// add post with matched UID to localList
color: #117743;
if (hasUID &&
font-weight: 800;
typeof list.postFilter[boardId] != 'undefined' &&
}
typeof list.postFilter[boardId][threadId] != 'undefined') {
uid = $post.find('.poster_id').text();
array = list.postFilter[boardId][threadId];


div.post.reply.highlighted {
for (i=0; i<array.length; i++) {
background: #a9d8ff;
if (array[i].uid == uid) {
}
$post.data('hiddenByUid', true);
localList.push(postId);
if (array[i].hideReplies) noReplyList.push(postId);
break;
}
}
}


div.post.reply {
// match localList
background: #B6DDDE;
if (localList.length) {
border-color: #8FCCCD;
if ($.inArray(postId, localList) != -1) {
}
if ($post.data('hiddenByUid') !== true) $post.data('hiddenByPost', true);
hide(post);
}
}


div.ban {
// matches generalFilter
border: 1px solid #0093AB;
if (!forcedAnon)
}
name = (typeof $post.find('.name').contents()[0] == 'undefined') ? '' : nameSpanToString($post.find('.name')[0]);
if (!forcedAnon && hasTrip)
trip = $post.find('.trip').text();
if (hasSub)
subject = $post.find('.subject').text();


div.ban h2 {
array = $post.find('.body').contents().filter(function () {if ($(this).text() !== '') return true;}).toArray();
background: #B6DDDE;
array = $.map(array, function (ele) {
color: #0093AB;
return $(ele).text().trim();
}
});
comment = array.join(' ');


div.pages {
color: #8899AA;
background: #B6DDDE;
border-right: 1px solid #8FCCCD;
border-bottom: 1px solid #8FCCCD;
}


hr {
for (i = 0, length = list.generalFilter.length; i < length; i++) {
border-color: #B7D9C5;
rule = list.generalFilter[i];
}


div.boardlist {
if (rule.regex) {
color: #0093AB;
pattern = new RegExp(rule.value);
    background-color: rgba(65%, 85%, 95%, 0.2);
switch (rule.type) {
}
case 'name':
 
if (!forcedAnon && pattern.test(name)) {
.desktop-style div.boardlist:nth-child(1) {
$post.data('hiddenByName', true);
  text-shadow: #D2FFEE 1px 1px 1px, #D2FFEE -1px -1px 1px;
hide(post);
}
}
* {
break;
  background-image: url('https://files.catbox.moe/hp03xs.png');
case 'trip':
}
if (!forcedAnon && hasTrip && pattern.test(trip)) {
 
$post.data('hiddenByTrip', true);
.soifish {
hide(post);
  background-image: url('https://files.catbox.moe/rxmvyr.png');
}
  position: fixed;
break;
    pointer-events: none;
case 'sub':
  -webkit-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
if (hasSub && pattern.test(subject)) {
  -moz-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
$post.data('hiddenBySubject', true);
  -o-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
hide(post);
  animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
}
}
break;
 
case 'com':
@-webkit-keyframes moveX {
if (pattern.test(comment)) {
  from { left: 0; } to { left: 100%; }
$post.data('hiddenByComment', true);
}
hide(post);
@-moz-keyframes moveX {
}
  from { left: 0; } to { left: 100%; }
break;
}
}
@-o-keyframes moveX {
} else {
  from { left: 0; } to { left: 100%; }
switch (rule.type) {
}
case 'name':
@keyframes moveX {
if (!forcedAnon && rule.value == name) {
  from { left: 0; } to { left: 100%; }
$post.data('hiddenByName', true);
}
hide(post);
 
}
@-webkit-keyframes moveY {
break;
  from { top: 0; } to { top: 100%; }
case 'trip':
}
if (!forcedAnon && hasTrip && rule.value == trip) {
@-moz-keyframes moveY {
$post.data('hiddenByTrip', true);
  from { top: 0; } to { top: 100%; }
hide(post);
}
}
@-o-keyframes moveY {
break;
  from { top: 0; } to { top: 100%; }
case 'sub':
}
pattern = new RegExp('\\b'+ rule.value+ '\\b');
@keyframes moveY {
if (hasSub && pattern.test(subject)) {
  from { top: 0; } to { top: 100%; }
$post.data('hiddenBySubject', true);
}
hide(post);
}
break;
case 'com':
pattern = new RegExp('\\b'+ rule.value+ '\\b');
if (pattern.test(comment)) {
$post.data('hiddenByComment', true);
hide(post);
}
break;
}
}
}


// check for link to filtered posts
$post.find('.body a').not('[rel="nofollow"]').each(function () {
var replyId = $(this).text().match(/^>>(\d+)$/);


if (!replyId)
return;


.post.reply .body a:hover:after {
replyId = replyId[1];
    content: url(https://soyjak.download/f.php?h=0lnyi5TW&p=1);
if ($.inArray(replyId, noReplyList) != -1) {
    display: block;
hide(post);
    position: absolute;
}
    left: 20px;
});
    top: -255px;
 
    pointer-events: none;
// post didn't match any filters
    z-index: 999;
if (!$post.data('hidden')) {
}
show(post);
}
}


.post.reply .body a:hover {
/*  (re)runs the filter on the entire page
    position: relative;
*/
}
function filterPage(pageData) {
var list = getList();


body:after {
if (active_page != 'catalog') {
    content: url(https://soyjak.download/f.php?h=3EFSgyRY&p=1);
    display: block;
    position: fixed;
    bottom: 0px;
    right: 0px;
    pointer-events: none;


.desktop-style div.boardlist:nth-child(1):hover, .desktop-style div.boardlist:nth-child(1).cb-menu {
// empty the local and no-reply list
  background-color: rgba(70%, 95%, 100%, 0.45);
pageData.localList = [];
}` : ""}
pageData.noReplyList = [];


$('.thread').each(function () {
var $thread = $(this);
// disregard the hidden threads constructed by post-hover.js
if ($thread.css('display') == 'none')
return;


${themeEnabled("soot") ? `
var threadId = $thread.attr('id').replace('thread_', '');
@import url("/stylesheets/dark.css");
var boardId = $thread.data('board');
/*soot theme*/
var op = $thread.children('.op')[0];
var i, array;  // temp variables


.name {
// add posts to localList and noReplyList
    color: #FDD73A !important;
if (typeof list.postFilter[boardId] != 'undefined' && typeof list.postFilter[boardId][threadId] != 'undefined') {
}
array = list.postFilter[boardId][threadId];
for (i=0; i<array.length; i++) {
if ( typeof array[i].post == 'undefined')
continue;


body {
pageData.localList.push(array[i].post);
    background: black url(https://i.imgur.com/FeQmhfL.png) right bottom no-repeat fixed;
if (array[i].hideReplies) pageData.noReplyList.push(array[i].post);
}
}
}
// run filter on OP
filter(op, threadId, pageData);
quickToggle(op, threadId, pageData);


div.post.reply {
// iterate filter over each post
    background-color: #646464 !important;
if (!$(op).data('hidden') || active_page == 'thread') {
    color: black;
$thread.find('.reply').not('.hidden').each(function () {
    border-radius:0;
filter(this, threadId, pageData);
}
});
}


div#post-moderation-fields , div#style-select {
});
    padding:4px;
} else {
    background-color:rgba(0,0,0,28);
var postFilter = list.postFilter[pageData.boardId];
}
var $collection = $('.mix');


span.heading {
if ($.isEmptyObject(postFilter))
    color: #FF565C !important;
return;
}


.remove-btn {
// for each thread that has filtering rules
    color: rgba(255,255,255,128) !important;
// check if filter contains thread OP and remove the thread from catalog
}
$.each(postFilter, function (key, thread) {
 
var threadId = key;
hr {
$.each(thread, function () {
    border-color:transparent;
if (this.post == threadId) {
}
$collection.filter('[data-id='+ threadId +']').remove();
}
});
});
}
}


` : ""}
function initStyle() {
var $ele, cssStyle, cssString;


$ele = $('<div>').addClass('post reply').hide().appendTo('body');
cssStyle = $ele.css(['background-color', 'border-color']);
cssStyle.hoverBg = $('body').css('background-color');
$ele.remove();


${themeEnabled("beta") ? `
cssString = '\n/*** Generated by post-filter ***/\n' +
@import url("https://soyjak.party/stylesheets/dark.css");
'#filter-control input[type=text] {width: 130px;}' +
/**
'#filter-control input[type=checkbox] {vertical-align: middle;}' +
* Beta.css
'#filter-control #clear {float: right;}\n' +
* by kalyx
'#filter-container {margin-top: 20px; border: 1px solid; height: 270px; overflow: auto;}\n' +
*this might work well on phones
'#filter-list {width: 100%; border-collapse: collapse;}\n' +
*/
'#filter-list th {text-align: center; height: 20px; font-size: 14px; border-bottom: 1px solid;}\n' +
'#filter-list th:nth-child(1) {text-align: center; width: 70px;}\n' +
'#filter-list th:nth-child(2) {text-align: left;}\n' +
'#filter-list th:nth-child(3) {text-align: center; width: 58px;}\n' +
'#filter-list tr:not(#header) {height: 22px;}\n' +
'#filter-list tr:nth-child(even) {background-color:rgba(255, 255, 255, 0.5);}\n' +
'#filter-list td:nth-child(1) {text-align: center; width: 70px;}\n' +
'#filter-list td:nth-child(3) {text-align: center; width: 58px;}\n' +
'#confirm {text-align: right; margin-bottom: -18px; padding-top: 2px; font-size: 14px; color: #FF0000;}';


body
if (!$('style.generated-css').length) $('<style class="generated-css">').appendTo('head');
{
$('style.generated-css').html($('style.generated-css').html() + cssString);
display:block;
}
padding-top: 26px;
background: #0d1010;
color: #e8e8e3;
font-family: sans-serif;
font-size: 18px;


function drawFilterList() {
var list = getList().generalFilter;
var $ele = $('#filter-list');
var $row, i, length, obj, val;


width: 100%;
var typeName = {
}
name: 'name',
trip: 'tripcode',
sub: 'subject',
com: 'comment'
};


html {
$ele.empty();
/* Size of largest container or bigger */
  background:#0d1010;
width: 100%;
margin-left: auto;
  margin-right: auto;


}
$ele.append('<tr id="header"><th>Type</th><th>Content</th><th>Remove</th></tr>');
/*banner*/
for (i = 0, length = list.length; i < length; i++) {
.board_image{
obj = list[i];
border: double 0px #e8e8e3;
box-shadow: 2px 2px #e8e8e3;
}


    /*gives images border/shadow*/
// display formatting
    div.files img.post-image {
val = (obj.regex) ? '/'+ obj.value +'/' : obj.value;
border: solid 1px #e8e8e3;
box-shadow: 2px 2px #e8e8e3;
        padding: 0px;
        border-radius: 0;
        margin-bottom: 5px;
}
div.sidearrows{
display: none;
}


span.quote
$row = $('<tr>');
{
$row.append(
    color:#e8d928;
'<td>'+ typeName[obj.type] +'</td>',
}
'<td>'+ val +'</td>',
@font-face
$('<td>').append(
{
$('<a>').html('X')
  font-family: 'lain';
.addClass('del-btn')
  src: url('./fonts/nrdyyh.woff') format('woff'),
.attr('href', '#')
      url('./fonts/tojcxo.TTF') format('truetype');
.data('type', obj.type)
}
.data('val', obj.value)
h1
.data('useRegex', obj.regex)
{
)
display: none;
);
font-family: 'lain', tahoma;
$ele.append($row);
}
}


letter-spacing: -2px;
function initOptionsPanel() {
font-size: 42pt;
if (window.Options && !Options.get_tab('filter')) {
text-align: center;
Options.add_tab('filter', 'list', _('Filters'));
color: #e8e8e3;
Options.extend_tab('filter',
 
'<div id="filter-control">' +
}
'<select>' +
header div.subtitle
'<option value="name">'+_('Name')+'</option>' +
{
'<option value="trip">'+_('Tripcode')+'</option>' +
display: none;
'<option value="sub">'+_('Subject')+'</option>' +
    color: #e8e8e3;
'<option value="com">'+_('Comment')+'</option>' +
font-size: 13px;
'</select>' +
  margin-left: auto;
'<input type="text">' +
  margin-right: auto;
'<input type="checkbox">' +
max-width:385px;
'regex ' +
}
'<button id="set-filter">'+_('Add')+'</button>' +
div.title
'<button id="clear">'+_('Clear all filters')+'</button>' +
{
'<div id="confirm" class="hidden">' +
display: none;
_('This will clear all filtering rules including hidden posts.')+' <a id="confirm-y" href="#">'+_('yes')+'</a> | <a id="confirm-n" href="#">'+_('no')+'</a>' +
color: #e8e8e3;
'</div>' +
font-family: Arial, Helvetica, sans-serif;
'</div>' +
'<div id="filter-container"><table id="filter-list"></table></div>'
);
drawFilterList();
 
// control buttons
$('#filter-control').on('click', '#set-filter', function () {
var type = $('#filter-control select option:selected').val();
var value = $('#filter-control input[type=text]').val();
var useRegex = $('#filter-control input[type=checkbox]').prop('checked');
 
//clear the input form
$('#filter-control input[type=text]').val('');


}
addFilter(type, value, useRegex);
div.title p
drawFilterList();
{
});
font-size: 8px;
$('#filter-control').on('click', '#clear', function () {
color: #e8e8e3;
$('#filter-control #clear').addClass('hidden');
}
$('#filter-control #confirm').removeClass('hidden');
a:link, a:visited, p.intro a.email span.name
});
{
$('#filter-control').on('click', '#confirm-y', function (e) {
color: #e8e8e3;
e.preventDefault();
text-transform: uppercase;
 
font-size: 10px;
$('#filter-control #clear').removeClass('hidden');
text-decoration: none;
$('#filter-control #confirm').addClass('hidden');
font-family: sans-serif;
setList({
}
generalFilter: [],
a:link, a:visited, p.intro a.email span.name
postFilter: {},
{
nextPurge: {},
        -moz-transition: 0.15s text-shadow, 0.15s color;
lastPurge: timestamp()
-webkit-transition: 0.15s text-shadow, 0.15s color;
});
-khtml-transition: 0.15s text-shadow, 0.15s color;
drawFilterList();
-o-transition: 0.15s text-shadow, 0.15s color;
});
-ms-transition: 0.15s text-shadow, 0.15s color;
$('#filter-control').on('click', '#confirm-n', function (e) {
transition: 0.15s text-shadow, 0.15s color;
e.preventDefault();
}
 
input[type="text"], textarea
$('#filter-control #clear').removeClass('hidden');
{
$('#filter-control #confirm').addClass('hidden');
-moz-transition: 0.15s border-color;
});
-webkit-transition: 0.15s border-color;
 
-khtml-transition: 0.15s border-color;
 
-o-transition: 0.15s border-color;
// remove button
-ms-transition: 0.15s border-color;
$('#filter-list').on('click', '.del-btn', function (e) {
transition: 0.15s border-color;
e.preventDefault();
}
 
input[type="submit"]
var $ele = $(e.target);
{
var type = $ele.data('type');
-moz-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
var val = $ele.data('val');
-webkit-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
var useRegex = $ele.data('useRegex');
-khtml-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
 
-o-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
removeFilter(type, val, useRegex);
-ms-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
});
transition: 0.15s border-color, 0.15s background-color, 0.15s color;
}
}
}
a:link:hover, a:visited:hover
{
color: #e8d928;
font-family: sans-serif;
text-decoration: none;
text-shadow: 0px 0px 5px #d2e7e8;
}
a.post_no
{
color: #e8d928;
text-decoration: none;
}
p.intro a.post_no:hover
{
        color: #e8d928!important;
}
div.post.reply
{
background: #0d1010;
align: center;
max-width:100% !important;
min-width: 100%!important;
border: solid  1px #e8e8e3;
box-shadow: 2px 2px #e8e8e3;


/*
*  clear out pruned threads
*/
function purge() {
var list = getList();
var board, thread, boardId, threadId;
var deferred;
var requestArray = [];


}
var successHandler = function (boardId, threadId) {
 
return function () {
div.postcontainer
// thread still alive, keep it in the list and increase the time between checks.
{
var list = getList();
max-width:100% !important;
var thread = list.nextPurge[boardId][threadId];
min-width: 100%!important;


}
thread.timestamp = timestamp();
div.post.reply.highlighted
thread.interval = Math.floor(thread.interval * 1.5);
{
setList(list);
background: #1e2324;
};
border: solid 1px #93e0e3;
};
        box-shadow: 3px 5px #5c8c8e;
var errorHandler = function (boardId, threadId) {
  margin-left: auto;
return function (xhr) {
  margin-right: auto;
if (xhr.status == 404) {
}
var list = getList();
div.post.reply div.body a:link, div.post.reply div.body a:visited
{
color: #CCCCCC;


}
delete list.nextPurge[boardId][threadId];
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover
delete list.postFilter[boardId][threadId];
{
if ($.isEmptyObject(list.nextPurge[boardId])) delete list.nextPurge[boardId];
color: #e8d928;
if ($.isEmptyObject(list.postFilter[boardId])) delete list.postFilter[boardId];
setList(list);
}
};
};


}
if ((timestamp() - list.lastPurge) < 86400)  // less than 1 day
p.intro span.subject
return;
{
font-size: 12px;
for (boardId in list.nextPurge) {
font-family: sans-serif;
board = list.nextPurge[boardId];
color: #e8d928;
for (threadId in board) {
font-weight: 800;
thread = board[threadId];
if (timestamp() > (thread.timestamp + thread.interval)) {
// check if thread is pruned
deferred = $.ajax({
cache: false,
url: '/'+ boardId +'/res/'+ threadId +'.json',
success: successHandler(boardId, threadId),
error: errorHandler(boardId, threadId)
});
requestArray.push(deferred);
}
}
}


}
// when all requests complete
p.intro span.name
$.when.apply($, requestArray).always(function () {
{
var list = getList();
color: #c3e849;
list.lastPurge = timestamp();
font-weight: 800;
setList(list);
}
});
p.intro a.capcode, p.intro a.nametag
}
{
color: magenta;
margin-left: 0;
}
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name
{
color: #d2e7e8;


}
function init() {
input[type="text"], textarea, select
if (typeof localStorage.postFilter === 'undefined') {
{
localStorage.postFilter = JSON.stringify({
background: #0d1010!important;
generalFilter: [],
color: #CCCCCC!important;
postFilter: {},
border: solid  1px #e8e8e3;
nextPurge: {},
box-shadow: 1px 1px #0d1010;
lastPurge: timestamp()
  margin-left: auto;
});
  margin-right: auto;
}


var pageData = {
boardId: board_name,  // get the id from the global variable
localList: [],  // all the blacklisted post IDs or UIDs that apply to the current page
noReplyList: [],  // any posts that replies to the contents of this list shall be hidden
hasUID: (document.getElementsByClassName('poster_id').length > 0),
forcedAnon: ($('th:contains(Name)').length === 0)  // tests by looking for the Name label on the reply form
};
initStyle();
initOptionsPanel();
initPostMenu(pageData);
filterPage(pageData);


}
// on new posts
input[type="password"]
$(document).on('new_post', function (e, post) {
{
var threadId;
background: #0d1010!important;
color: #CCCCCC!important;
border: #d2e7e8 1px double!important;
}
form table tr th
{
background: #0d1010!important;
color: #e8e8e3!important;
border: solid  1px #d2e7e8;
box-shadow: 1px 1px #0d1010;
text-align: right;
 
}
div.banner
{


background: #E04000;
if ($(post).hasClass('reply')) {
border: 0px solid hsl(17, 100%, 60%);
threadId = $(post).parents('.thread').attr('id').replace('thread_', '');
color: #EEE;
} else {
text-align: center;
threadId = $(post).attr('id').replace('thread_', '');
height: 15px;
post = $(post).children('.op')[0];
padding: 1px 1px 4px 1px;
}
margin-left: auto;
 
margin-right: auto;
filter(post, threadId, pageData);
}
quickToggle(post, threadId, pageData);
div.banner a
});
{
 
    color:#000;
$(document).on('filter_page', function () {
}
filterPage(pageData);
input[type="submit"]
});
{
 
background: #333333;
// shift+click on catalog to hide thread
border: #666 1px solid;
if (active_page == 'catalog') {
color: #CCCCCC;
$(document).on('click', '.mix', function(e) {
}
if (e.shiftKey) {
input[type="submit"]:hover
var threadId = $(this).data('id').toString();
{
var postId = threadId;
background: #555;
blacklist.add.post(pageData.boardId, threadId, postId, false);
border: #888 1px solid;
}
color: #e8d928;
});
}
}
input[type="text"]:focus, textarea:focus
 
{
// clear out the old threads
    border:#888 1px solid!important;
purge();
}
}
p.fileinfo a:hover
init();
{
});
text-decoration: underline;
}
if (typeof window.Menu !== "undefined") {
span.trip
$(document).trigger('menu_ready');
{
}
color: #AAA;
}
}
.bar
{
background: #0c0c0c!important;
-moz-box-shadow: 0 0 0px #000;
-webkit-box-shadow: 0 0 0px #000;


</pre>
|}


==== Mass reply ====
<big><i>This is now included in  [[#Sharty fixes|Sharty Fixes]]</i></big>


Reply to everyone in a thread.


}
<i>Expand to view the script</i>
.bar.top
{| class="mw-collapsible mw-collapsed"
{
|+
border: solid  1px #e8e8e3;
|
box-shadow: 0px 1px #d2e7e8;


}
<pre>
.bar.bottom
// ==UserScript==
{
// @name        Mass Reply for soyjak.party
border-top: 0px solid #666;
// @namespace    datamining
border: solid  1px #e8e8e3;
// @version      0.1
 
// @description  Mass reply
 
// @author      Chud (You)
}
// @match        https://soyjak.party/*
div.pages
// @icon        https://soyjak.party/static/favicon.png
{
// @grant        none
color: #d2e7e8 ;
// ==/UserScript==
background: #333;
(function () {
border: #666 0px solid;
  function insert_after(new_node, ref_node) {
font-family: sans-serif;
    ref_node.parentNode.insertBefore(new_node, ref_node.nextSibling);
font-size: 10pt;
  }
}
  function mass_reply() {
div.pages a.selected
    let form_textarea = document.getElementById('body');
{
color: #d2e7e8 ;
    let post_no_nodes = document.getElementsByClassName("post_no");
}
    for(const node of post_no_nodes) {
hr
      let post_no_text = node.textContent;
{
      if(!post_no_text.includes("No")) {
height: 0px;
        form_textarea.value += `>>${post_no_text}\n`;
border: #e8e8e3 2px solid;
      }
 
    }
}
    form_textarea.focus();
div.boardlist
  }
{
 
color: #e8e8e3;
  function add_button() {
}
    let ref_node = document.querySelectorAll(".op .intro .post_no")[1];
    let button = document.createElement("input");
    button.type = "button";
    button.value = "Mass Reply";
    button.style.marginLeft = "5px";
    button.addEventListener("click", function() {
      mass_reply();
    }, false);
   
    insert_after(button, ref_node);
  }
 
  add_button();
})();</pre>
|}
 
==== Wojakificator ====
Wojakificator is a JS script made by a [[bunkerchan]] user that automatically quotes any post you want an attaches a soyjak image
 
The script might work  using User JS option, but it is recommended to use a userscript manager like [https://violentmonkey.github.io/ Violentmonkey] instead


div.ban
[https://github.com/Wojakposter/Wojakificator Source code]
{
 
background-color: #0d1010;
{{Redtext|Warning: includes some lefty and NAS images}}
border: 0px solid #555;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
text-align: left!important;
font-size: 13px;


}
<i>Expand to view the script</i>
div.ban h2
{| class="mw-collapsible mw-collapsed"
{
|+
background: #333;
|[https://soyjak.download/f.php?h=3KGYIYNd Download link]
color: #e8e8e3;
|}
padding: 3px 7px;
 
font-size: 12pt;
==== Anti 4channeler posts ====
border-bottom: 1px solid #555;
Hides posts made by 4channelers.
}
 
div.ban h2:not(:nth-child(1))
{{Redtext|Warning: Updates the page every 4 seconds to check for new posts, can be adjusted.}}
{
border-top: 0px solid #555;
}
table.modlog tr th
{
background: #333;
color: #AAA;
}


div.report
<i>Expand to view the script</i>
{
{| class="mw-collapsible mw-collapsed"
color: #666;
|+
}
|
.pages, .board_image, input, .reply, form table th, textarea, a img, select, .banner
{
        -webkit-border-radius: 2px;
        -khtml-border-radius: 2px;
        -moz-border-radius: 2px;
-o-border-radius: 2px;
-ms-border-radius: 2px;
        border-radius: 2px;
}
.blur
{
    filter: blur(20px);
    -webkit-filter: blur(23px);
    -moz-filter: blur(23px);
    -o-filter: blur(23px);
    -ms-filter: blur(23px);
    filter: url(svg/blur.svg#blur);
}


/* options.js */
<pre>
#options_div
// ==UserScript==
{
// @name        Anti 4channeler posts on soyjak.party
      background: #333333;
// @namespace    datamining
}
// @version      0.1
.options_tab_icon
// @description  Hides 4channeler posts
{
// @author      Chud (You)
      color: #AAAAAA;
// @match        https://soyjak.party/*
}
// @icon        https://soyjak.party/static/favicon.png
.options_tab_icon.active
// @grant        none
{
// ==/UserScript==
      color: #FFFFFF;
let posts = document.querySelectorAll('.body');
let replies = document.querySelectorAll(".replies");
keys= [
  "newfag",
  "fag",
  "gem",
  "faggot",
  "new fag",
  "newfren",
  "newfrien",
  "chud",
  "frogposter",
  "nas",
  "kys",
  "killyourself",
  "go back",
  "goback",
  "reddit",
  "kill yourself",
  "hang",
  "coal",
  "reddit frog",
    "frog",
    "what does the reddit",
    "frog has to do with",
    "redditfrog",
    "frogtranny",
"nigger",
    "tranny"
]
function containsNonLatinCodepoints(s) {
    return /[^\u0000-\u00ff]/.test(s);
}
function start_filtering()
{
posts = document.querySelectorAll('.body');
replies = document.querySelectorAll(".replies");
for(let i =0 ; i<posts.length;i++)
{
for(let j=0;j<keys.length;j++)
{
  if(posts[i].innerHTML.toLowerCase().includes(keys[j].toLowerCase()) || containsNonLatinCodepoints(posts[i].innerHTML.toLowerCase()) == true )
{
posts[i].innerHTML= "<span style='color:green;font-weight:bold;font-size:14px;'>[HIDDEN 4channeler post]</span>";
}
}
}
}


 
for(let i =0 ; i<replies.length;i++)
 
{
.blotter
for(let j=0;j<keys.length;j++)
{
  if(replies[i].innerHTML.toLowerCase().includes(keys[j].toLowerCase()))
{
{
color: #e8e8e3!important;
replies[i].innerHTML= "<span style='color:green;font-weight:bold;font-size:14px;'>[HIDDEN 4channeler post]</span>";
}
}
}
 
}
}
s` : ""}


start_filtering();
setInterval(start_filtering,2000);
//Interval




//Gifs hider
document.querySelectorAll("img").forEach(i=>{if(i.src.includes(".gif")){i.src="";}});</pre>
|}


${themeEnabled("leftypol") ? `
==== Preview for Youtube Videos ====
body {
Show preview for youtube video links.
background: #1E1E1E;
 
color: #999999;
<i>Expand to view the script</i>
font-family: Verdana, sans-serif;
{| class="mw-collapsible mw-collapsed"
font-size: 14px;
|+
}
|<pre>
.quote {
// ==UserScript==
     color:#B8D962;
// @name        YouTube preview for soyjak.party
  }
// @namespace    datamining
@font-face {
// @version     0.1
  font-family: 'lain';
// @description Previews YouTube videos
  src: url('./fonts/nrdyyh.woff') format('woff'),
// @author      Chud (You)
        url('./fonts/tojcxo.TTF') format('truetype');
// @match        https://soyjak.party/*
}
// @icon        https://soyjak.party/static/favicon.png
h1
// @grant        none
{
// ==/UserScript==
letter-spacing: -2px;
(function youtubeInlinePreviews() {
font-size: 20pt;
 
text-align: center;
const re = /(?:youtube\.com\/watch\?v=|youtu\.be\/)(.{11})/;
color: #32DD72;
 
}
const previewTemplate = (videoId) => `<img
div.title, h1 {
 
color: #32DD72;
style="max-width:255px;max-height:255px"
}
 
div.title p {
src="<nowiki>https://i.ytimg.com/vi/${videoId}/hqdefault.jpg</nowiki>"
font-size: 10px;
 
}
/>`;
a:link, a:visited, .intro a.email span.name {
 
color: #CCCCCC;
Array.from(document.querySelectorAll(".body a"))
text-decoration: none;
 
font-family: sans-serif;
.filter((link) => link.href.match(re))
}
 
a:link:hover, a:visited:hover {
.forEach((link) => {
color: #fff;
 
font-family: sans-serif;
const videoId = link.href.match(re)[1];
text-decoration: none;
 
}
const inlinePreview = previewTemplate(videoId);
a.post_no {
 
color: #AAAAAA;
link.innerHTML = inlinePreview;
text-decoration: none;
 
}
});
a.post_no:hover {
 
color: #32DD72 !important;
})();</pre>
text-decoration: underline overline;
|}
}
 
div.post.reply {
==== Filter tripchuds ====
  background: #333333;
To use it, change "!!TRIP GOES HERE" to any trip you want to filter (ex: !incelchud1 or !!incelchud1), can also be used to filter names if you change <blockquote> (/class="trip">!!TRIP GOES HERE</) </blockquote> to <blockquote> (/class="name">name of the chudcel you want to filter</) </blockquote>
border: #555555 1px solid;
if you want to filter multiple tripchuds, you have to do this <blockquote> (/class="trip">!!FIRST TRIP CHUD|!SECOND TRIPCHUD|!THIRD TRIPCHUD</) </blockquote>
}
 
div.post.reply.highlighted {
<i>Expand to view the script</i>
background: #555;
{| class="mw-collapsible mw-collapsed"
border: transparent 1px solid;
|+
}
|<pre>
div.post.reply div.body a:link, div.post.reply div.body a:visited {
// ==UserScript==
color: #CCCCCC;
// @name        Tripfag filter for soyjak.party
}
// @namespace    datamining
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover {
// @version      0.1
color: #32DD72;
// @description Filters tripfags
}
// @author      Chud (You)
.intro span.subject {
// @match        https://soyjak.party/*
font-size: 12px;
// @icon        https://soyjak.party/static/favicon.png
font-family: sans-serif;
// @grant        none
color: #446655;
// ==/UserScript==
font-weight: 800;
$(".post")
}
  .filter(function (index) {
.intro span.name {
    return this.innerHTML.match(/class="trip">!!TRIP GOES HERE</);
color: #32DD72;
  })
font-weight: 800;
  .each(function (index) {
}
    let whatToHide = "#" + this.id;
.intro a.capcode, p.intro a.nametag {
    if (this.id.startsWith("op_")) {
color: magenta;
      whatToHide = "#" + this.id.replace("op_", "thread_");
margin-left: 0;
    }
}
    $(whatToHide).hide();
.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name {
  });
  color: #32ddaf;
 
}
if (!localStorage.favorites) {
input[type="text"], textarea, select {
localStorage.favorites = '[]';
background: #333333;
}</pre>
color: #CCCCCC;
|}
border: #666666 1px solid;
 
padding-left: 5px;
==== Hide tripchud posts from catalog ====
padding-right: -5px;
Hides all tripchud posts from catalog, no exceptions.
font-family: sans-serif;
 
font-size: 10pt;
<i>Expand to view the script</i>
}
{| class="mw-collapsible mw-collapsed"
input[type="password"] {
|+
background: #333333;
|<pre>// ==UserScript==
color: #CCCCCC;
// @name         Tripfag catalog filter for soyjak.party
border: #666666 1px solid;
// @namespace    datamining
}
// @version      0.1
form table tr th {
// @description Filters tripfags
background: #333333;
// @author      Chud (You)
color: #AAAAAA;
// @match        https://soyjak.party/*
font-weight: 800;
// @icon        https://soyjak.party/static/favicon.png
text-align: left;
// @grant        none
padding: 0;
// ==/UserScript==
}
// --- start: purgeTripsFromCatalog ---
div.banner {
 
background: #32DD72;
(function purgeTripsFromCatalog() {
color: #000;
  // If on a catalog page
text-align: center;
  if (document.location.href.match(/catalog\.html$/)) {
width: 250px;
    // Call the API for that page
padding: 4px;
    fetch(document.location.href.replace(".html", ".json"))
padding-left: 12px;
      .then((res) => res.json())
padding-right: 12px;
      .then((json) =>
margin-left: auto;
        json
margin-right: auto;
          // Find the threads where OP is using a tripcode
font-size: 12px;
          .reduce((acc, cur) => [...acc, ...cur.threads], [])
}
          .filter((op) => op.trip)
div.banner a {
          // Hide them
    color:#000;
          .forEach((filtered) => $(`div[data-id='${filtered.no}']`).hide())
}
      );
input[type="submit"] {
  }
background: #333333;
})();
border: #888888 1px solid;
 
color: #CCCCCC;
// --- end: purgeTripsFromCatalog ---</pre>
  }
|}
input[type="submit"]:hover {
 
background: #555555;
=== Disable gif autoplay ===
border: #888888 1px solid;
 
color: #32DD72;
<i>Expand to view the script</i>
}
{| class="mw-collapsible mw-collapsed"
input[type="text"]:focus {
|+
    border:#aaa 1px solid;
|<pre>// ==UserScript==
}
// @name    disable gif autoplay
p.fileinfo a:hover {
// @version 1
text-decoration: underline;
// @grant    none
}
// @match https://soyjak.party/*
span.trip {
// ==/UserScript==
color: #AAAAAA;
 
}
window.addEventListener('load', function () {
div.pages {
[].slice.apply(document.images).filter(is_gif_image).map(freeze_gif);
background: #1E1E1E;
 
font-family: sans-serif;
function is_gif_image(i) {
}
    return /^(?!data:).*\.gif/i.test(i.src);
.bar.bottom {
}
    bottom: 0px;
 
    border-top: 1px solid #333333;
function freeze_gif(i) {
    background-color: #1E1E1E;
    var c = document.createElement('canvas');
}
    var w = c.width = i.width;
div.pages a.selected {
    var h = c.height = i.height;
color: #CCCCCC;
    c.getContext('2d').drawImage(i, 0, 0, w, h);
}
    try {
hr {
        i.src = c.toDataURL("image/gif");
height: 1px;
    } catch(e) {
border: #333333 1px solid;
        for (var j = 0, a; a = i.attributes[j]; j++)
}
            c.setAttribute(a.name, a.value);
div.boardlist {
        i.parentNode.replaceChild(c, i);
text-align: center;
    }
color: #999999;
}
}
})</pre>
div.ban {
|}
background-color: transparent;
=== Strip jump.kolyma.net Links ===
border: transparent 0px solid;
<b>NOTE</b>: KolymaNET's jump script automatically blocks harmful websites, such as IP grabbers. Use this script at your own risk.
}
 
div.ban h2 {
>umm it doesn't work i can still see the link when i hover over it even doe it strips it on click so it does work actually
background: transparent;
color: lime;
font-size: 12px;
}
table.modlog tr th {
background: #333333;
color: #AAAAAA;
}
div.boardlist:not(.bottom) {
  background-color: #1E1E1E;


}
<i>Expand to view the script.</i>
  .desktop-style div.boardlist:not(.bottom) {
{| class="mw-collapsible mw-collapsed"
   position:static;
|+
  text-shadow: black 1px 1px 1px, black -1px -1px 1px, black -1px 1px 1px, black 1px -1px 1px;
|<pre>
   color: #999999;
// ==UserScript==
  background-color: #1E1E1E;
// @name        Kolyma jump stripper
}
// @namespace    datamining
div.report {
// @version      1.0
color: #666666;
// @description Strips Kolyma jump links from soyjak.party
}
// @author      Chud (You)
#options_div, #alert_div {
// @match        https://soyjak.party/*
background: #333333;
// @icon        https://soyjak.party/static/favicon.png
}
// @grant        none
.options_tab_icon {
// ==/UserScript==
color: #AAAAAA;
function strip(e) {
}
   if (!!e.target.href) {
.options_tab_icon.active {
    e.target.href = decodeURIComponent(e.target.href.replace("https://jump.kolyma.net/?", ""));
color: #FFFFFF;
   }
}
}
#quick-reply table {
 
background: none repeat scroll 0% 0% #333 !important;
document.addEventListener("click", e => strip(e));
}
document.addEventListener("auxclick", e => strip(e));</pre>
.modlog tr:nth-child(even), .modlog th {
|}
background-color: #282A2E;
 
}
=== Ratio script ===
.box {
adds a [ratio] button that starts posting automated replies from a selection of 4 types: "generic","[[Cobson|cob]]","[[Trannies|trans]]" and "[[chud]]". perfect for shitposting
background: #333333;
 
border-color: #555555;
(feel free to add more quotes to the code, the "chud" one is very incomplete)
color: #C5C8C6;
{| class="mw-collapsible mw-collapsed"
border-radius: 10px;
|+
}
|
.box-title {
 
background: transparent;
<pre>
color: #32DD72;
// ==UserScript==
}
// @name        Sharty Ratio
table thead th {
// @namespace   soyjak.party
background: #333333;
// @match       http*://soyjak.party/*
border-color: #555555;
// @version     1.0
color: #C5C8C6;
// @author      God Tier Wojack
border-radius: 4px;
// @description Ratio that nigga
}
// ==/UserScript==
table tbody tr:nth-of-type( even ) {
const modifiers = ["==", "%%", "--", "'", ""];
background-color: #333333;
let done = new Array(20);
}
let stringSets = {
table.board-list-table .board-uri .board-sfw {
  "Generic": ["holy shit", "holy shiiiit", "holy fuck", "holy fuck.", "fuckin hell", "holy fuckk", "holy fuckkk", "holy fuckkkk", "lfg", "lfggg", "lfgggg", "lfg!", "lfg!!", "lfgg!!!", "w", "dub", "massive w", "huge w", "gigantic w", "massive dub", "huge dub", "another dub", "another w", "gigantic w", "get his ass", "get that nigga", "lets fucking go", "lets fucking gooo", "lets fucking goooo", "lets fucking goooo", "lets fucking go!", "lets fucking go!!", "lets fucking go!!!", "lets fucking go!!!!!", "yo get his ass", "yo get em", "yooo", "yoooo", "yooooooo", "yoooooooooooo", "god damn", "got damn", "god damnnn", "damnnnnn", "own that fraud", "expose that fraud", "lets gooo", "lets gooooo", "let's goooooo", "keyed", "keyed af", "holy keyed", "gem", "massive gem", "gemerald", "wem", "huge gem", "gigantic gem", "sharty saving gem", "diamond", "sharty saving diamond", "up", "go up", "go the fuck up", "up up up", "go tf up", "'chup", "own that fraud", "get they ass", "beat his ass", "kill that nigga", "can't stop winning", "we cant stop winning bros", "diamonderald", "btfo", "eternally btfo", "zamn", "zamnnn", "holy based", "based af"],
color: #CCCCCC;
  "Cob": ["another cob w", "#cobgang", "another gemson victory", "gemson win", "gemson victory", "gemson up", "god tier wojack", "gem tier godjack", "cobby up", "cobby go up", "godson up", "upson", "keyedson", "winson", "cob w", "cob dub", "cobby win", "#cobgang win", "#cobgang victory", "hwabag", "god tier winjack", "diamondson go up", "winson up", "gemson go up", "godson go up", "gemson dub", "gemson w", "godson dub", "godson w", "#cobgang dub", "#cobgang w", "cobwin", "he won", "he fucking won", "he cant stop winning"],
}
  "Trans": ["trans rights", "trans fucking rights", "trans rights won", "sisters...", "trans rights w", "trans rights dub", "trans folx won", "w trans rights", "trans rights go up", "transphobes btfo", "transphobes destroyed", "trans rights victory", "w for trans rights", "trans victory", "transerald", "trans diamond", "bump up the trans", "uptrans", "sisters go up", "upsis", "trans top", "estrogem", "estrogemerald", "bumpstrogen", "topstrogen", "winstrogen"],
tbody.board-list-omitted td {
   "chud":["1488","fuck niggers","kill all blacks","kanye 2024","dial eight","-ACK!","sieg heil!","jews","media is kiked","goyslop","hang yourself troon","the west has fallen","back to /leftypol/","amerimutt","women are made for rape"]
background: #333333;
}
border-color: #555555;
let targetPosts = [];
}
let sets = [stringSets["Generic"]];
table.board-list-table .board-tags .board-cell:hover {
setInterval(() => {
background: #1e1e1e;
  document.querySelectorAll(".button.alert_button").forEach(e => e.click());
}
  if (targetPosts.length == 0 || sets.length == 0) {
table.board-list-table tr:nth-of-type( even ) .board-tags .board-cell {
    return;
background: #333333;
  }
}
  let post = "";
/* red accents */
  targetPosts.forEach(p => post += `>>${p}\n`);
div.blotter, h1, h2, header div.subtitle, div.title, a:link:hover, a:visited:hover p.intro a.post_no:hover,
  let effect = "";
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover, p.intro span.name,
  if (Math.random() > 0.5) {
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name,
    effect = modifiers[Math.floor(Math.random() * modifiers.length)];
input[type="submit"]:hover, div.ban h2 {
  }
color: #DD3232;
  post += effect;
}
  let strings = sets.flat();
 
  stringsLength = strings.length;
p.intro span.subject {
  let found = false;
color: #962C22;
  while (!found) {
}` : ""}
    text = strings[(Math.floor(Math.random() * stringsLength))];
 
    if (!done.includes(text)) {
 
      if (Math.random() > 0.5) {
${themeEnabled("colorjak") ? `
        text = text.toUpperCase();
 
      }
*{
      post += text;
    background-image: url('https://soyjak.download/f.php?h=0ubQjIwX&p=1');
      found = true;
      done.unshift(text);
      done.pop();
    }
  }
  post += effect;
  document.querySelector("form[name=post] textarea#body").value = post;
  document.querySelector("form[name=post] input[value*='Reply']").click();
}, 12000);
function addRatioButton(post) {
  post.querySelector(".intro").insertAdjacentHTML("beforeend", `<a href="javascript:void(0);" class="ratio" postNumber="${post.getElementsByClassName("post_no")[1].textContent}">[Ratio]</a>`);
}
}
 
let options = Options.add_tab("ratio", "gear", "Ratio").content[0];
.soifish {
let optionsHTML = "";
    background-image: ('https//files.catbox.moe/rxmvyr.png');
for ([key, value] of Object.entries(stringSets)) {
    position: absolute;
  optionsHTML += `<input type="checkbox" id="ratio-${key}" name="${key}"><label for="ratio-${key}">${key}</label><br>`;
    -webkit-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
    -moz-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
    -o-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
    animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
}
}
 
options.insertAdjacentHTML("beforeend", optionsHTML);
@-webkit-keyframes moveX {
options.querySelectorAll("input[type=checkbox]").forEach(e => {
    from { left: 0; } to { left: 100%; }
  e.addEventListener("change", e => {
}
    sets = [];
@-moz-keyframes moveX {
    options.querySelectorAll("input[type=checkbox]:checked").forEach(c => sets.push(stringSets[c.getAttribute("name")]));
    from { left: 0; } to { left: 100%; }
  });
}
  e.checked = e.getAttribute("name") == "Generic";
@-o-keyframes moveX {
});
    from { left: 0; } to { left: 100%; }
const updateObserver = new MutationObserver(list => {
}
  list.forEach(node => {
@keyframes moveX {
    if (node.addedNodes[0].nodeName == "DIV") {
    from { left: 0; } to { left: 100%;}
      addRatioButton(node.addedNodes[0]);
}
    }
 
  });
@-webkit-keyframes moveY {
});
    from { top: 0; } to { top: 100%; }
updateObserver.observe(document.querySelector(".thread"), {
}
  childList: true
@-moz-keyframes moveY {
});
    from { top: 0; } to { top: 100%; }
[...document.getElementsByClassName("post")].forEach(e => {
}
  addRatioButton(e);
@-o-keyframes moveY {
});
    from { top: 0; } to { top: 100%; }
document.addEventListener("click", e => {
}
  let t = e.target;
@keyframes moveY {
  if (t.classList.contains("ratio")) {
    from { top: 0; } to { top: 100%; }
    if (t.textContent == "[Ratio]") {
}
      t.textContent = "[Unratio]";
 
      targetPosts.push(t.getAttribute("postNumber"));
` : ""}
    } else {
 
      targetPosts = targetPosts.filter(p => p != t.getAttribute("postNumber"));
 
      t.textContent = "[Ratio]";
${themeEnabled("cafe") ? `
    }
body{background:#fdfdfe;color:#666;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;margin:0 8px;padding-left:5px;padding-right:5px}table *{margin:0}a,a:visited{text-decoration:none;color:#2b0f51!important}a.post_no{text-decoration:none;margin:0;padding:0}p.intro a.post_no{color:inherit}p.intro a.post_no,p.intro a.email{margin:0}p.intro a.email span.name{color:#34345c}p.intro a.email:hover span.name{color:red}p.intro label{display:inline}p.intro time,p.intro a.ip-link,p.intro a.capcode{direction:ltr;unicode-bidi:embed}h2{color:#af0a0f;font-size:11pt;margin:0;padding:0}header{margin:1em 0}h1{font-family:tahoma;letter-spacing:-2px;font-size:20pt;margin:0}header div.subtitle,h1{color:#af0a0f;text-align:center}header div.subtitle{font-size:8pt}form{margin-bottom:2em!important}form table{margin:auto}form table input{height:auto}input[type=text],input[type=password],textarea{border:1px solid #a9a9a9;text-indent:0;text-shadow:none;text-transform:none;word-spacing:normal}form table tr td{text-align:left;margin:0;padding:0}form table.mod tr td{padding:2px}form table tr th{text-align:left;padding:4px}form table tr th{background:#98e}form table tr td div{text-align:center;float:left;padding-left:3px}form table tr td div input{display:block;margin:2px auto 0}form table tr td div label{font-size:10px}.unimportant,.unimportant *{font-size:10px}p.fileinfo{display:block;margin:0;padding-right:7em}div.banner{background-color:#ffb0aa;text-align:center;font-size:12pt;font-weight:700;text-align:center;margin:1em 0;padding-bottom:2px}div.banner,div.banner a{color:#fff}div.banner a:hover{color:#eef2ff;text-decoration:none}img.banner{display:block;width:300px;height:100px;border:1px solid #a9a9a9;margin:20px auto 0}img.post-image{display:block;float:left;margin:10px 20px;border:none}div.post img.post-image{padding:5px;margin:5px 20px 0 0}div.post img.icon{display:inline;margin:0 5px;padding:0}div.post i.fa{margin:0 4px;font-size:16px}div.post.op{margin-right:20px;margin-bottom:5px}div.post.op hr{border-color:#d9bfb7}p.intro{margin:.5em 0;padding:0;padding-bottom:.2em}input.delete{float:left;margin:1px 6px 0 0}p.intro span.subject{color:#0f0c5d;font-weight:700}p.intro span.name{color:#117743;font-weight:700}p.intro span.capcode,p.intro a.capcode,p.intro a.nametag{color:#f00000;margin-left:0}p.intro a{margin-left:8px}div.delete{float:right}div.post.reply p{margin:.3em 0 0}div.post.reply div.body{margin-left:1.8em;margin-top:.8em;padding-right:3em;padding-bottom:.3em}div.post.reply.highlighted{background:#d6bad0}div.post.reply div.body a{color:#d00}div.post{max-width:97%}div.post div.body{word-wrap:break-word;white-space:pre-wrap}div.post.reply{background:#d6daf0;margin:.2em 16px;padding:.2em .3em .5em .7em;border-width:1px;border-style:none solid solid none;border-color:#b7c5d9;display:inline-block}span.trip{color:#228854}span.quote{color:#789922}span.omitted{display:block;margin-top:1em}br.clear{clear:left;display:block}span.controls{float:right;margin:0;padding:0;font-size:80%}span.controls.op{float:none;margin-left:10px}span.controls a{margin:0}div#wrap{width:900px;margin:0 auto}div.ban{background:#fff;border:1px solid #98e;max-width:700px;margin:30px auto}div.ban p,div.ban h2{padding:3px 7px}div.ban h2{background:#98e;color:#000;font-size:12pt}div.ban p{font-size:12px;margin-bottom:12px}div.ban p.reason{font-weight:700}span.heading{color:#af0a0f;font-size:11pt;font-weight:700}span.spoiler{background:#000;color:#000;padding:0 1px}div.post.reply div.body span.spoiler a{color:#000}span.spoiler:hover,div.post.reply div.body span.spoiler:hover a{color:#fff}div.styles{float:right;padding-bottom:20px}div.styles a{margin:0 10px}div.styles a.selected{text-decoration:none}table.test{width:100%}table.test td,table.test th{text-align:left;padding:5px}table.test tr.h th{background:#98e}table.test td img{margin:0}fieldset label{display:block}div.pages{color:#89a;background:#d6daf0;display:inline;padding:8px;border-right:1px solid #b7c5d9;border-bottom:1px solid #b7c5d9}div.pages.top{display:block;padding:5px 8px;margin-bottom:5px;position:fixed;top:0;right:0;opacity:.9}@media screen and (max-width:800px){div.pages.top{display:none!important}}div.pages a.selected{color:#000;font-weight:bolder}div.pages a{text-decoration:none}div.pages form{margin:0;padding:0;display:inline}div.pages form input{margin:0 5px;display:inline}hr{border:none;border-top:1px solid #b7c5d9;height:0;clear:left}div.boardlist{color:#89a;font-size:9pt;margin-top:3px}div.boardlist.bottom{margin-top:30px!important}div.boardlist a{text-decoration:none}div.report{color:#333}table.modlog{margin:auto;width:100%}table.modlog tr td{text-align:left;margin:0;padding:4px 15px 0 0}table.modlog tr th{text-align:left;padding:4px 15px 5px 5px;white-space:nowrap}table.modlog tr th{background:#98e}td.minimal,th.minimal{width:1%;white-space:nowrap}div.top_notice{text-align:center;margin:5px auto}span.public_ban{display:block;color:red;font-weight:700;margin-top:15px}span.toolong{display:block;margin-top:15px}div.blotter{color:red;font-weight:700;text-align:center}table.mod.config-editor{font-size:9pt;width:100%}table.mod.config-editor td{text-align:left;padding:5px;border-bottom:1px solid #98e}table.mod.config-editor input[type=text]{width:98%}p.intro.thread-hidden{margin:0;padding:0}form.ban-appeal{margin:9px 20px}form.ban-appeal textarea{display:block}.theme-catalog div.thread img{float:none!important;margin:auto;margin-bottom:12px;max-height:150px;max-width:200px;box-shadow:0 0 4px rgba(0,0,0,.55);border:2px solid transparent}.theme-catalog div.thread{display:inline-block;vertical-align:top;margin-bottom:25px;margin-left:20px;margin-right:15px;text-align:center;font-weight:400;width:205px;overflow:hidden;position:relative;font-size:11px;padding:15px;max-height:300px;background:rgba(182,182,182,.12);border:2px solid rgba(111,111,111,.34)}.theme-catalog div.thread strong{display:block}.compact-boardlist{padding:3px;padding-bottom:0}.compact-boardlist .cb-item{display:inline-block;vertical-align:middle}.compact-boardlist .cb-icon{padding-bottom:1px}.compact-boardlist .cb-fa{font-size:21px;padding:2px;padding-top:0}.compact-boardlist .cb-cat{padding:5px 6px 8px}.cb-menuitem{display:table-row}.cb-menuitem span{padding:5px;display:table-cell;text-align:left;border-top:1px solid rgba(0,0,0,.5)}.cb-menuitem span.cb-uri{text-align:right}.boardlist:not(.compact-boardlist) #watch-pinned::before{content:" [ "}.boardlist:not(.compact-boardlist) #watch-pinned::after{content:" ] "}.boardlist:not(.compact-boardlist) #watch-pinned{display:inline}.boardlist:not(.compact-boardlist) #watch-pinned a{margin-left:3pt}.boardlist:not(.compact-boardlist) #watch-pinned a:first-child{margin-left:0}.compact-boardlist #watch-pinned{display:inline-block;vertical-align:middle}video.post-image{display:block;float:left;margin:10px 20px;border:none}div.post video.post-image{padding:0;margin:10px 25px 5px 5px}span.settings{display:inline;float:right;margin-left:10px;margin-top:30px}.archive-link{font-weight:700;margin-left:5px;color:#1100c0!important}.blinker{color:#ff0404;font-family:comic sans ms;font-size:115%}.mentioned{word-wrap:break-word}.yt-dl-link{font-weight:700}.yt-dl-embed{float:left;clear:both;margin:5px 0 12px 5px}.video-container+.body{clear:left}.label-block{margin:10px 10px 0 5px}.label-img{display:inline-block;padding:5px;max-height:90px}.capcode-owner{color:#9370db!important;font-weight:700}#canvas-loading{display:none;background-image:url(https://i.imgur.com/c7z4Rx0.gif);width:20px;height:20px}#canvas-box{display:none}#literally-canvas{height:500px;width:600px}.canvas-button{cursor:pointer}#show-oekaki{cursor:pointer}.lol{cursor:pointer}#search-bar{width:25%;padding-top:10px;margin-bottom:25px;margin-left:5px}.forum-using{padding-left:3px;font-style:italic}.use-button{margin-left:2px}.reset-button{margin-left:5px}.avatar.forum{display:none}.signature.forum{display:none}.signature-text-forum{display:none}#chatango-prompt{margin-top:35px;margin-bottom:45px;margin-left:63px;width:160px;cursor:pointer;font-weight:700}.hide-chatango iframe[width='75px']{display:none!important}body{background-image:url(https://i.imgur.com/P31ggRr.png);color:#666;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;margin:0 8px;padding-left:5px;padding-right:5px}hr{border:none;border-top:1px solid #649e66;height:0;clear:left}div.pages.top{display:block;padding:5px 8px;margin-bottom:5px;position:fixed;top:3px;right:3px;opacity:.9;border-radius:5px}div.pages{color:#6d6d6d;background:#ffd0cd;display:inline;padding:8px;border-right:1px solid #da7c75;border-bottom:1px solid #c17b76;border-radius:5px}form table tr th{padding:3px 5px 4px 4px!important;font-size:97%!important;background:rgba(34,228,85,.16);border-radius:7px}div.post.reply{background:#d7ffd8;margin:.2em 16px;padding:.2em .3em .5em .7em!important;border-width:1px;border-style:none solid solid none;border-color:#6cce70;display:inline-block;border-radius:10px}div.post.reply.highlighted{background:#ffd2cf;border-color:#e69994}div.blotter{color:#af0a0f;font-weight:700;text-align:center}header div.subtitle,h1{color:##b1362d;text-align:center}p.intro span.subject{color:#fd4b4b;font-weight:700}#spoiler{padding-left:3px;margin-left:3px;margin-right:3px}#sage{padding-left:3px;margin-left:3px;margin-right:3px}.sage-tip{font-size:85%;color:#a8ada8}.post-arrow{font-size:12px!important;margin-left:0!important}a.arrow-post-options:hover{color:#4e366f!important}.date-link{color:#807e7e!important;font-size:11.5px;margin-right:6px!important}a.date-link:hover{color:#807e7e!important;text-decoration:underline}.thread-hide-button{margin-right:1px;font-size:95%}.fileinfo a{font-size:85%}.fileinfo.reply{margin-left:3px!important}.boardlist{text-align:center!important;font-size:9.3pt!important;margin-top:6px!important;margin-bottom:24px!important}.scroll-button{color:#1a4c0a!important}
  }
 
});
.desktop-style div.boardlist:nth-child(1) {
</pre>
background-color: rgba(255,0,0,0);
|}
}
 
 
` : ""}




</style>
`);
initFixes();
</pre>
|}


== CSS ==
== CSS ==

Revision as of 22:59, 18 January 2023

On soyjak.party users can add custom javascript under Options->User JS in the top right of the page to customize their browsing experience. On December 28, 2022, the option to set custom JS was removed. You can still use Tampermonkey or another extension that allows custom JS.

Merging Scripts

You can use any of these scripts at once by pasting them one after another in Options->User JS.

Code Snippets

Sharty Fixes Gemerald

The original Sharty Fixes was deleted for an unknown reason.

A small userscript that fixes the following bugs with the sharty:


  • Time inaccuracy Resolved
  • Google captcha not resetting Resolved
  • Quick reply Google captcha endless loading Resolved
  • Clicking post number sometimes refreshing the page
  • Multi-line automatic greentext
  • Reporting posts from the overboard
  • Automatically load and complete vichan text captcha (NOT KAPTCHA)
  • Reset text captcha when post fails
  • Submit post with Ctrl+Enter
  • Bypass wordfilter
  • Hide password
  • Hide threads from catalog (Shift+Click, triple tap on mobile)
  • Hide blotter
  • Search catalog
  • Image from URL (userscript manager only, User JS option breaks from CORS)
  • Remove kolyma jump datamining
  • (Optional) - Revert to classic UI
  • (Optional) - Quick quote, mass reply/quote
  • (Optional) - Anonymise name/trips
  • (Optional) - Truncate long posts
  • (Optional) - Hide images from saged posts


Install from Greasy Fork into a userscript manager.

Sharty Themes

Should be used with Sharty Fixes Gemerald Expand to view the script

// ==UserScript==
// @name        Sharty Themes
// @namespace   soyjak.partythemes
// @match       http*://soyjak.party/*
// @match       http*://www.soyjak.party/*
// @grant       GM_getValue
// @grant       GM_setValue
// @grant       GM_xmlhttpRequest
// @grant       GM_addStyle
// @connect     *
// @license MIT
// @version     1.0
// @author      Base framework by Zyl, Mainly created by Doughy
// @description The Gemmiest Enhancements for the 'ty
// ==/UserScript==

const version = "v1.0";
console.log(`Sharty Themes ${version}`);

const namespace = "ShartyThemes.";
function setValue(key, value) {
  if (key == "hiddenthreads" || key == "hiddenimages") {
    if (typeof GM_setValue == "function") {
      GM_setValue(key, value);
    }
    localStorage.setItem(key, value);
  } else {
    if (typeof GM_setValue == "function") {
      GM_setValue(namespace + key, value);
    } else {
      localStorage.setItem(namespace + key, value);
    }
  }
}

function getValue(key) {
  if (key == "hiddenthreads" || key == "hiddenimages") {
    if (typeof GM_getValue == "function" && GM_getValue(key)) {
      localStorage.setItem(key, GM_getValue(key).toString());
    }
    return localStorage.getItem(key);
  }
  if (typeof GM_getValue == "function") {
    return GM_getValue(namespace + key);
  } else {
    return localStorage.getItem(namespace + key);
  }
}

function themeEnabled(key) {
  let value = getValue(key);
  if (value == null) {
    value = optionsEntries[key][2];
    setValue(key, value);
  }
  return value.toString() == "true";
}

function getNumber(key) {
  let value = parseInt(getValue(key));
  if (Number.isNaN(value)) {
    value = 0;
  }
  return value;
}

function getJson(key) {
  let value = getValue(key);
  if (value == null) {
    value = "{}";
  }
  return JSON.parse(value);
}

function addToJson(key, jsonKey, value) {
  let json = getJson(key);
  let parent = json;
  jsonKey.split(".").forEach((e, index, array) => {
    if (index < array.length - 1) {
      if (!parent.hasOwnProperty(e)) {
        parent[e] = {};
      }
      parent = parent[e];
    } else {
      parent[e] = value;
    }
  });
  setValue(key, JSON.stringify(json));
  return json;
}

function removeFromJson(key, jsonKey) {
  let json = getJson(key);
  let parent = json;
  jsonKey.split(".").forEach((e, index, array) => {
    if (index < array.length - 1) {
      parent = parent[e];
    } else {
      delete parent[e];
    }
  });
  setValue(key, JSON.stringify(json));
  return json;
}

function customAlert(a) {
    document.body.insertAdjacentHTML("beforeend", `
<div id="alert_handler">
  <div id="alert_background" onclick="this.parentNode.remove()"></div>
  <div id="alert_div">
    <a id='alert_close' href="javascript:void(0)" onclick="this.parentNode.parentNode.remove()"><i class='fa fa-times'></i></a>
    <div id="alert_message">${a}</div>
    <button class="button alert_button" onclick="this.parentNode.parentNode.remove()">OK</button>
  </div>
</div>`);
}


const optionsEntries = {
 
  "underwater": ["checkbox", "Underwater Theme", false],
  "soot": ["checkbox", "Soot Theme", false],
  "beta": ["checkbox", "Beta Theme", false],
  "leftypol": ["checkbox", "Leftycoal Theme", false],
  "cafe": ["checkbox", "Crystal Theme", false],
  "gurochan": ["checkbox", "Gurochan Theme", false],
  "colorjak": ["checkbox", "Colorjak Theme", false],
}






let options = Options.add_tab("sharty-themes", "gear", "Sharty Themes").content[0];


let optionsHTML = `<span style="display: block; text-align: center">${version}</span>`;
optionsHTML += `<a style="display: block; text-align: center" href="https://greasyfork.org/en/scripts/456980-sharty-fixes-gemerald">Best used with Sharty Fixes Gemerald</a><br>`;
optionsHTML += `<span style="display: block; text-align: center"><h1></h1></span>`;
for ([optKey, optValue] of Object.entries(optionsEntries)) {
  optionsHTML += `<input type="${optValue[0]}" id="${optKey}" name="${optKey}"><label for="${optKey}">${optValue[1]}</label><br>`;
}
options.insertAdjacentHTML("beforeend", optionsHTML);

options.querySelectorAll("input[type=checkbox]").forEach(e => {
  e.checked = themeEnabled(e.id);
  e.addEventListener("change", e => {
    setValue(e.target.id, e.target.checked);
  });
});




document.head.insertAdjacentHTML("beforeend", `
<style>







${themeEnabled("gurochan") ? `
html, body {
        font-size:10pt;
        background:#EDDAD2;
        color: #800;
}
* {
        font-family: Tahoma, Verdana, Arial, sans-serif;
        font-size: 10pt;
}
input, textarea {
        background-color: #E6CBC0;
        border: 1px solid #CA927B;
}

a, a:visited{
	color: #AF0A0F;
}


a:hover {
	color: #D00;
}

a.quotelink {
        color:#DD0000;
}
div.post.reply.highlighted{
        background:#D9AF9E
}
form table tr th {
        background: #D9AF9E;
        border: 1px solid #CA927B;
        padding: 2px 5px 2px 5px;
}
div.banner{
        background: #D9AF9E;
        border: 1px solid #CA927B;
        color: #800;
        font-weight: bold;
        padding: 2px 5px 2px 5px;
}
div.post.reply{
        padding: 2px 5px 2px 5px;
	background:#E6CBC0;
	color:#800;
	border:1px solid #D9AF9E;
}
div.post.reply div.body a{
       color: #AF0A0F;
}

.bar
{
       background:#D9AF9E;
       color:#800;
}

.bar a {
        color:#800;
}

.bar.bottom {
    border-top: 1px solid #CA927B;
}

.desktop-style div.boardlist:not(.bottom), .desktop-style div.boardlist:not(.bottom) a {
    font-size: 10pt;
    background:#D9AF9E;
    color:#800;
    border-bottom: 1px solid #CA927B;
}

h1.glitch a{
        font-size: 24pt;
        color: #AF0A0F;
        font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
}
h1.glitch {
        font-size: 24pt;
        color: #AF0A0F;
        font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
}
hr {
        border-top: 1px dotted #D9AF9E;
}
#options_div {
        background: #D9AF9E;
        border: 2px solid #CA927B;
}
#options_tablist {
	border: 1px solid #CA927B;
}
div.module, div.ban {
        background: #D9AF9E;
        border: 1px solid #CA927B;
}
div.ban h2 {
        background: #CA927B;
}
.fc td, .fc th {
        background: #CA927B;
}
.hljs, .hljs-subst {
        background: #EDDAD2;
        border: 1px solid #CA927B;
}

.intro a.email:hover{
    color: #D00;
}

.intro a.email span.name {
    color: #AF0A0F;
}

.intro span.name {
    color: #AF0A0F;
}

.intro span.subject {
    color: #800;
}

.options_tab_icon{
    color: #AF0A0F;
}


#quick-reply th {
    border: 1px solid #D9AF9E;
}


div.pages input{
    background:#D9AF9E;
    color:#800;
}

div.pages a.selected{
    color:#800;
}

.quote {
    color: #866;
}


div.banner a, textarea {
    color: #800;
}


a.selected:nth-child(1) {
        color:#800;
}
` : ""}


${themeEnabled("underwater") ? `

a:link, a:visited {
text-decoration: none;
color: #00637B;
}

a:link:hover, a:visited:hover {
color: #DD0000;
}

a.post_no {
color: #000033;
}

.intro a.email span.name {
color: #0093AB;
}

.intro a.email:hover span.name {
color: #DD0000;
}

h2, div.title, h1 {
color: #800000;
}

form table tr th {
background: #95D2D3;
}

div.banner {
background-color: #E04000;
}

div.post.op hr {
border-color: #B7C9D5;
}

.intro span.subject {
color: #117743;
font-weight: 800;
}

.intro span.name {
color: #117743;
font-weight: 800;
}

div.post.reply.highlighted {
background: #a9d8ff;
}

div.post.reply {
background: #B6DDDE;
border-color: #8FCCCD;
}

div.ban {
border: 1px solid #0093AB;
}

div.ban h2 {
background: #B6DDDE;
color: #0093AB;
}

div.pages {
color: #8899AA;
background: #B6DDDE;
border-right: 1px solid #8FCCCD;
border-bottom: 1px solid #8FCCCD;
}

hr {
border-color: #B7D9C5;
}

div.boardlist {
color: #0093AB;
    background-color: rgba(65%, 85%, 95%, 0.2);
}

.desktop-style div.boardlist:nth-child(1) {
  text-shadow: #D2FFEE 1px 1px 1px, #D2FFEE -1px -1px 1px;
}
* {
   background-image: url('https://files.catbox.moe/hp03xs.png');
}

.soifish {
   background-image: url('https://files.catbox.moe/rxmvyr.png');
   position: fixed;
    pointer-events: none;
  -webkit-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  -moz-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  -o-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
}

@-webkit-keyframes moveX {
  from { left: 0; } to { left: 100%; }
}
@-moz-keyframes moveX {
  from { left: 0; } to { left: 100%; }
}
@-o-keyframes moveX {
  from { left: 0; } to { left: 100%; }
}
@keyframes moveX {
  from { left: 0; } to { left: 100%; }
}

@-webkit-keyframes moveY {
  from { top: 0; } to { top: 100%; }
}
@-moz-keyframes moveY {
  from { top: 0; } to { top: 100%; }
}
@-o-keyframes moveY {
  from { top: 0; } to { top: 100%; }
}
@keyframes moveY {
  from { top: 0; } to { top: 100%; }
}



.post.reply .body a:hover:after {
    content: url(https://soyjak.download/f.php?h=0lnyi5TW&p=1);
    display: block;
    position: absolute;
    left: 20px;
    top: -255px;
    pointer-events: none;
    z-index: 999;
}

.post.reply .body a:hover {
    position: relative;
}

body:after {
    content: url(https://soyjak.download/f.php?h=3EFSgyRY&p=1);
    display: block;
    position: fixed;
    bottom: 0px;
    right: 0px;
    pointer-events: none;

.desktop-style div.boardlist:nth-child(1):hover, .desktop-style div.boardlist:nth-child(1).cb-menu {
  background-color: rgba(70%, 95%, 100%, 0.45);
}` : ""}


${themeEnabled("soot") ? `
@import url("/stylesheets/dark.css");
/*soot theme*/

.name {
    color: #FDD73A !important;
}

body {
    background: black url(https://i.imgur.com/FeQmhfL.png) right bottom no-repeat fixed;
}

div.post.reply {
    background-color: #646464 !important;
    color: black;
    border-radius:0;
}

div#post-moderation-fields , div#style-select {
    padding:4px;
    background-color:rgba(0,0,0,28);
}

span.heading {
    color: #FF565C !important;
}

.remove-btn {
    color: rgba(255,255,255,128) !important;
}

hr {
    border-color:transparent;
}

` : ""}


${themeEnabled("beta") ? `
@import url("https://soyjak.party/stylesheets/dark.css");
/**
 * Beta.css
 * by kalyx
 *this might work well on phones
 */

body
{
	display:block;
	padding-top: 26px;
	background: #0d1010;
	color: #e8e8e3;
	font-family: sans-serif;
	font-size: 18px;


	width: 100%;
}

html {
	/* Size of largest container or bigger */
	  background:#0d1010;
		width: 100%;
		margin-left: auto;
  	margin-right: auto;

		}
/*banner*/
.board_image{
		border: double 0px #e8e8e3;
		box-shadow: 2px 2px #e8e8e3;
}

    /*gives images border/shadow*/
    div.files img.post-image {
		border: solid 1px #e8e8e3;
		box-shadow: 2px 2px #e8e8e3;
        padding: 0px;
        border-radius: 0;
        margin-bottom: 5px;
	}
div.sidearrows{
		display: none;
}

span.quote
{
    color:#e8d928;
}
@font-face
{
  font-family: 'lain';
  src: url('./fonts/nrdyyh.woff') format('woff'),
       url('./fonts/tojcxo.TTF') format('truetype');
}
h1
{
	display: none;
	font-family: 'lain', tahoma;

	letter-spacing: -2px;
	font-size: 42pt;
	text-align: center;
	color: #e8e8e3;

}
header div.subtitle
{
	display: none;
    color: #e8e8e3;
		font-size: 13px;
		   margin-left: auto;
  margin-right: auto;
	max-width:385px;
}
div.title
{
	display: none;
	color: #e8e8e3;
	font-family: Arial, Helvetica, sans-serif;

}
div.title p
{
	font-size: 8px;
	color: #e8e8e3;
}
a:link, a:visited, p.intro a.email span.name
{
	color: #e8e8e3;
	text-transform: uppercase;
	font-size: 10px;
	text-decoration: none;
	font-family: sans-serif;
}
a:link, a:visited, p.intro a.email span.name
{
        -moz-transition: 0.15s text-shadow, 0.15s color;
	-webkit-transition: 0.15s text-shadow, 0.15s color;
	-khtml-transition: 0.15s text-shadow, 0.15s color;
	-o-transition: 0.15s text-shadow, 0.15s color;
	-ms-transition: 0.15s text-shadow, 0.15s color;
	transition: 0.15s text-shadow, 0.15s color;
}
input[type="text"], textarea
{
	-moz-transition: 0.15s border-color;
	-webkit-transition: 0.15s border-color;
	-khtml-transition: 0.15s border-color;
	-o-transition: 0.15s border-color;
	-ms-transition: 0.15s border-color;
	transition: 0.15s border-color;
}
input[type="submit"]
{
	-moz-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
	-webkit-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
	-khtml-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
	-o-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
	-ms-transition: 0.15s border-color, 0.15s background-color, 0.15s color;
	transition: 0.15s border-color, 0.15s background-color, 0.15s color;
}
a:link:hover, a:visited:hover
{
	color: #e8d928;
	font-family: sans-serif;
	text-decoration: none;
	text-shadow: 0px 0px 5px #d2e7e8;
}
a.post_no
{
	color: #e8d928;
	text-decoration: none;
}
p.intro a.post_no:hover
{
        color: #e8d928!important;
}
div.post.reply
{
	background: #0d1010;
	align: center;
	max-width:100% !important;
		min-width: 100%!important;
border: solid  1px #e8e8e3;
box-shadow: 2px 2px #e8e8e3;


}

div.postcontainer
{
	max-width:100% !important;
		min-width: 100%!important;

}
div.post.reply.highlighted
{
	background: #1e2324;
	border: solid 1px #93e0e3;
        box-shadow: 3px 5px #5c8c8e;
		   margin-left: auto;
  margin-right: auto;
}
div.post.reply div.body a:link, div.post.reply div.body a:visited
{
	color: #CCCCCC;

}
div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover
{
	color: #e8d928;

}
p.intro span.subject
{
	font-size: 12px;
	font-family: sans-serif;
	color: #e8d928;
	font-weight: 800;

}
p.intro span.name
{
	color: #c3e849;
	font-weight: 800;
}
p.intro a.capcode, p.intro a.nametag
{
	color: magenta;
	margin-left: 0;
}
p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name
{
	color: #d2e7e8;

}
input[type="text"], textarea, select
{
	background: #0d1010!important;
	color: #CCCCCC!important;
border: solid  1px #e8e8e3;
box-shadow: 1px 1px #0d1010;
			   margin-left: auto;
  margin-right: auto;


}
input[type="password"]
{
	background: #0d1010!important;
	color: #CCCCCC!important;
	border: #d2e7e8 1px double!important;
}
form table tr th
{
	background: #0d1010!important;
	color: #e8e8e3!important;
	border: solid  1px #d2e7e8;
box-shadow: 1px 1px #0d1010;
	text-align: right;

}
div.banner
{

	background: #E04000;
	border: 0px solid hsl(17, 100%, 60%);
	color: #EEE;
	text-align: center;
	height: 15px;
	padding: 1px 1px 4px 1px;
	margin-left: auto;
	margin-right: auto;
}
div.banner a
{
    color:#000;
}
input[type="submit"]
{
	background: #333333;
	border: #666 1px solid;
	color: #CCCCCC;
}
input[type="submit"]:hover
{
	background: #555;
	border: #888 1px solid;
	color: #e8d928;
}
input[type="text"]:focus, textarea:focus
{
    border:#888 1px solid!important;
}
p.fileinfo a:hover
{
	text-decoration: underline;
}
span.trip
{
	color: #AAA;
}
.bar
{
	background: #0c0c0c!important;
	-moz-box-shadow: 0 0 0px #000;
	-webkit-box-shadow: 0 0 0px #000;




}
.bar.top
{
	border: solid  1px #e8e8e3;
box-shadow: 0px 1px #d2e7e8;

}
.bar.bottom
{
	border-top: 0px solid #666;
	border: solid  1px #e8e8e3;


}
div.pages
{
	color: #d2e7e8 ;
	background: #333;
	border: #666 0px solid;
	font-family: sans-serif;
	font-size: 10pt;
}
div.pages a.selected
{
	color: #d2e7e8 ;
}
hr
{
	height: 0px;
	border: #e8e8e3 2px solid;

}
div.boardlist
{
	color: #e8e8e3;
}

div.ban
{
	background-color: #0d1010;
	border: 0px solid #555;
	-moz-border-radius: 2px;
	-webkit-border-radius: 2px;
	border-radius: 2px;
	text-align: left!important;
		font-size: 13px;

}
div.ban h2
{
	background: #333;
	color: #e8e8e3;
	padding: 3px 7px;
	font-size: 12pt;
	border-bottom: 1px solid #555;
}
div.ban h2:not(:nth-child(1))
{
	border-top: 0px solid #555;
}
table.modlog tr th
{
	background: #333;
	color: #AAA;
}

div.report
{
	color: #666;
}
.pages, .board_image, input, .reply, form table th, textarea, a img, select, .banner
{
        -webkit-border-radius: 2px;
        -khtml-border-radius: 2px;
        -moz-border-radius: 2px;
	-o-border-radius: 2px;
	-ms-border-radius: 2px;
        border-radius: 2px;
}
.blur
{
    filter: blur(20px);
    -webkit-filter: blur(23px);
    -moz-filter: blur(23px);
    -o-filter: blur(23px);
    -ms-filter: blur(23px);
    filter: url(svg/blur.svg#blur);
}

/* options.js */
#options_div
{
       background: #333333;
}
.options_tab_icon
{
       color: #AAAAAA;
}
.options_tab_icon.active
{
       color: #FFFFFF;
}



.blotter
{
	color: #e8e8e3!important;
}
s` : ""}




${themeEnabled("leftypol") ? `
 body {
 background: #1E1E1E;
 color: #999999;
 font-family: Verdana, sans-serif;
 font-size: 14px;
 }
 .quote {
     color:#B8D962;
 }
 @font-face {
   font-family: 'lain';
   src: url('./fonts/nrdyyh.woff') format('woff'),
        url('./fonts/tojcxo.TTF') format('truetype');
 }
 h1
 {
 letter-spacing: -2px;
 font-size: 20pt;
 text-align: center;
 color: #32DD72;
 }
 div.title, h1 {
 color: #32DD72;
 }
 div.title p {
 font-size: 10px;
 }
 a:link, a:visited, .intro a.email span.name {
 color: #CCCCCC;
 text-decoration: none;
 font-family: sans-serif;
 }
 a:link:hover, a:visited:hover {
 color: #fff;
 font-family: sans-serif;
 text-decoration: none;
 }
 a.post_no {
 color: #AAAAAA;
 text-decoration: none;
 }
 a.post_no:hover {
 color: #32DD72 !important;
 text-decoration: underline overline;
 }
 div.post.reply {
 background: #333333;
 border: #555555 1px solid;
 }
 div.post.reply.highlighted {
 background: #555;
 border: transparent 1px solid;
 }
 div.post.reply div.body a:link, div.post.reply div.body a:visited {
 color: #CCCCCC;
 }
 div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover {
 color: #32DD72;
 }
 .intro span.subject {
 font-size: 12px;
 font-family: sans-serif;
 color: #446655;
 font-weight: 800;
 }
 .intro span.name {
 color: #32DD72;
 font-weight: 800;
 }
 .intro a.capcode, p.intro a.nametag {
 color: magenta;
 margin-left: 0;
 }
 .intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name {
 color: #32ddaf;
 }
 input[type="text"], textarea, select {
 background: #333333;
 color: #CCCCCC;
 border: #666666 1px solid;
 padding-left: 5px;
 padding-right: -5px;
 font-family: sans-serif;
 font-size: 10pt;
 }
 input[type="password"] {
 background: #333333;
 color: #CCCCCC;
 border: #666666 1px solid;
 }
 form table tr th {
 background: #333333;
 color: #AAAAAA;
 font-weight: 800;
 text-align: left;
 padding: 0;
 }
 div.banner {
 background: #32DD72;
 color: #000;
 text-align: center;
 width: 250px;
 padding: 4px;
 padding-left: 12px;
 padding-right: 12px;
 margin-left: auto;
 margin-right: auto;
 font-size: 12px;
 }
 div.banner a {
     color:#000;
 }
 input[type="submit"] {
 background: #333333;
 border: #888888 1px solid;
 color: #CCCCCC;
 }
 input[type="submit"]:hover {
 background: #555555;
 border: #888888 1px solid;
 color: #32DD72;
 }
 input[type="text"]:focus {
     border:#aaa 1px solid;
 }
 p.fileinfo a:hover {
 text-decoration: underline;
 }
 span.trip {
 color: #AAAAAA;
 }
 div.pages {
 background: #1E1E1E;
 font-family: sans-serif;
 }
 .bar.bottom {
     bottom: 0px;
     border-top: 1px solid #333333;
     background-color: #1E1E1E;
 }
 div.pages a.selected {
 color: #CCCCCC;
 }
 hr {
 height: 1px;
 border: #333333 1px solid;
 }
 div.boardlist {
 text-align: center;
 color: #999999;
 }
 div.ban {
 background-color: transparent;
 border: transparent 0px solid;
 }
 div.ban h2 {
 background: transparent;
 color: lime;
 font-size: 12px;
 }
 table.modlog tr th {
 background: #333333;
 color: #AAAAAA;
 }
 div.boardlist:not(.bottom) {
  background-color: #1E1E1E;

 }
 .desktop-style div.boardlist:not(.bottom) {
  position:static;
  text-shadow: black 1px 1px 1px, black -1px -1px 1px, black -1px 1px 1px, black 1px -1px 1px;
  color: #999999;
  background-color: #1E1E1E;
 }
 div.report {
 color: #666666;
 }
 #options_div, #alert_div {
 background: #333333;
 }
 .options_tab_icon {
 color: #AAAAAA;
 }
 .options_tab_icon.active {
 color: #FFFFFF;
 }
 #quick-reply table {
 background: none repeat scroll 0% 0% #333 !important;
 }
 .modlog tr:nth-child(even), .modlog th {
 background-color: #282A2E;
 }
 .box {
 background: #333333;
 border-color: #555555;
 color: #C5C8C6;
 border-radius: 10px;
 }
 .box-title {
 background: transparent;
 color: #32DD72;
 }
 table thead th {
 background: #333333;
 border-color: #555555;
 color: #C5C8C6;
 border-radius: 4px;
 }
 table tbody tr:nth-of-type( even ) {
 background-color: #333333;
 }
 table.board-list-table .board-uri .board-sfw {
 color: #CCCCCC;
 }
 tbody.board-list-omitted td {
 background: #333333;
 border-color: #555555;
 }
 table.board-list-table .board-tags .board-cell:hover {
 background: #1e1e1e;
 }
 table.board-list-table tr:nth-of-type( even ) .board-tags .board-cell {
 background: #333333;
 }
 /* red accents */
 div.blotter, h1, h2, header div.subtitle, div.title, a:link:hover, a:visited:hover p.intro a.post_no:hover,
 div.post.reply div.body a:link:hover, div.post.reply div.body a:visited:hover, p.intro span.name,
 p.intro a.email, p.intro a.email span.name, p.intro a.email:hover, p.intro a.email:hover span.name,
 input[type="submit"]:hover, div.ban h2 {
 color: #DD3232;
 }

 p.intro span.subject {
 color: #962C22;
 }` : ""}


${themeEnabled("colorjak") ? `

*{
    background-image: url('https://soyjak.download/f.php?h=0ubQjIwX&p=1');
}

.soifish {
    background-image: ('https//files.catbox.moe/rxmvyr.png');
    position: absolute;
    -webkit-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
    -moz-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
    -o-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
    animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
}

@-webkit-keyframes moveX {
    from { left: 0; } to { left: 100%; }
}
@-moz-keyframes moveX {
    from { left: 0; } to { left: 100%; }
}
@-o-keyframes moveX {
     from { left: 0; } to { left: 100%; }
}
@keyframes moveX {
    from { left: 0; } to { left: 100%;}
}

@-webkit-keyframes moveY {
    from { top: 0; } to { top: 100%; }
}
@-moz-keyframes moveY {
    from { top: 0; } to { top: 100%; }
}
@-o-keyframes moveY {
     from { top: 0; } to { top: 100%; }
}
@keyframes moveY {
    from { top: 0; } to { top: 100%; }
}

` : ""}


${themeEnabled("cafe") ? `
	body{background:#fdfdfe;color:#666;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;margin:0 8px;padding-left:5px;padding-right:5px}table *{margin:0}a,a:visited{text-decoration:none;color:#2b0f51!important}a.post_no{text-decoration:none;margin:0;padding:0}p.intro a.post_no{color:inherit}p.intro a.post_no,p.intro a.email{margin:0}p.intro a.email span.name{color:#34345c}p.intro a.email:hover span.name{color:red}p.intro label{display:inline}p.intro time,p.intro a.ip-link,p.intro a.capcode{direction:ltr;unicode-bidi:embed}h2{color:#af0a0f;font-size:11pt;margin:0;padding:0}header{margin:1em 0}h1{font-family:tahoma;letter-spacing:-2px;font-size:20pt;margin:0}header div.subtitle,h1{color:#af0a0f;text-align:center}header div.subtitle{font-size:8pt}form{margin-bottom:2em!important}form table{margin:auto}form table input{height:auto}input[type=text],input[type=password],textarea{border:1px solid #a9a9a9;text-indent:0;text-shadow:none;text-transform:none;word-spacing:normal}form table tr td{text-align:left;margin:0;padding:0}form table.mod tr td{padding:2px}form table tr th{text-align:left;padding:4px}form table tr th{background:#98e}form table tr td div{text-align:center;float:left;padding-left:3px}form table tr td div input{display:block;margin:2px auto 0}form table tr td div label{font-size:10px}.unimportant,.unimportant *{font-size:10px}p.fileinfo{display:block;margin:0;padding-right:7em}div.banner{background-color:#ffb0aa;text-align:center;font-size:12pt;font-weight:700;text-align:center;margin:1em 0;padding-bottom:2px}div.banner,div.banner a{color:#fff}div.banner a:hover{color:#eef2ff;text-decoration:none}img.banner{display:block;width:300px;height:100px;border:1px solid #a9a9a9;margin:20px auto 0}img.post-image{display:block;float:left;margin:10px 20px;border:none}div.post img.post-image{padding:5px;margin:5px 20px 0 0}div.post img.icon{display:inline;margin:0 5px;padding:0}div.post i.fa{margin:0 4px;font-size:16px}div.post.op{margin-right:20px;margin-bottom:5px}div.post.op hr{border-color:#d9bfb7}p.intro{margin:.5em 0;padding:0;padding-bottom:.2em}input.delete{float:left;margin:1px 6px 0 0}p.intro span.subject{color:#0f0c5d;font-weight:700}p.intro span.name{color:#117743;font-weight:700}p.intro span.capcode,p.intro a.capcode,p.intro a.nametag{color:#f00000;margin-left:0}p.intro a{margin-left:8px}div.delete{float:right}div.post.reply p{margin:.3em 0 0}div.post.reply div.body{margin-left:1.8em;margin-top:.8em;padding-right:3em;padding-bottom:.3em}div.post.reply.highlighted{background:#d6bad0}div.post.reply div.body a{color:#d00}div.post{max-width:97%}div.post div.body{word-wrap:break-word;white-space:pre-wrap}div.post.reply{background:#d6daf0;margin:.2em 16px;padding:.2em .3em .5em .7em;border-width:1px;border-style:none solid solid none;border-color:#b7c5d9;display:inline-block}span.trip{color:#228854}span.quote{color:#789922}span.omitted{display:block;margin-top:1em}br.clear{clear:left;display:block}span.controls{float:right;margin:0;padding:0;font-size:80%}span.controls.op{float:none;margin-left:10px}span.controls a{margin:0}div#wrap{width:900px;margin:0 auto}div.ban{background:#fff;border:1px solid #98e;max-width:700px;margin:30px auto}div.ban p,div.ban h2{padding:3px 7px}div.ban h2{background:#98e;color:#000;font-size:12pt}div.ban p{font-size:12px;margin-bottom:12px}div.ban p.reason{font-weight:700}span.heading{color:#af0a0f;font-size:11pt;font-weight:700}span.spoiler{background:#000;color:#000;padding:0 1px}div.post.reply div.body span.spoiler a{color:#000}span.spoiler:hover,div.post.reply div.body span.spoiler:hover a{color:#fff}div.styles{float:right;padding-bottom:20px}div.styles a{margin:0 10px}div.styles a.selected{text-decoration:none}table.test{width:100%}table.test td,table.test th{text-align:left;padding:5px}table.test tr.h th{background:#98e}table.test td img{margin:0}fieldset label{display:block}div.pages{color:#89a;background:#d6daf0;display:inline;padding:8px;border-right:1px solid #b7c5d9;border-bottom:1px solid #b7c5d9}div.pages.top{display:block;padding:5px 8px;margin-bottom:5px;position:fixed;top:0;right:0;opacity:.9}@media screen and (max-width:800px){div.pages.top{display:none!important}}div.pages a.selected{color:#000;font-weight:bolder}div.pages a{text-decoration:none}div.pages form{margin:0;padding:0;display:inline}div.pages form input{margin:0 5px;display:inline}hr{border:none;border-top:1px solid #b7c5d9;height:0;clear:left}div.boardlist{color:#89a;font-size:9pt;margin-top:3px}div.boardlist.bottom{margin-top:30px!important}div.boardlist a{text-decoration:none}div.report{color:#333}table.modlog{margin:auto;width:100%}table.modlog tr td{text-align:left;margin:0;padding:4px 15px 0 0}table.modlog tr th{text-align:left;padding:4px 15px 5px 5px;white-space:nowrap}table.modlog tr th{background:#98e}td.minimal,th.minimal{width:1%;white-space:nowrap}div.top_notice{text-align:center;margin:5px auto}span.public_ban{display:block;color:red;font-weight:700;margin-top:15px}span.toolong{display:block;margin-top:15px}div.blotter{color:red;font-weight:700;text-align:center}table.mod.config-editor{font-size:9pt;width:100%}table.mod.config-editor td{text-align:left;padding:5px;border-bottom:1px solid #98e}table.mod.config-editor input[type=text]{width:98%}p.intro.thread-hidden{margin:0;padding:0}form.ban-appeal{margin:9px 20px}form.ban-appeal textarea{display:block}.theme-catalog div.thread img{float:none!important;margin:auto;margin-bottom:12px;max-height:150px;max-width:200px;box-shadow:0 0 4px rgba(0,0,0,.55);border:2px solid transparent}.theme-catalog div.thread{display:inline-block;vertical-align:top;margin-bottom:25px;margin-left:20px;margin-right:15px;text-align:center;font-weight:400;width:205px;overflow:hidden;position:relative;font-size:11px;padding:15px;max-height:300px;background:rgba(182,182,182,.12);border:2px solid rgba(111,111,111,.34)}.theme-catalog div.thread strong{display:block}.compact-boardlist{padding:3px;padding-bottom:0}.compact-boardlist .cb-item{display:inline-block;vertical-align:middle}.compact-boardlist .cb-icon{padding-bottom:1px}.compact-boardlist .cb-fa{font-size:21px;padding:2px;padding-top:0}.compact-boardlist .cb-cat{padding:5px 6px 8px}.cb-menuitem{display:table-row}.cb-menuitem span{padding:5px;display:table-cell;text-align:left;border-top:1px solid rgba(0,0,0,.5)}.cb-menuitem span.cb-uri{text-align:right}.boardlist:not(.compact-boardlist) #watch-pinned::before{content:" [ "}.boardlist:not(.compact-boardlist) #watch-pinned::after{content:" ] "}.boardlist:not(.compact-boardlist) #watch-pinned{display:inline}.boardlist:not(.compact-boardlist) #watch-pinned a{margin-left:3pt}.boardlist:not(.compact-boardlist) #watch-pinned a:first-child{margin-left:0}.compact-boardlist #watch-pinned{display:inline-block;vertical-align:middle}video.post-image{display:block;float:left;margin:10px 20px;border:none}div.post video.post-image{padding:0;margin:10px 25px 5px 5px}span.settings{display:inline;float:right;margin-left:10px;margin-top:30px}.archive-link{font-weight:700;margin-left:5px;color:#1100c0!important}.blinker{color:#ff0404;font-family:comic sans ms;font-size:115%}.mentioned{word-wrap:break-word}.yt-dl-link{font-weight:700}.yt-dl-embed{float:left;clear:both;margin:5px 0 12px 5px}.video-container+.body{clear:left}.label-block{margin:10px 10px 0 5px}.label-img{display:inline-block;padding:5px;max-height:90px}.capcode-owner{color:#9370db!important;font-weight:700}#canvas-loading{display:none;background-image:url(https://i.imgur.com/c7z4Rx0.gif);width:20px;height:20px}#canvas-box{display:none}#literally-canvas{height:500px;width:600px}.canvas-button{cursor:pointer}#show-oekaki{cursor:pointer}.lol{cursor:pointer}#search-bar{width:25%;padding-top:10px;margin-bottom:25px;margin-left:5px}.forum-using{padding-left:3px;font-style:italic}.use-button{margin-left:2px}.reset-button{margin-left:5px}.avatar.forum{display:none}.signature.forum{display:none}.signature-text-forum{display:none}#chatango-prompt{margin-top:35px;margin-bottom:45px;margin-left:63px;width:160px;cursor:pointer;font-weight:700}.hide-chatango iframe[width='75px']{display:none!important}body{background-image:url(https://i.imgur.com/P31ggRr.png);color:#666;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:12px;margin:0 8px;padding-left:5px;padding-right:5px}hr{border:none;border-top:1px solid #649e66;height:0;clear:left}div.pages.top{display:block;padding:5px 8px;margin-bottom:5px;position:fixed;top:3px;right:3px;opacity:.9;border-radius:5px}div.pages{color:#6d6d6d;background:#ffd0cd;display:inline;padding:8px;border-right:1px solid #da7c75;border-bottom:1px solid #c17b76;border-radius:5px}form table tr th{padding:3px 5px 4px 4px!important;font-size:97%!important;background:rgba(34,228,85,.16);border-radius:7px}div.post.reply{background:#d7ffd8;margin:.2em 16px;padding:.2em .3em .5em .7em!important;border-width:1px;border-style:none solid solid none;border-color:#6cce70;display:inline-block;border-radius:10px}div.post.reply.highlighted{background:#ffd2cf;border-color:#e69994}div.blotter{color:#af0a0f;font-weight:700;text-align:center}header div.subtitle,h1{color:##b1362d;text-align:center}p.intro span.subject{color:#fd4b4b;font-weight:700}#spoiler{padding-left:3px;margin-left:3px;margin-right:3px}#sage{padding-left:3px;margin-left:3px;margin-right:3px}.sage-tip{font-size:85%;color:#a8ada8}.post-arrow{font-size:12px!important;margin-left:0!important}a.arrow-post-options:hover{color:#4e366f!important}.date-link{color:#807e7e!important;font-size:11.5px;margin-right:6px!important}a.date-link:hover{color:#807e7e!important;text-decoration:underline}.thread-hide-button{margin-right:1px;font-size:95%}.fileinfo a{font-size:85%}.fileinfo.reply{margin-left:3px!important}.boardlist{text-align:center!important;font-size:9.3pt!important;margin-top:6px!important;margin-bottom:24px!important}.scroll-button{color:#1a4c0a!important}

.desktop-style div.boardlist:nth-child(1) {
	background-color: rgba(255,0,0,0);
}


` : ""}


</style>
`);




initFixes();

SoyParty-X

Features:

  • Detects flood posts and hides them (you can set amount of lines and words to hide)
  • Forced anonymity (hides namefags, can be disabled)
  • Hides emailfags or sagefags (can be disabled for sagefags)
  • Highlights triple parentheses
  • Highlights datamining (makes posts glow)
  • Inline Youtube Previews (+invidious support)
  • Replaces "Gem" and "Coal" with minecraft icons
  • Replaces "Bump" and "Sage" with upvote and downvote icons

Expand to view the script

// ==UserScript==
// @name         SoyParty-X
// @namespace    datamining
// @version      0.2
// @description  Cure the cancer that is killing soyjak.party
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==

/* eslint-env jquery */

/*

Changelog:

0.2:

- hidePosts() now detects flood posts.

0.1:

- hidePosts()
- forcedAnonymity()
- highlightTripleParentheses()
- highlightDatamining()
- inlineYoutubePreviews()
- replaceCoalAndGemsWithIcon()
- replaceBumpAndSageWithIcons()

*/

(function SoyPartyX() {
  // true = hide posts where the e-mail is "sage".
  const _hideMailtoSage = true;

  // true = scrub email, trip, and force all names to be "Chud".
  // - Emailfags and tripfags are already hidden.
  // - Namefags aren't hidden, but turning this on will anonymize them.
  // false = don't change posts (default).
  const _enableForcedAnonymity = false;

  // Sets the limit for a post to be considered a flood post.
  // If one of the criteria is met, the post is hidden.
  const floodThresholdLines = 30;
  const floodThresholdCharacters = 3000;

  hidePosts();
  forcedAnonymity(); // Must come AFTER hidePosts()
  highlightTripleParentheses();
  highlightDatamining();
  inlineYoutubePreviews();
  replaceCoalAndGemsWithIcon();
  replaceBumpAndSageWithIcons();

  function hidePosts() {
    $(".post").each((i, el) => {
      const $el = $(el);
      const reasons = [];

      const isOp = $el.hasClass("op");

      if ($el.has(".trip").length) {
        reasons.push("tripfag");
      }
      if (_hideMailtoSage && $el.has('a.email[href^="mailto:sage"]').length) {
        reasons.push("sagefag");
      }
      if ($el.has('a.email:not([href^="mailto:sage"])').length) {
        reasons.push("emailfag");
      }

      const body = $el.has(".body");
      const bodyLines = body.html().split("<br>").length;
      const bodyLength = body.text().length;

      if (
        bodyLines > floodThresholdLines ||
        bodyLength > floodThresholdCharacters
      ) {
        reasons.push(
          `possible flooding: ${bodyLength} characters in ${bodyLines} lines`
        );
      }

      if (reasons.length) {
        const $notice = $("<div>")
          .addClass(`post ${isOp ? "op" : "reply"}`)
          .html(
            `<div class='body'><em>Post hidden (${reasons.join(
              ", "
            )}). Click to show.</em></div>`
          )
          .after($("<br>"));
        $notice.click(() => {
          $el.show();
          if (isOp) $el.prev(".files").show();
          $notice.hide();
        });
        $el.after($notice);
        $el.hide();
        if (isOp) $el.prev(".files").hide();
      }
    });
  }

  function forcedAnonymity() {
    if (!_enableForcedAnonymity) return;
    // Remove all emails.
    $("a.email").prop("outerHTML", "<span class='name'>Chud</span>");
    // Remove all tripcodes.
    $(".trip").prop("outerHTML", "");
    // Set all names to Chud.
    // Make sure not to overwrite (You)'s.
    $(".name")
      .filter((i, el) => !$(el).has(".own_post").length)
      .text("Chud");
  }

  function replaceWordWithIcon(re, icon) {
    const matchesRe = (index, post) => $(post).html().match(re);

    const template = (match) =>
      `<img src="${icon}" style="max-height:2em; vertical-align:middle">`;

    const applyTemplate = (index, post) => {
      const $post = $(post);
      const html = $post.html();
      $post.html(html.replace(re, template));
    };

    $("div.body").filter(matchesRe).each(applyTemplate);
  }

  function replaceCoalAndGemsWithIcon() {
    replaceWordWithIcon(/coal/gi, "https://i.imgur.com/O9iRcRv.png");
    replaceWordWithIcon(/gems?/gi, "https://i.imgur.com/BvjFdau.png");
  }

  function replaceBumpAndSageWithIcons() {
    // replaceWordWithIcon(/bump/gi, "https://i.imgur.com/zM2xOGh.png");
    // replaceWordWithIcon(/sage/gi, "https://i.imgur.com/2bsauzj.png");
    replaceWordWithIcon(/bump/gi, "https://i.imgur.com/Y7cpsW0.png");
    replaceWordWithIcon(/\bsage\b/gi, "https://i.imgur.com/ZarQtY3.png");
  }

  function highlightTripleParentheses() {
    const re = /\(\(\(.+?\)\)\)/g;
    const hasRe = (i, post) => post.innerHTML.match(re);

    const template = (match) =>
      `<span style='background-color:white;color:#0038B8;font-family:monospace;'>${match}</span>`;
    const applyTemplate = (i, post) => {
      post.innerHTML = post.innerHTML.replace(re, template);
    };

    $("div.body").filter(hasRe).each(applyTemplate);
  }

  function highlightDatamining() {
    const reGlowie =
      /data(\s*|-)min(ing|er|ed)|(sell|selling|sold)\s+(my|our)?\s+data|cuckflare|cloudflare|cloud fleur/i;
    const hasReGlowie = (i, post) => post.innerHTML.match(reGlowie);
    const applyTemplate = (i, post) =>
      $(post).css({
        backgroundColor: "#D7EFD7",
        boxShadow: "#66FF66 0 0 2rem 0",
      });
    $(".reply").filter(hasReGlowie).each(applyTemplate);
  }

  function inlineYoutubePreviews() {
    const re = /(?:youtu\.be\/|\/watch\?v=)(.{11})/;
    const previewTemplate = (videoId) =>
      `<a href="https://youtube.com/watch?v=${videoId}">https://youtube.com/watch?v=${videoId}</a><br><img style="max-width:255px;max-height:255px" src="https://i.ytimg.com/vi/${videoId}/hqdefault.jpg" /><br><em>Watch on <a href="https://yewtu.be/${videoId}">Invidious</a> (less datamining)</em><br>`;
    $(".body a")
      .filter(function (i) {
        return $(this).prop("href").match(re);
      })
      .each(function (i) {
        $(this).prop("outerHTML", previewTemplate(this.href.match(re)[1]));
      });
  }
})();

Post Filters

Allows you to filter posts based on comments, subject, name, and tripcode To access filters click on options button.

Expand to view the script

// @name         Post Filters for soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Filter posts on soyjak.party
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
/*
 * post-menu.js - adds dropdown menu to posts
 *
 * Creates a global Menu object with four public methods:
 *
 *   Menu.onclick(fnc)
 *     registers a function to be executed after button click, before the menu is displayed
 *   Menu.add_item(id, text[, title])
 *     adds an item to the top level of menu
 *   Menu.add_submenu(id, text)
 *     creates and returns a List object through which to manipulate the content of the submenu
 *   Menu.get_submenu(id)
 *     returns the submenu with the specified id from the top level menu
 *
 *   The List object contains all the methods from Menu except onclick()
 *
 *   Example usage:
 *     Menu.add_item('filter-menu-hide', 'Hide post');
 *     Menu.add_item('filter-menu-unhide', 'Unhide post');
 *
 *     submenu = Menu.add_submenu('filter-menu-add', 'Add filter');
 *         submenu.add_item('filter-add-post-plus', 'Post +', 'Hide post and all replies');
 *         submenu.add_item('filter-add-id', 'ID');
 *  
 * Usage:
 *   $config['additional_javascript'][] = 'js/jquery.min.js';
 *   $config['additional_javascript'][] = 'js/post-menu.js';
 */
$(document).ready(function () {

var List = function (menuId, text) {
	this.id = menuId;
	this.text = text;
	this.items = [];

	this.add_item = function (itemId, text, title) {
		this.items.push(new Item(itemId, text, title));
	};
	this.list_items = function () {
		var array = [];
		var i, length, obj, $ele;

		if ($.isEmptyObject(this.items))
			return;

		length = this.items.length;
		for (i = 0; i < length; i++) {
			obj = this.items[i];

			$ele = $('<li>', {id: obj.id}).text(obj.text);
			if ('title' in obj) $ele.attr('title', obj.title);

			if (obj instanceof Item) {
				$ele.addClass('post-item');
			} else {
				$ele.addClass('post-submenu');

				$ele.prepend(obj.list_items());
				$ele.append($('<span>', {class: 'post-menu-arrow'}).text('»'));
			}

			array.push($ele);
		}

		return $('<ul>').append(array);
	};
	this.add_submenu = function (menuId, text) {
		var ele = new List(menuId, text);
		this.items.push(ele);
		return ele;
	};
	this.get_submenu = function (menuId) {
		for (var i = 0; i < this.items.length; i++) {
			if ((this.items[i] instanceof Item) || this.items[i].id != menuId) continue;
			return this.items[i];
		}
	};
};

var Item = function (itemId, text, title) {
	this.id = itemId;
	this.text = text;

	// optional
	if (typeof title != 'undefined') this.title = title;
};

function buildMenu(e) {
	var pos = $(e.target).offset();
	var i, length;

	var $menu = $('<div class="post-menu"></div>').append(mainMenu.list_items());

	//  execute registered click handlers
	length = onclick_callbacks.length;
	for (i = 0; i < length; i++) {
		onclick_callbacks[i](e, $menu);
	}

	//  set menu position and append to page
	 $menu.css({top: pos.top, left: pos.left + 20});
	 $('body').append($menu);
}

function addButton(post) {
	var $ele = $(post);
	$ele.find('input.delete').after(
		$('<a>', {href: '#', class: 'post-btn', title: 'Post menu'}).text('▶')
	);
}


/* * * * * * * * * *
    Public methods
 * * * * * * * * * */
var Menu = {};
var mainMenu = new List();
var onclick_callbacks = [];

Menu.onclick = function (fnc) {
	onclick_callbacks.push(fnc);
};

Menu.add_item = function (itemId, text, title) {
	mainMenu.add_item(itemId, text, title);
};

Menu.add_submenu = function (menuId, text) {
	return mainMenu.add_submenu(menuId, text);
};

Menu.get_submenu = function (id) {
	return mainMenu.get_submenu(id);
};

window.Menu = Menu;


/* * * * * * * *
    Initialize
 * * * * * * * */

/*  Styling
 */
var $ele, cssStyle, cssString;

$ele = $('<div>').addClass('post reply').hide().appendTo('body');
cssStyle = $ele.css(['border-top-color']);
cssStyle.hoverBg = $('body').css('background-color');
$ele.remove();

cssString =
	'\n/*** Generated by post-menu ***/\n' +
	'.post-menu {position: absolute; font-size: 12px; line-height: 1.3em;}\n' +
	'.post-menu ul {\n' +
	'    background-color: '+ cssStyle['border-top-color'] +'; border: 1px solid #666;\n' +
	'    list-style: none; padding: 0; margin: 0; white-space: nowrap;\n}\n' +
	'.post-menu .post-submenu{white-space: normal; width: 90px;}' +
	'.post-menu .post-submenu>ul{white-space: nowrap; width: auto;}' +
	'.post-menu li {cursor: pointer; position: relative; padding: 4px 4px; vertical-align: middle;}\n' +
	'.post-menu li:hover {background-color: '+ cssStyle.hoverBg +';}\n' +
	'.post-menu ul ul {display: none; position: absolute;}\n' +
	'.post-menu li:hover>ul {display: block; left: 100%; margin-top: -3px;}\n' +
	'.post-menu-arrow {float: right; margin-left: 10px;}\n' +
	'.post-menu.hidden, .post-menu .hidden {display: none;}\n' +
	'.post-btn {transition: transform 0.1s; width: 15px; text-align: center; font-size: 10pt; opacity: 0.8; text-decoration: none; margin: -6px 0px 0px -5px !important; display: inline-block;}\n' +
	'.post-btn:hover {opacity: 1;}\n' +
	'.post-btn-open {transform: rotate(90deg);}\n';

if (!$('style.generated-css').length) $('<style class="generated-css">').appendTo('head');
$('style.generated-css').html($('style.generated-css').html() + cssString);

/*  Add buttons
 */
$('.reply:not(.hidden), .thread>.op').each(function () {
	addButton(this);
 });

 /*  event handlers
  */
$('form[name=postcontrols]').on('click', '.post-btn', function (e) {
	e.preventDefault();
	var post = e.target.parentElement.parentElement;
	$('.post-menu').remove();

	if ($(e.target).hasClass('post-btn-open')) {
		$('.post-btn-open').removeClass('post-btn-open');
	} else {
		//  close previous button
		$('.post-btn-open').removeClass('post-btn-open');
		$(post).find('.post-btn').addClass('post-btn-open');

		buildMenu(e);
	}
});

$(document).on('click', function (e){
	if ($(e.target).hasClass('post-btn') || $(e.target).hasClass('post-submenu'))
		return;

	$('.post-menu').remove();
	$('.post-btn-open').removeClass('post-btn-open');
});

// on new posts
$(document).on('new_post', function (e, post) {
	addButton(post);
});

$(document).trigger('menu_ready');
});


// Post Filters
if (active_page === 'thread' || active_page === 'index' || active_page === 'catalog' || active_page === 'ukko') {
	$(document).on('menu_ready', function () {
		'use strict';
		
		// returns blacklist object from storage
		function getList() {
			return JSON.parse(localStorage.postFilter);
		}

		// stores blacklist into storage and reruns the filter
		function setList(blacklist) {
			localStorage.postFilter = JSON.stringify(blacklist);
			$(document).trigger('filter_page');
		}

		// unit: seconds
		function timestamp() {
			return Math.floor((new Date()).getTime() / 1000);
		}

		function initList(list, boardId, threadId) {
			if (typeof list.postFilter[boardId] == 'undefined') {
				list.postFilter[boardId] = {};
				list.nextPurge[boardId] = {};
			}
			if (typeof list.postFilter[boardId][threadId] == 'undefined') {
				list.postFilter[boardId][threadId] = [];
			}
			list.nextPurge[boardId][threadId] = {timestamp: timestamp(), interval: 86400};  // 86400 seconds == 1 day
		}

		function addFilter(type, value, useRegex) {
			var list = getList();
			var filter = list.generalFilter;
			var obj = {
				type: type,
				value: value,
				regex: useRegex
			};

			for (var i=0; i<filter.length; i++) {
				if (filter[i].type == type && filter[i].value == value && filter[i].regex == useRegex)
					return;
			}

			filter.push(obj);
			setList(list);
			drawFilterList();
		}

		function removeFilter(type, value, useRegex) {
			var list = getList();
			var filter = list.generalFilter;

			for (var i=0; i<filter.length; i++) {
				if (filter[i].type == type && filter[i].value == value && filter[i].regex == useRegex) {
					filter.splice(i, 1);
					break;
				}
			}

			setList(list);
			drawFilterList();
		}

		function nameSpanToString(el) {
			var s = ''; 

			$.each($(el).contents(), function(k,v) {
				if (v.nodeName === 'IMG')
					s=s+$(v).attr('alt')
				
				if (v.nodeName === '#text')
					s=s+v.nodeValue
			});
			return s.trim();
		}

		var blacklist = {
			add: {
				post: function (boardId, threadId, postId, hideReplies) {
					var list = getList();
					var filter = list.postFilter;

					initList(list, boardId, threadId);

					for (var i in filter[boardId][threadId]) {
						if (filter[boardId][threadId][i].post == postId) return;
					}
					filter[boardId][threadId].push({
						post: postId,
						hideReplies: hideReplies
					});
					setList(list);
				},
				uid: function (boardId, threadId, uniqueId, hideReplies) {
					var list = getList();
					var filter = list.postFilter;

					initList(list, boardId, threadId);

					for (var i in filter[boardId][threadId]) {
						if (filter[boardId][threadId][i].uid == uniqueId) return;
					}
					filter[boardId][threadId].push({
						uid: uniqueId,
						hideReplies: hideReplies
					});
					setList(list);
				}
			},
			remove: {
				post: function (boardId, threadId, postId) {
					var list = getList();
					var filter = list.postFilter;

					// thread already pruned
					if (typeof filter[boardId] == 'undefined' || typeof filter[boardId][threadId] == 'undefined')
						return;

					for (var i=0; i<filter[boardId][threadId].length; i++) {
						if (filter[boardId][threadId][i].post == postId) {
							filter[boardId][threadId].splice(i, 1);
							break;
						}
					}

					if ($.isEmptyObject(filter[boardId][threadId])) {
						delete filter[boardId][threadId];
						delete list.nextPurge[boardId][threadId];

						if ($.isEmptyObject(filter[boardId])) {
							delete filter[boardId];
							delete list.nextPurge[boardId];
						}
					}
					setList(list);
				},
				uid: function (boardId, threadId, uniqueId) {
					var list = getList();
					var filter = list.postFilter;

					// thread already pruned
					if (typeof filter[boardId] == 'undefined' || typeof filter[boardId][threadId] == 'undefined')
						return;

					for (var i=0; i<filter[boardId][threadId].length; i++) {
						if (filter[boardId][threadId][i].uid == uniqueId) {
							filter[boardId][threadId].splice(i, 1);
							break;
						}
					}

					if ($.isEmptyObject(filter[boardId][threadId])) {
						delete filter[boardId][threadId];
						delete list.nextPurge[boardId][threadId];

						if ($.isEmptyObject(filter[boardId])) {
							delete filter[boardId];
							delete list.nextPurge[boardId];
						}
					}
					setList(list);
				}
			}
		};

		/* 
		 *  hide/show the specified thread/post
		 */
		function hide(ele) {
			var $ele = $(ele);

			if ($(ele).data('hidden'))
				return;

			$(ele).data('hidden', true);
			if ($ele.hasClass('op')) {
				$ele.parent().find('.body, .files, .video-container').not($ele.children('.reply').children()).hide();

				// hide thread replies on index view
				if (active_page == 'index' || active_page == 'ukko') $ele.parent().find('.omitted, .reply:not(.hidden), post_no, .mentioned, br').hide();
			} else {
				// normal posts
				$ele.children('.body, .files, .video-container').hide();
			}
		}
		function show(ele) {
			var $ele = $(ele);

			$(ele).data('hidden', false);
			if ($ele.hasClass('op')) {
				$ele.parent().find('.body, .files, .video-container').show();
				if (active_page == 'index') $ele.parent().find('.omitted, .reply:not(.hidden), post_no, .mentioned, br').show();
			} else {
				// normal posts
				$ele.children('.body, .files, .video-container').show();
			}
		}

		/* 
		 *  create filter menu when the button is clicked
		 */
		function initPostMenu(pageData) {
			var Menu = window.Menu;
			var submenu;
			Menu.add_item('filter-menu-hide', _('Hide post'));
			Menu.add_item('filter-menu-unhide', _('Unhide post'));

			submenu = Menu.add_submenu('filter-menu-add', _('Add filter'));
				submenu.add_item('filter-add-post-plus', _('Post +'), _('Hide post and all replies'));
				submenu.add_item('filter-add-id', _('ID'));
				submenu.add_item('filter-add-id-plus', _('ID +'), _('Hide ID and all replies'));
				submenu.add_item('filter-add-name', _('Name'));
				submenu.add_item('filter-add-trip', _('Tripcode'));

			submenu = Menu.add_submenu('filter-menu-remove', _('Remove filter'));
				submenu.add_item('filter-remove-id', _('ID'));
				submenu.add_item('filter-remove-name', _('Name'));
				submenu.add_item('filter-remove-trip', _('Tripcode'));

			Menu.onclick(function (e, $buffer) {
				var ele = e.target.parentElement.parentElement;
				var $ele = $(ele);

				var threadId = $ele.parent().attr('id').replace('thread_', '');
				var boardId = $ele.parent().data('board');
				var postId = $ele.find('.post_no').not('[id]').text();
				if (pageData.hasUID) {
					var postUid = $ele.find('.poster_id').text();
				}

				var postName;
				var postTrip = '';
				if (!pageData.forcedAnon) {
					postName = (typeof $ele.find('.name').contents()[0] == 'undefined') ? '' : nameSpanToString($ele.find('.name')[0]);
					postTrip = $ele.find('.trip').text();
				}

				/*  display logic and bind click handlers
				 */

				 // unhide button
				if ($ele.data('hidden')) {
					$buffer.find('#filter-menu-unhide').click(function () {
						//  if hidden due to post id, remove it from blacklist
						//  otherwise just show this post
						blacklist.remove.post(boardId, threadId, postId);
						show(ele);
					});
					$buffer.find('#filter-menu-hide').addClass('hidden');
				} else {
					$buffer.find('#filter-menu-unhide').addClass('hidden');
					$buffer.find('#filter-menu-hide').click(function () {
						blacklist.add.post(boardId, threadId, postId, false);
					});
				}

				//  post id
				if (!$ele.data('hiddenByPost')) {
					$buffer.find('#filter-add-post-plus').click(function () {
						blacklist.add.post(boardId, threadId, postId, true);
					});
				} else {
					$buffer.find('#filter-add-post-plus').addClass('hidden');
				}

				// UID
				if (pageData.hasUID && !$ele.data('hiddenByUid')) {
					$buffer.find('#filter-add-id').click(function () {
						blacklist.add.uid(boardId, threadId, postUid, false);
					});
					$buffer.find('#filter-add-id-plus').click(function () {
						blacklist.add.uid(boardId, threadId, postUid, true);
					});

					$buffer.find('#filter-remove-id').addClass('hidden');
				} else if (pageData.hasUID) {
					$buffer.find('#filter-remove-id').click(function () {
						blacklist.remove.uid(boardId, threadId, postUid);
					});

					$buffer.find('#filter-add-id').addClass('hidden');
					$buffer.find('#filter-add-id-plus').addClass('hidden');
				} else {
					// board doesn't use UID
					$buffer.find('#filter-add-id').addClass('hidden');
					$buffer.find('#filter-add-id-plus').addClass('hidden');
					$buffer.find('#filter-remove-id').addClass('hidden');
				}

				//  name
				if (!pageData.forcedAnon && !$ele.data('hiddenByName')) {
					$buffer.find('#filter-add-name').click(function () {
						addFilter('name', postName, false);
					});

					$buffer.find('#filter-remove-name').addClass('hidden');
				} else if (!pageData.forcedAnon) {
					$buffer.find('#filter-remove-name').click(function () {
						removeFilter('name', postName, false);
					});

					$buffer.find('#filter-add-name').addClass('hidden');
				} else {
					// board has forced anon
					$buffer.find('#filter-remove-name').addClass('hidden');
					$buffer.find('#filter-add-name').addClass('hidden');
				}

				//  tripcode
				if (!pageData.forcedAnon && !$ele.data('hiddenByTrip') && postTrip !== '') {
					$buffer.find('#filter-add-trip').click(function () {
						addFilter('trip', postTrip, false);
					});

					$buffer.find('#filter-remove-trip').addClass('hidden');
				} else if (!pageData.forcedAnon && postTrip !== '') {
					$buffer.find('#filter-remove-trip').click(function () {
						removeFilter('trip', postTrip, false);
					});

					$buffer.find('#filter-add-trip').addClass('hidden');
				} else {
					// board has forced anon
					$buffer.find('#filter-remove-trip').addClass('hidden');
					$buffer.find('#filter-add-trip').addClass('hidden');
				}

				/*  hide sub menus if all items are hidden
				 */
				if (!$buffer.find('#filter-menu-remove > ul').children().not('.hidden').length) {
					$buffer.find('#filter-menu-remove').addClass('hidden');
				}
				if (!$buffer.find('#filter-menu-add > ul').children().not('.hidden').length) {
					$buffer.find('#filter-menu-add').addClass('hidden');
				}
			});
		}

		/* 
		 *  hide/unhide thread on index view
		 */
		function quickToggle(ele, threadId, pageData) {
			/*if ($(ele).find('.hide-thread-link').length)
				$('.hide-thread-link').remove();*/

			if ($(ele).hasClass('op') && !$(ele).find('.hide-thread-link').length) {
				$('<a class="hide-thread-link" style="float:left;margin-right:5px" href="javascript:void(0)">[' + ($(ele).data('hidden') ? '+' : '–') + ']</a>')
					.insertBefore($(ele).find(':not(h2,h2 *):first'))
					.click(function() {
						var postId = $(ele).find('.post_no').not('[id]').text();
						var hidden = $(ele).data('hidden');
						var boardId = $(ele).parents('.thread').data('board');
					
						if (hidden) {
							blacklist.remove.post(boardId, threadId, postId, false);
							$(this).html('[–]');
						} else {
							blacklist.add.post(boardId, threadId, postId, false);
							$(this).text('[+]');
						}
					});
			}
		}

		/*
		 *  determine whether the reply post should be hidden
		 *   - applies to all posts on page load or filtering rule change
		 *   - apply to new posts on thread updates
		 *   - must explicitly set the state of each attributes because filter will reapply to all posts after filtering rule change
		 */
		function filter(post, threadId, pageData) {
			var $post = $(post);

			var list = getList();
			var postId = $post.find('.post_no').not('[id]').text();
			var name, trip, uid, subject, comment;
			var i, length, array, rule, pattern;  // temp variables

			var boardId	      = $post.data('board');
			if (!boardId) boardId = $post.parents('.thread').data('board');

			var localList   = pageData.localList;
			var noReplyList = pageData.noReplyList;
			var hasUID      = pageData.hasUID;
			var forcedAnon  = pageData.forcedAnon;

			var hasTrip = ($post.find('.trip').length > 0);
			var hasSub = ($post.find('.subject').length > 0);

			$post.data('hidden', false);
			$post.data('hiddenByUid', false);
			$post.data('hiddenByPost', false);
			$post.data('hiddenByName', false);
			$post.data('hiddenByTrip', false);
			$post.data('hiddenBySubject', false);
			$post.data('hiddenByComment', false);

			// add post with matched UID to localList
			if (hasUID &&
				typeof list.postFilter[boardId] != 'undefined' &&
				typeof list.postFilter[boardId][threadId] != 'undefined') {
				uid = $post.find('.poster_id').text();
				array = list.postFilter[boardId][threadId];

				for (i=0; i<array.length; i++) {
					if (array[i].uid == uid) {
						$post.data('hiddenByUid', true);
						localList.push(postId);
						if (array[i].hideReplies) noReplyList.push(postId);
						break;
					}
				}
			}

			// match localList
			if (localList.length) {
				if ($.inArray(postId, localList) != -1) {
					if ($post.data('hiddenByUid') !== true) $post.data('hiddenByPost', true);
					hide(post);
				}
			}

			// matches generalFilter
			if (!forcedAnon)
				name = (typeof $post.find('.name').contents()[0] == 'undefined') ? '' : nameSpanToString($post.find('.name')[0]);
			if (!forcedAnon && hasTrip)
				trip = $post.find('.trip').text();
			if (hasSub)
				subject = $post.find('.subject').text();

			array = $post.find('.body').contents().filter(function () {if ($(this).text() !== '') return true;}).toArray();
			array = $.map(array, function (ele) {
				return $(ele).text().trim();
			});
			comment = array.join(' ');


			for (i = 0, length = list.generalFilter.length; i < length; i++) {
				rule = list.generalFilter[i];

				if (rule.regex) {
					pattern = new RegExp(rule.value);
					switch (rule.type) {
						case 'name':
							if (!forcedAnon && pattern.test(name)) {
								$post.data('hiddenByName', true);
								hide(post);
							}
							break;
						case 'trip':
							if (!forcedAnon && hasTrip && pattern.test(trip)) {
								$post.data('hiddenByTrip', true);
								hide(post);
							}
							break;
						case 'sub':
							if (hasSub && pattern.test(subject)) {
								$post.data('hiddenBySubject', true);
								hide(post);
							}
							break;
						case 'com':
							if (pattern.test(comment)) {
								$post.data('hiddenByComment', true);
								hide(post);
							}
							break;
					}
				} else {
					switch (rule.type) {
						case 'name':
							if (!forcedAnon && rule.value == name) {
								$post.data('hiddenByName', true);
								hide(post);
							}
							break;
						case 'trip':
							if (!forcedAnon && hasTrip && rule.value == trip) {
								$post.data('hiddenByTrip', true);
								hide(post);
							}
							break;
						case 'sub':
							pattern = new RegExp('\\b'+ rule.value+ '\\b');
							if (hasSub && pattern.test(subject)) {
								$post.data('hiddenBySubject', true);
								hide(post);
							}
							break;
						case 'com':
							pattern = new RegExp('\\b'+ rule.value+ '\\b');
							if (pattern.test(comment)) {
								$post.data('hiddenByComment', true);
								hide(post);
							}
							break;
					}
				}
			}

			// check for link to filtered posts
			$post.find('.body a').not('[rel="nofollow"]').each(function () {
				var replyId = $(this).text().match(/^>>(\d+)$/);

				if (!replyId)
					return;

				replyId = replyId[1];
				if ($.inArray(replyId, noReplyList) != -1) {
					hide(post);
				}
			});

			// post didn't match any filters
			if (!$post.data('hidden')) {
				show(post);
			}
		}

		/*  (re)runs the filter on the entire page
		 */
		 function filterPage(pageData) {
			var list = getList();

			if (active_page != 'catalog') {

				// empty the local and no-reply list
				pageData.localList = [];
				pageData.noReplyList = [];

				$('.thread').each(function () {
					var $thread = $(this);
					// disregard the hidden threads constructed by post-hover.js
					if ($thread.css('display') == 'none')
						return;

					var threadId = $thread.attr('id').replace('thread_', '');
					var boardId = $thread.data('board');
					var op = $thread.children('.op')[0];
					var i, array;  // temp variables

					// add posts to localList and noReplyList
					if (typeof list.postFilter[boardId] != 'undefined' && typeof list.postFilter[boardId][threadId] != 'undefined') {
						array = list.postFilter[boardId][threadId];
						for (i=0; i<array.length; i++) {
							if ( typeof array[i].post == 'undefined')
								continue;

							pageData.localList.push(array[i].post);
							if (array[i].hideReplies) pageData.noReplyList.push(array[i].post);
						}
					}
					// run filter on OP
					filter(op, threadId, pageData);
					quickToggle(op, threadId, pageData);

					// iterate filter over each post
					if (!$(op).data('hidden') || active_page == 'thread') {
						$thread.find('.reply').not('.hidden').each(function () {
							filter(this, threadId, pageData);
						});
					}

				});
			} else {
				var postFilter = list.postFilter[pageData.boardId];
				var $collection = $('.mix');

				if ($.isEmptyObject(postFilter))
					return;

				// for each thread that has filtering rules
				// check if filter contains thread OP and remove the thread from catalog
				$.each(postFilter, function (key, thread) {
					var threadId = key;
					$.each(thread, function () {
						if (this.post == threadId) {
							$collection.filter('[data-id='+ threadId +']').remove();
						}
					});
				});
			}
		 }

		function initStyle() {
			var $ele, cssStyle, cssString;

			$ele = $('<div>').addClass('post reply').hide().appendTo('body');
			cssStyle = $ele.css(['background-color', 'border-color']);
			cssStyle.hoverBg = $('body').css('background-color');
			$ele.remove();

			cssString = '\n/*** Generated by post-filter ***/\n' +
				'#filter-control input[type=text] {width: 130px;}' +
				'#filter-control input[type=checkbox] {vertical-align: middle;}' +
				'#filter-control #clear {float: right;}\n' +
				'#filter-container {margin-top: 20px; border: 1px solid; height: 270px; overflow: auto;}\n' +
				'#filter-list {width: 100%; border-collapse: collapse;}\n' +
				'#filter-list th {text-align: center; height: 20px; font-size: 14px; border-bottom: 1px solid;}\n' +
				'#filter-list th:nth-child(1) {text-align: center; width: 70px;}\n' +
				'#filter-list th:nth-child(2) {text-align: left;}\n' +
				'#filter-list th:nth-child(3) {text-align: center; width: 58px;}\n' +
				'#filter-list tr:not(#header) {height: 22px;}\n' +
				'#filter-list tr:nth-child(even) {background-color:rgba(255, 255, 255, 0.5);}\n' +
				'#filter-list td:nth-child(1) {text-align: center; width: 70px;}\n' +
				'#filter-list td:nth-child(3) {text-align: center; width: 58px;}\n' +
				'#confirm {text-align: right; margin-bottom: -18px; padding-top: 2px; font-size: 14px; color: #FF0000;}';

			if (!$('style.generated-css').length) $('<style class="generated-css">').appendTo('head');
			$('style.generated-css').html($('style.generated-css').html() + cssString);
		}

		function drawFilterList() {
			var list = getList().generalFilter;
			var $ele = $('#filter-list');
			var $row, i, length, obj, val;

			var typeName = {
				name: 'name',
				trip: 'tripcode',
				sub: 'subject',
				com: 'comment'
			};

			$ele.empty();

			$ele.append('<tr id="header"><th>Type</th><th>Content</th><th>Remove</th></tr>');
			for (i = 0, length = list.length; i < length; i++) {
				obj = list[i];

				// display formatting
				val = (obj.regex) ? '/'+ obj.value +'/' : obj.value;

				$row = $('<tr>');
				$row.append(
					'<td>'+ typeName[obj.type] +'</td>',
					'<td>'+ val +'</td>',
					$('<td>').append(
						$('<a>').html('X')
							.addClass('del-btn')
							.attr('href', '#')
							.data('type', obj.type)
							.data('val', obj.value)
							.data('useRegex', obj.regex)
					)
				);
				$ele.append($row);
			}
		}

		function initOptionsPanel() {
			if (window.Options && !Options.get_tab('filter')) {
				Options.add_tab('filter', 'list', _('Filters'));
				Options.extend_tab('filter',
					'<div id="filter-control">' +
						'<select>' +
							'<option value="name">'+_('Name')+'</option>' +
							'<option value="trip">'+_('Tripcode')+'</option>' +
							'<option value="sub">'+_('Subject')+'</option>' +
							'<option value="com">'+_('Comment')+'</option>' +
						'</select>' +
						'<input type="text">' +
						'<input type="checkbox">' +
						'regex ' +
						'<button id="set-filter">'+_('Add')+'</button>' +
						'<button id="clear">'+_('Clear all filters')+'</button>' +
						'<div id="confirm" class="hidden">' +
							_('This will clear all filtering rules including hidden posts.')+' <a id="confirm-y" href="#">'+_('yes')+'</a> | <a id="confirm-n" href="#">'+_('no')+'</a>' +
						'</div>' +
					'</div>' +
					'<div id="filter-container"><table id="filter-list"></table></div>'
				);
				drawFilterList();

				// control buttons
				$('#filter-control').on('click', '#set-filter', function () {
					var type = $('#filter-control select option:selected').val();
					var value = $('#filter-control input[type=text]').val();
					var useRegex = $('#filter-control input[type=checkbox]').prop('checked');

					//clear the input form
					$('#filter-control input[type=text]').val('');

					addFilter(type, value, useRegex);
					drawFilterList();
				});
				$('#filter-control').on('click', '#clear', function () {
					$('#filter-control #clear').addClass('hidden');
					$('#filter-control #confirm').removeClass('hidden');
				});
				$('#filter-control').on('click', '#confirm-y', function (e) {
					e.preventDefault();

					$('#filter-control #clear').removeClass('hidden');
					$('#filter-control #confirm').addClass('hidden');
					setList({
						generalFilter: [],
						postFilter: {},
						nextPurge: {},
						lastPurge: timestamp()
					});
					drawFilterList();
				});
				$('#filter-control').on('click', '#confirm-n', function (e) {
					e.preventDefault();

					$('#filter-control #clear').removeClass('hidden');
					$('#filter-control #confirm').addClass('hidden');
				});


				// remove button
				$('#filter-list').on('click', '.del-btn', function (e) {
					e.preventDefault();

					var $ele = $(e.target);
					var type = $ele.data('type');
					var val = $ele.data('val');
					var useRegex = $ele.data('useRegex');

					removeFilter(type, val, useRegex);
				});
			}
		}

		/* 
		 *  clear out pruned threads
		 */
		function purge() {
			var list = getList();
			var board, thread, boardId, threadId;
			var deferred;
			var requestArray = [];

			var successHandler = function (boardId, threadId) {
				return function () {
					// thread still alive, keep it in the list and increase the time between checks.
					var list = getList();
					var thread = list.nextPurge[boardId][threadId];

					thread.timestamp = timestamp();
					thread.interval = Math.floor(thread.interval * 1.5);
					setList(list);
				};
			};
			var errorHandler = function (boardId, threadId) {
				return function (xhr) {
					if (xhr.status == 404) {
						var list = getList();

						delete list.nextPurge[boardId][threadId];
						delete list.postFilter[boardId][threadId];
						if ($.isEmptyObject(list.nextPurge[boardId])) delete list.nextPurge[boardId];
						if ($.isEmptyObject(list.postFilter[boardId])) delete list.postFilter[boardId];
						setList(list);
					}
				};
			};

			if ((timestamp() - list.lastPurge) < 86400)  // less than 1 day
				return;
			
			for (boardId in list.nextPurge) {
				board = list.nextPurge[boardId];
				for (threadId in board) {
					thread = board[threadId];
					if (timestamp() > (thread.timestamp + thread.interval)) {
						// check if thread is pruned
						deferred = $.ajax({
							cache: false,
							url: '/'+ boardId +'/res/'+ threadId +'.json',
							success: successHandler(boardId, threadId),
							error: errorHandler(boardId, threadId)
						});
						requestArray.push(deferred);
					}
				}
			}

			// when all requests complete
			$.when.apply($, requestArray).always(function () {
				var list = getList();
				list.lastPurge = timestamp();
				setList(list);
			});
		}

		function init() {
			if (typeof localStorage.postFilter === 'undefined') {
				localStorage.postFilter = JSON.stringify({
					generalFilter: [],
					postFilter: {},
					nextPurge: {},
					lastPurge: timestamp()
				});
			}

			var pageData = {
				boardId: board_name,  // get the id from the global variable
				localList: [],  // all the blacklisted post IDs or UIDs that apply to the current page
				noReplyList: [],  // any posts that replies to the contents of this list shall be hidden
				hasUID: (document.getElementsByClassName('poster_id').length > 0),
				forcedAnon: ($('th:contains(Name)').length === 0)  // tests by looking for the Name label on the reply form
			};

			initStyle();
			initOptionsPanel();
			initPostMenu(pageData);
			filterPage(pageData);

			// on new posts
			$(document).on('new_post', function (e, post) {
				var threadId;

				if ($(post).hasClass('reply')) {
					threadId = $(post).parents('.thread').attr('id').replace('thread_', '');
				} else {
					threadId = $(post).attr('id').replace('thread_', '');
					post = $(post).children('.op')[0];
				}

				filter(post, threadId, pageData);
				quickToggle(post, threadId, pageData);
			});

			$(document).on('filter_page', function () {
				filterPage(pageData);
			});

			// shift+click on catalog to hide thread
			if (active_page == 'catalog') {
				$(document).on('click', '.mix', function(e) {
					if (e.shiftKey) {
						var threadId = $(this).data('id').toString();
						var postId = threadId;
						blacklist.add.post(pageData.boardId, threadId, postId, false);
					}
				});
			}

			// clear out the old threads
			purge();
		}
		init();
	});
	
	if (typeof window.Menu !== "undefined") {
		$(document).trigger('menu_ready');
	}
}

Mass reply

This is now included in Sharty Fixes

Reply to everyone in a thread.

Expand to view the script

// ==UserScript==
// @name         Mass Reply for soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Mass reply
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
(function () {
  function insert_after(new_node, ref_node) {
    ref_node.parentNode.insertBefore(new_node, ref_node.nextSibling);
  }
  function mass_reply() {
    let form_textarea = document.getElementById('body');
 
    let post_no_nodes = document.getElementsByClassName("post_no");
    for(const node of post_no_nodes) {
      let post_no_text = node.textContent;
      if(!post_no_text.includes("No")) {
        form_textarea.value += `>>${post_no_text}\n`;
      }
    }
    form_textarea.focus();
  }
  
  function add_button() {
    let ref_node = document.querySelectorAll(".op .intro .post_no")[1];
    let button = document.createElement("input");
    button.type = "button";
    button.value = "Mass Reply";
    button.style.marginLeft = "5px";
    button.addEventListener("click", function() {
      mass_reply();
    }, false);
    
    insert_after(button, ref_node);
  }
  
  add_button();
})();

Wojakificator

Wojakificator is a JS script made by a bunkerchan user that automatically quotes any post you want an attaches a soyjak image

The script might work using User JS option, but it is recommended to use a userscript manager like Violentmonkey instead

Source code

Warning: includes some lefty and NAS images

Expand to view the script

Download link

Anti 4channeler posts

Hides posts made by 4channelers.

Warning: Updates the page every 4 seconds to check for new posts, can be adjusted.

Expand to view the script

// ==UserScript==
// @name         Anti 4channeler posts on soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Hides 4channeler posts
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
let posts = document.querySelectorAll('.body');
let replies = document.querySelectorAll(".replies");
keys= [
   "newfag",
   "fag",
   "gem",
   "faggot",
   "new fag",
   "newfren",
   "newfrien",
   "chud",
   "frogposter",
   "nas",
   "kys",
   "killyourself",
   "go back",
   "goback",
   "reddit",
   "kill yourself",
   "hang",
   "coal",
   "reddit frog",
    "frog",
    "what does the reddit",
    "frog has to do with",
     "redditfrog",
     "frogtranny",
"nigger",
    "tranny"
]
function containsNonLatinCodepoints(s) {
    return /[^\u0000-\u00ff]/.test(s);
}
function start_filtering()
{
posts = document.querySelectorAll('.body');
replies = document.querySelectorAll(".replies");
for(let i =0 ; i<posts.length;i++)
{
for(let j=0;j<keys.length;j++)
{
  if(posts[i].innerHTML.toLowerCase().includes(keys[j].toLowerCase()) || containsNonLatinCodepoints(posts[i].innerHTML.toLowerCase()) == true )
{
posts[i].innerHTML= "<span style='color:green;font-weight:bold;font-size:14px;'>[HIDDEN 4channeler post]</span>";
}
}
 
}

for(let i =0 ; i<replies.length;i++)
{
for(let j=0;j<keys.length;j++)
{
  if(replies[i].innerHTML.toLowerCase().includes(keys[j].toLowerCase()))
{
replies[i].innerHTML= "<span style='color:green;font-weight:bold;font-size:14px;'>[HIDDEN 4channeler post]</span>";
}
}
 
}

}

start_filtering();
setInterval(start_filtering,2000);
//Interval


//Gifs hider
document.querySelectorAll("img").forEach(i=>{if(i.src.includes(".gif")){i.src="";}});

Preview for Youtube Videos

Show preview for youtube video links.

Expand to view the script

// ==UserScript==
// @name         YouTube preview for soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Previews YouTube videos
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
(function youtubeInlinePreviews() {

const re = /(?:youtube\.com\/watch\?v=|youtu\.be\/)(.{11})/;

const previewTemplate = (videoId) => `<img

style="max-width:255px;max-height:255px"

src="https://i.ytimg.com/vi/${videoId}/hqdefault.jpg"

/>`;

Array.from(document.querySelectorAll(".body a"))

.filter((link) => link.href.match(re))

.forEach((link) => {

const videoId = link.href.match(re)[1];

const inlinePreview = previewTemplate(videoId);

link.innerHTML = inlinePreview;

});

})();

Filter tripchuds

To use it, change "!!TRIP GOES HERE" to any trip you want to filter (ex: !incelchud1 or !!incelchud1), can also be used to filter names if you change

(/class="trip">!!TRIP GOES HERE</)

to

(/class="name">name of the chudcel you want to filter</)

if you want to filter multiple tripchuds, you have to do this

(/class="trip">!!FIRST TRIP CHUD|!SECOND TRIPCHUD|!THIRD TRIPCHUD</)

Expand to view the script

// ==UserScript==
// @name         Tripfag filter for soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Filters tripfags
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
$(".post")
  .filter(function (index) {
    return this.innerHTML.match(/class="trip">!!TRIP GOES HERE</);
  })
  .each(function (index) {
    let whatToHide = "#" + this.id;
    if (this.id.startsWith("op_")) {
      whatToHide = "#" + this.id.replace("op_", "thread_");
    }
    $(whatToHide).hide();
  });

if (!localStorage.favorites) {
	localStorage.favorites = '[]';
}

Hide tripchud posts from catalog

Hides all tripchud posts from catalog, no exceptions.

Expand to view the script

// ==UserScript==
// @name         Tripfag catalog filter for soyjak.party
// @namespace    datamining
// @version      0.1
// @description  Filters tripfags
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
// --- start: purgeTripsFromCatalog ---

(function purgeTripsFromCatalog() {
  // If on a catalog page
  if (document.location.href.match(/catalog\.html$/)) {
    // Call the API for that page
    fetch(document.location.href.replace(".html", ".json"))
      .then((res) => res.json())
      .then((json) =>
        json
          // Find the threads where OP is using a tripcode
          .reduce((acc, cur) => [...acc, ...cur.threads], [])
          .filter((op) => op.trip)
          // Hide them
          .forEach((filtered) => $(`div[data-id='${filtered.no}']`).hide())
      );
  }
})();

// --- end: purgeTripsFromCatalog ---

Disable gif autoplay

Expand to view the script

// ==UserScript==
// @name     disable gif autoplay
// @version  1
// @grant    none
// @match https://soyjak.party/*
// ==/UserScript==

window.addEventListener('load', function () {
[].slice.apply(document.images).filter(is_gif_image).map(freeze_gif);

function is_gif_image(i) {
    return /^(?!data:).*\.gif/i.test(i.src);
}

function freeze_gif(i) {
    var c = document.createElement('canvas');
    var w = c.width = i.width;
    var h = c.height = i.height;
    c.getContext('2d').drawImage(i, 0, 0, w, h);
    try {
        i.src = c.toDataURL("image/gif");
    } catch(e) {
        for (var j = 0, a; a = i.attributes[j]; j++)
            c.setAttribute(a.name, a.value);
        i.parentNode.replaceChild(c, i);
    }
}
})

Strip jump.kolyma.net Links

NOTE: KolymaNET's jump script automatically blocks harmful websites, such as IP grabbers. Use this script at your own risk.

>umm it doesn't work i can still see the link when i hover over it even doe it strips it on click so it does work actually

Expand to view the script.

// ==UserScript==
// @name         Kolyma jump stripper
// @namespace    datamining
// @version      1.0
// @description  Strips Kolyma jump links from soyjak.party
// @author       Chud (You)
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
function strip(e) {
  if (!!e.target.href) {
    e.target.href = decodeURIComponent(e.target.href.replace("https://jump.kolyma.net/?", ""));
  }
}

document.addEventListener("click", e => strip(e));
document.addEventListener("auxclick", e => strip(e));

Ratio script

adds a [ratio] button that starts posting automated replies from a selection of 4 types: "generic","cob","trans" and "chud". perfect for shitposting

(feel free to add more quotes to the code, the "chud" one is very incomplete)

// ==UserScript==
// @name        Sharty Ratio
// @namespace   soyjak.party
// @match       http*://soyjak.party/*
// @version     1.0
// @author      God Tier Wojack
// @description Ratio that nigga
// ==/UserScript==
const modifiers = ["==", "%%", "--", "'", ""];
let done = new Array(20);
let stringSets = {
  "Generic": ["holy shit", "holy shiiiit", "holy fuck", "holy fuck.", "fuckin hell", "holy fuckk", "holy fuckkk", "holy fuckkkk", "lfg", "lfggg", "lfgggg", "lfg!", "lfg!!", "lfgg!!!", "w", "dub", "massive w", "huge w", "gigantic w", "massive dub", "huge dub", "another dub", "another w", "gigantic w", "get his ass", "get that nigga", "lets fucking go", "lets fucking gooo", "lets fucking goooo", "lets fucking goooo", "lets fucking go!", "lets fucking go!!", "lets fucking go!!!", "lets fucking go!!!!!", "yo get his ass", "yo get em", "yooo", "yoooo", "yooooooo", "yoooooooooooo", "god damn", "got damn", "god damnnn", "damnnnnn", "own that fraud", "expose that fraud", "lets gooo", "lets gooooo", "let's goooooo", "keyed", "keyed af", "holy keyed", "gem", "massive gem", "gemerald", "wem", "huge gem", "gigantic gem", "sharty saving gem", "diamond", "sharty saving diamond", "up", "go up", "go the fuck up", "up up up", "go tf up", "'chup", "own that fraud", "get they ass", "beat his ass", "kill that nigga", "can't stop winning", "we cant stop winning bros", "diamonderald", "btfo", "eternally btfo", "zamn", "zamnnn", "holy based", "based af"],
  "Cob": ["another cob w", "#cobgang", "another gemson victory", "gemson win", "gemson victory", "gemson up", "god tier wojack", "gem tier godjack", "cobby up", "cobby go up", "godson up", "upson", "keyedson", "winson", "cob w", "cob dub", "cobby win", "#cobgang win", "#cobgang victory", "hwabag", "god tier winjack", "diamondson go up", "winson up", "gemson go up", "godson go up", "gemson dub", "gemson w", "godson dub", "godson w", "#cobgang dub", "#cobgang w", "cobwin", "he won", "he fucking won", "he cant stop winning"],
  "Trans": ["trans rights", "trans fucking rights", "trans rights won", "sisters...", "trans rights w", "trans rights dub", "trans folx won", "w trans rights", "trans rights go up", "transphobes btfo", "transphobes destroyed", "trans rights victory", "w for trans rights", "trans victory", "transerald", "trans diamond", "bump up the trans", "uptrans", "sisters go up", "upsis", "trans top", "estrogem", "estrogemerald", "bumpstrogen", "topstrogen", "winstrogen"],
   "chud":["1488","fuck niggers","kill all blacks","kanye 2024","dial eight","-ACK!","sieg heil!","jews","media is kiked","goyslop","hang yourself troon","the west has fallen","back to /leftypol/","amerimutt","women are made for rape"]
}
let targetPosts = [];
let sets = [stringSets["Generic"]];
setInterval(() => {
  document.querySelectorAll(".button.alert_button").forEach(e => e.click());
  if (targetPosts.length == 0 || sets.length == 0) {
    return;
  }
  let post = "";
  targetPosts.forEach(p => post += `>>${p}\n`);
  let effect = "";
  if (Math.random() > 0.5) {
    effect = modifiers[Math.floor(Math.random() * modifiers.length)];
  }
  post += effect;
  let strings = sets.flat();
  stringsLength = strings.length;
  let found = false;
  while (!found) {
    text = strings[(Math.floor(Math.random() * stringsLength))];
    if (!done.includes(text)) {
      if (Math.random() > 0.5) {
        text = text.toUpperCase();
      }
      post += text;
      found = true;
      done.unshift(text);
      done.pop();
    }
  }
  post += effect;
  document.querySelector("form[name=post] textarea#body").value = post;
  document.querySelector("form[name=post] input[value*='Reply']").click();
}, 12000);
function addRatioButton(post) {
  post.querySelector(".intro").insertAdjacentHTML("beforeend", `<a href="javascript:void(0);" class="ratio" postNumber="${post.getElementsByClassName("post_no")[1].textContent}">[Ratio]</a>`);
}
let options = Options.add_tab("ratio", "gear", "Ratio").content[0];
let optionsHTML = "";
for ([key, value] of Object.entries(stringSets)) {
  optionsHTML += `<input type="checkbox" id="ratio-${key}" name="${key}"><label for="ratio-${key}">${key}</label><br>`;
}
options.insertAdjacentHTML("beforeend", optionsHTML);
options.querySelectorAll("input[type=checkbox]").forEach(e => {
  e.addEventListener("change", e => {
    sets = [];
    options.querySelectorAll("input[type=checkbox]:checked").forEach(c => sets.push(stringSets[c.getAttribute("name")]));
  });
  e.checked = e.getAttribute("name") == "Generic";
});
const updateObserver = new MutationObserver(list => {
  list.forEach(node => {
    if (node.addedNodes[0].nodeName == "DIV") {
      addRatioButton(node.addedNodes[0]);
    }
  });
});
updateObserver.observe(document.querySelector(".thread"), {
  childList: true
});
[...document.getElementsByClassName("post")].forEach(e => {
  addRatioButton(e);
});
document.addEventListener("click", e => {
  let t = e.target;
  if (t.classList.contains("ratio")) {
    if (t.textContent == "[Ratio]") {
      t.textContent = "[Unratio]";
      targetPosts.push(t.getAttribute("postNumber"));
    } else {
      targetPosts = targetPosts.filter(p => p != t.getAttribute("postNumber"));
      t.textContent = "[Ratio]";
    }
  }
});


CSS

In addition to user JS, soyjak.party also offers an option to customize user CSS.

Many CSS styles can be found on https://github.com/vichan-devel/vichan/tree/master/stylesheets , and https://github.com/lainchan/lainchan/tree/master/stylesheets .

Custom underwater theme

The underwater theme in use

Adds marine life to your browsing experience

firstly, add this to your User CSS

Expand to view the script

/**
 * miku.css
 * For AwsumChan by Circlepuller
 */
body {
background: #D2FFEE url('img/fade-miku.png') top repeat-x;
}

a:link, a:visited {
text-decoration: none;
color: #00637B;
}

a:link:hover, a:visited:hover {
color: #DD0000;
}

a.post_no {
color: #000033;
}

.intro a.email span.name {
color: #0093AB;
}

.intro a.email:hover span.name {
color: #DD0000;
}

h2, div.title, h1 {
color: #800000;
}

form table tr th {
background: #95D2D3;
}

div.banner {
background-color: #E04000;
}

div.post.op hr {
border-color: #B7C9D5;
}

.intro span.subject {
color: #117743;
font-weight: 800;
}

.intro span.name {
color: #117743;
font-weight: 800;
}

div.post.reply.highlighted {
background: #a9d8ff;
}

div.post.reply {
background: #B6DDDE;
border-color: #8FCCCD;
}

div.ban {
border: 1px solid #0093AB;
}

div.ban h2 {
background: #B6DDDE;
color: #0093AB;
}

div.pages {
color: #8899AA;
background: #B6DDDE;
border-right: 1px solid #8FCCCD;
border-bottom: 1px solid #8FCCCD;
}

hr {
border-color: #B7D9C5;
}

div.boardlist {
color: #0093AB;
    background-color: rgba(65%, 85%, 95%, 0.2);
}

.desktop-style div.boardlist:nth-child(1) {
  text-shadow: #D2FFEE 1px 1px 1px, #D2FFEE -1px -1px 1px;
}
* {
   background-image: url('https://files.catbox.moe/hp03xs.png');
}

.soifish {
   background-image: url('https://files.catbox.moe/rxmvyr.png');
   position: fixed;
    pointer-events: none;
  -webkit-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  -moz-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  -o-animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
  animation: moveX 30s linear 0s infinite alternate, moveY 30s linear 0s infinite alternate;
}

@-webkit-keyframes moveX {
  from { left: 0; } to { left: 100%; }
}
@-moz-keyframes moveX {
  from { left: 0; } to { left: 100%; }
}
@-o-keyframes moveX {
  from { left: 0; } to { left: 100%; }
}
@keyframes moveX {
  from { left: 0; } to { left: 100%; }
}

@-webkit-keyframes moveY {
  from { top: 0; } to { top: 100%; }
}
@-moz-keyframes moveY {
  from { top: 0; } to { top: 100%; }
}
@-o-keyframes moveY {
  from { top: 0; } to { top: 100%; }
}
@keyframes moveY {
  from { top: 0; } to { top: 100%; }
}



.post.reply .body a:hover:after {
    content: url(https://soyjak.download/f.php?h=0lnyi5TW&p=1);
    display: block;
    position: absolute;
    left: 20px;
    top: -255px;
    pointer-events: none;
    z-index: 999;
}

.post.reply .body a:hover {
    position: relative;
}

body:after {
    content: url(https://soyjak.download/f.php?h=3EFSgyRY&p=1);
    display: block;
    position: fixed;
    bottom: 0px;
    right: 0px;
    pointer-events: none;

.desktop-style div.boardlist:nth-child(1):hover, .desktop-style div.boardlist:nth-child(1).cb-menu {
  background-color: rgba(70%, 95%, 100%, 0.45);
}

Then add this to your User JS or Tampermonkey

// ==UserScript==
// @name         JS for Ocean Theme
// @namespace    datamining
// @version      0.1
// @description  Glub Glub Glub Glub
// @author       Glub
// @match        https://soyjak.party/*
// @icon         https://soyjak.party/static/favicon.png
// @grant        none
// ==/UserScript==
var soislug = document.createElement("img");
soislug.setAttribute('src', 'https://files.catbox.moe/vpoeyt.png');
soislug.setAttribute('class', 'soislug');
document.getElementsByClassName("8chan")[0].appendChild(soislug);
var soifish = document.createElement("img");
soifish.setAttribute('src', 'https://files.catbox.moe/rxmvyr.png');
soifish.setAttribute('class', 'soifish');
document.getElementsByClassName("8chan")[0].appendChild(soifish);

Custom Soot theme

Soot color scheme (grey and yellow) theme, this css should be used with dark style.

Expand to view the script

/*soot theme*/

.name {
    color: #FDD73A !important;
}

body {
    background: black url(https://i.imgur.com/FeQmhfL.png) right bottom no-repeat fixed;
}

div.post.reply {
    background-color: #646464 !important;
    color: black;
    border-radius:0;
}

div#post-moderation-fields , div#style-select {
    padding:4px;
    background-color:rgba(0,0,0,28);
}

span.heading {
    color: #FF565C !important;
}

.remove-btn {
    color: rgba(255,255,255,128) !important;
}

hr {
    border-color:transparent;
}

Anti - mass reply

.post.reply > .body {
    max-height: 20em;
    overflow-y: auto;
}

Cobson in the corner

This code was briefly added to soyjak.party and is being left here for posterity.

Expand to view the script

body { background-image: url(https://soyjak.party/cob3.png); background-position: bottom right; background-repeat: no-repeat; background-attachment: fixed;   background-size: 100px; }

Classic UI

Change the name color back to green

.intro span.name {
  color: #117743;
  font-weight: bold;
}
.intro span.trip {
  color: #228854;
 font-weight: normal;
}

You can also add this if you wish to remove the visible "SAGE!" message

a[href^='mailto:sage']::after {
  content: ' SAGE!';
  text-decoration: none;
  display: none;
}

Christmas Hats

[data-board] > .files > :nth-child(1):not(.multifile) > a:before {
	content: url('https://s.kncdn.org/image/hat2.gif');
	float: left;
	display: block;
	margin-right: -160px;
	position: relative;
	top: -120px;
	left: -30px;
	
}
[data-board] > .files > :nth-child(1).multifile > a:before {
	content: url('https://s.kncdn.org/image/hat2.gif');
	float: left;
	display: block;
	margin-right: -160px;
	position: relative;
	top: -120px;
	left: -50px;
	
}

FUCK ONGEZELLIG SUITE (FOS)

removes the coal NAS ongezellig banner

img[src="https://soyjak.party/static/banner/45.png"] {

padding: 100px 300px 0px 0px;

background: url('https://soyjak.party/static/banner/1.png');

background-size: 300px 100px;

width: 0px;

height: 0px;

}