Skip to content

Instantly share code, notes, and snippets.

View creesch's full-sized avatar
💭
I am not actually sure...

creesch creesch

💭
I am not actually sure...
View GitHub Profile
// ==UserScript==
// @name discorbullshit
// @version 0.3
// @description try to take over the world!
// @author Creesch
// @match http://*.discordapp.com/*
// @match https://*.discordapp.com/*
// @include http://*.discordapp.com/*
// @include https://*.discordapp.com/*
// @grant none
//META{"name":"properUsernames"}*//
function clean_nick(nick) {
// attempts to clean up a nickname
// by removing alternate characters from the end
// nc_ becomes nc, avidal` becomes avidal
nick = nick.toLowerCase();
// typically ` and _ are used on the end alone
<!--
This is the entire html structure needed in order to trigger toolbox buttons.
Most of it should work smoothly but there might be some styling issues for obvious reasons.
-->
<div class="thing color-processed" data-subreddit="history" data-author="noeatnosleep">
<div class="entry mod-button" subreddit="history">
<span class="subreddit" style="display:none">history</span>
<span class="author user" style="display:none">noeatnosleep</span>
<a class="bylink" style="display:none" href="https://orangechat.io/#/r/history">channel link</a>
<a href="javascript:;" title="Perform various mod actions on this user" class="global-mod-button">mod</a><br>
@creesch
creesch / config.js
Created October 15, 2015 08:07
Very much W.I.P. probably will need a bit of refactoring here and there.
global.lemmingPrefs = {
ircConfig : {
channels: ['#channel', '#channel2'],
// snoonet requires bots to be registered as a bot
server: 'irc.snoonet.org',
botName: 'this is a bot',
botAuthPassword: 'password'
},
redditConfig: {
// Chunking abused for ratelimiting
TBUtils.forEachChunkedRateLimit = function (array, chunkSize, call, complete, start) {
if (array === null) finish();
if (chunkSize === null || chunkSize < 1) finish();
if (call === null) finish();
var counter = 0;
//var length = array.length;
function doChunk() {
@echo off
echo Activating SDK...
call addon-sdk\bin\activate.bat
echo.
echo Building extension...
call cfx xpi --force-mobile
echo.
function tbConfig() {
//Setup
var tbconfig = new TB.Module('Toolbox Config');
tbconfig.shortname = 'TBConfig'; // for backwards compatibility
//Default settings
tbconfig.settings['enabled']['default'] = true;
tbconfig.init = function () {
.md {
max-width: 60em;
}
.md .-headers,.md h1,.md h2,.md h3,.md h4,.md h5,.md h6 {
border: 0;
-webkit-font-smoothing: antialiased;
}
.md .-headers code,.md h1 code,.md h2 code,.md h3 code,.md h4 code,.md h5 code,.md h6 code {
body:not(.moderator) .thing.deleted.comment>.entry>.tagline>time {
display: none;
}
body:not(.moderator) .thing.deleted.comment>.entry {
padding: 0 !important;
margin: 0 !important;
height: 12px;
}
.side .md h5:nth-of-type(1) {
position: absolute;
display: inline-block;
padding: 0;
top: 36px;
left: 291px;
text-align: left;
width: auto;
overflow: hidden;
z-index: 99;