Useful UserScripts / CSS tweaks etc..
#15058
Post your favorite Userscripts for tampermonkey or CSS tweaks or themes for Stylus here.
Similar to the Flashii Chat Userscripts thread but for any other website.

Today I made this userscript to remove the Aliexpress results from the google shopping search page. If I want to find a product on Aliexpress I'll simply search Aliexpress. I mostly use the Google shopping search to find local sellers lol.
// ==UserScript==
// @name        No more Aliexpress
// @namespace   Violentmonkey Scripts
// @match       https://www.google.com/search
// @grant       none
// @author      geb
// @description Removes Aliexpress results in the google shopping search.  23/06/2023, 18:18:02
// ==/UserScript==
"use strict";
let isShopping = Array.from(document.querySelectorAll("div")).find(el => el.textContent === "Product rating");

function removeAli() {
  let spans = Array.from(document.querySelectorAll("span")).filter(el => el.textContent === ". Visit site of AliExpress.com in a new window");
  spans.forEach(element => element.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove())
  console.log(`Removed ${spans.length} Aliexpress listings!`)
};

window.onload = (event) => {
  if(typeof isShopping !== "undefined") {
    removeAli();
  }
};


Here's also a script that replaces all the TinyPic "Image not found :(" images with a trollface.
// ==UserScript==
// @name        TinyPic Image replacer
// @namespace   Violentmonkey Scripts
// @match       *://*/*
// @grant       none
// @version     2.0
// @author      geb
// @description replaces the shitty tinypic missing image with something better.
// ==/UserScript==
document.querySelectorAll('img[src*=tinypic]').forEach(x=>{x.src = 'https://cockdickball.in/media/tinypic.png';});


Feel free to share your own favorites. Whether you made them yourself or not.
https://cockdickball.in/media/button.gif
#15059
By the way Flash I posted this in "General" and not in "Software Development" cuz sharing and also more ppl look here prolly
https://cockdickball.in/media/button.gif
#15060
oh boy do i

Userscripts


I have 70 usescripts installed total, however most of them are personal, throwaways, and tweaks not worth publishing. However, here is a bunch of ones worth showing.

Image Max URL - probably the most useful on this list. Automatically redirects images to their higher res versions. Very nice for quickly grabbing origs off twitter, and neat in general.
Simple YouTube Age Restriction Bypass - I don't have [access to] a Google account.
Youtube Disable Shorts - redirects yt shorts to their actual pages.
Bring Back Old Reddit - only way to make reddit search results (which are sadly becoming the only search results worth a damn) worth a damn. Redirects to old UI.
Unpremium for Pixiv - for blocking users and posts on Pixiv, for free! Really should get around to fixing some old (and new) bugs and publishing it.

CSS


I think this is all you need in life:
* {
    font-family: "MS PGothic" !important;
}

but i also have
.r-sdzlij, img.actioned-user-profile-img, .Tweet-avatar{
border-radius: 5px;
}
for twitter, thanks flash
#15063
I like using this userscript to always load the original images on twiter and get a direct link to a video for when I'm too lazy to use youtube-dl: View Twitter Origin Images

For marktplaats.nl en 2dehands.be I have a small CSS edit to allow you to actually right click and advertisements images to save or copy them:
.carousel img {
    pointer-events:all !important;
}
https://cockdickball.in/media/button.gif
#15716
It seems like Aliexpress has shoved a new website theme into my face. I don't really mind the new layout but I really dislike the shopping cart that is always open on the right of your screen. Here's a small little CSS tweak to remove it.

/* ==UserStyle==
@name           aliexpress.com shopping cart removal
@namespace      github.com/openstyles/stylus
@version        1.0.0
@description    dropkicks the right side shopping cart
@author         geb
==/UserStyle== */

@-moz-document domain("aliexpress.com") {
    #sidecart {
        display:none !important;   
    }
    
    .unfoldShopCart .pdp-page-wrap {
        padding:0px !important;
    }
    
    .pdp-wrap {
        max-width:none !important;
    }
    
    .unfoldShopCart .pc-header--fullContainer--2Fazi-Y {
        padding: 16px 48px 0 !important;
    }
    
    .unfoldShopCart #root {
        margin-right: 0px !important;
    }
    
    .down-load-app--menuItem--3FNru0r {
        display:none !important;
    }
    
    .unfoldShopCart * {
        margin-right:0px !important;
    }
    
}


Before: //i.fii.moe/i3TCFmo06t33hsYHGe5X9b1ASfCcaDPX
After: //i.fii.moe/dWj1e6UlMs-t0JPZzk2O7AYegacD3KA-
https://cockdickball.in/media/button.gif
#15717
lmfao literally a carbon copy of amazon
https://sig.flash.moe/signature.png
#15770
Got fed up with the new UI and found a cookie tweak that gives you back the old one. https://github.com/AndShy/Ali-Total-Price/issues/17 the userscript from that github page seems cool as well.
https://cockdickball.in/media/button.gif
#15909

.sidebar {
    box-shadow: none !important;
    margin: 0 !important;
}

.sidebar__menus {
	background: #2b2d31 !important;
    margin: 0 !important;
}

.sidebar__selector {
	background: #1e1f22 !important;
    margin: 0 !important;
    width: 2.5em !important;
}

.sidebar__selector-top, .sidebar__selector-bottom {
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: center !important;
}

.sidebar__selector-mode {
    margin: 0.2em !important;
}

.chat {
    background: #313338 !important;
    scrollbar-width: none !important;
    margin: 0 !important;
    box-shadow: none !important;
    padding-bottom: 1em !important;
}

.umi {
    background: #313338 !important;
}

.sidebar__user {
    background: #2b2d31 !important;
    margin: 0.6em 0.8em 0.6em 0.8em !important;
}

.sidebar__user-avatar, .message__avatar {
    border-radius: 50% !important;
}

.message {
    border: none !important;
    margin-right: 2em !important;
    margin-left: 1em !important;
    margin-bottom: 0.3em !important; 
}

.message--first {
    margin-top: 1em !important;
}

.message__container {
    margin-left: 0.8em !important;
}

.input {
    margin: 1em !important;
    padding: 0.4em !important;
    border-radius: 1em !important;
}

.input__main, .input, .input__menus, .input__text, .input__button {
    box-shadow: none !important;
    background: #383a40 !important;
    border: none !important;
}

.input__text {
    margin: 1em !important;
    margin-left: 4em !important;
    align-items: center !important;
}

.input__main::after {
    content: "+" !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    color: #383a40 !important;
    font-size: 1.5em !important;
    font-weight: bold !important;
    position: absolute !important;
    width: 1.3em !important;
    height: 1.3em !important;
    transform: translateX(-50%) translateY(-50%);
    left: 1.7em !important;
    top: 50% !important;
    background: #b5bac1 !important;
    border-radius: 50% !important;
}


sockchat but awesome
https://saikuru.net/sig
#18185
I stole and repackaged a bit of code to force YouTube videos to mono, because i found a series of badly panned videos. Enjoy! It uses run-at context-menu, which means that to enable it you have to select the script from the context menu. Definitely undertested, but seems to work.
// ==UserScript==
// @name         Force mono audio
// @namespace    http://tampermonkey.net/
// @version      2024-08-12
// @description  try to take over the world!
// @author       You
// @match        https://www.youtube.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=youtube.com
// @grant        none
// @run-at       context-menu
// ==/UserScript==

(function() {
    'use strict';
	var context = new AudioContext()
	var audioElement = context.createMediaElementSource(document.querySelector("video"))
	context.destination.channelCount = 1
	audioElement.connect(context.destination)
})();