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 reddit expand on scroll
// @version 0.4
// @require https://raw.githubusercontent.com/vvo/in-viewport/46aa0be7cb688613213b16693d4501b61071d45e/build/in-viewport.min.js
// @author Creesch
// @match https://new.reddit.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
TB.listener.on('post', function(e) {
const $target = $(e.target);
const $post = $target.closest('.scrollerItem');
$post.find('[data-click-id="expando_open"]').click();
});
let storage = {
posts: {},
subreddits: {},
comments: {}
}
function addThingReference(type, thing, parentType, parentIdentifier) {
if(type === 'post') {
if(!storage.post.hasOwnProperty(parentIdentifier)) {
function handleEvent(e) {
console.log(e);
}
const readyEvent = new CustomEvent('reddit.ready', {
detail: {
name: 'fakeConsumer'
}
});
self.register_setting('removeRemoveConfirmation', {
'type': 'boolean',
'default': false,
'advanced': true,
'title': 'Remove remove/approve confirmation when removing items.'
});
@creesch
creesch / config.js
Created September 29, 2017 09:43
Modmail discord feed
global.configuration = {
DEBUG: true,
modmailChannelWebhook: 'webhook url goes here',
// States go here, colors are hex colors with # replaced with 0x
modmailStates: [
{
'state': 'mod',
'color': '0x46d160',
'subreddits': 'history'
},{
FAQ:
# Can you add an off-topic/random channel?
No, this is a server to talk about history. There are plenty Discord servers to talk about whatever you like.
# Can you add a history related channel about X?
Send a mod mail to /r/history_discord and we'll review that request.
# What does it mean if I'm placed in time-out?
We sometimes give people time-outs (also known as mutes) to discuss their breaking of the rules. That means they'll be placed in a separate channel for a while. It's so we don't clog up the other channels, and gives users and mods alike a chance to discuss, without us having to resort to bans immediately.
@creesch
creesch / file1.txt
Created March 26, 2017 20:22
the description for this gist
String file contents
@creesch
creesch / config.js
Last active February 4, 2021 15:28
Basic discord reddit announcer using a webhook.
global.lemmingPrefs = {
redditConfig: {
userAgent: '/u/yourname and description of what this does.',
oauth: {
type: 'script',
key: '<KEY>',
secret: '<SECRET>',
username: '<REDDIT USERNAME>',
password: '<REDDIT PASSWORD>',
// make sure to set all the scopes you need.
// ==UserScript==
// @name discordColorNicknames
// @version 0.4
// @description Will give people talking in discord nicely colored nicknames. Also colors mentions.
// @author Creesch
// @match http://*.discordapp.com/*
// @match https://*.discordapp.com/*
// @include http://*.discordapp.com/*
// @include https://*.discordapp.com/*
// @grant none