Skip to content

Instantly share code, notes, and snippets.

Ben Fortune xbenjii

Block or report user

Report or block xbenjii

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xbenjii
xbenjii / podio_calendar_enable.user.js
Created Oct 19, 2018
Enable podio calendar past 6 months
View podio_calendar_enable.user.js
// ==UserScript==
// @name Podio Re-enable calendar
// @namespace https://www.prestigegifting.co.uk
// @version 0.1
// @description Podio has limited the calendar to 6 months, this re-enables it.
// @author Benjamin Fortune <ben@prestigegifting.co.uk>
// @match https://podio.com/calendar
// @grant none
// ==/UserScript==
View easy-trash.es6.js
const parseNode = (node) => {
if( node.classList && node.classList.contains('user-container') ) {
let meta = node.querySelectorAll('.meta');
[].forEach.call(meta,m=>{
let del = document.createElement('span');
del.textContent = 'x';
del.classList.add('vote-count-container');
del.style.cursor = 'pointer';
del.onclick = function() { // fuck you I want `this`
let id = this.parentNode.parentNode.id.split('-')[1];
View browser.js
// fW+NNwPWJCU5rMf3YZk6pwoFYY5CbwSbds3ZKjeDySwIcSouJ5G1qOn/jceAZry4+EeXjwNb1m+T/U8kecXpZ1U4HY46Mu3YYDsiMqjHNTZXThp5cMpAclX3MkBqEgEfllC8l7rajcrBkeo65joj10w2oI+8mFJ8S1MWnxQOP/IOZzl+OI7/Rr0HdwZ7LhilLc81RW0EbyTljX+7jRtLYQnzaC3NA8llhPTv74dPFfAYLw30/ntojO3tyUHJoTHKxLr+9+6xGJODSU7RCfRU6s4zw3OgBXX1XxFTlhhHC1DIhOZf1b1vxn6EsTOLX3wKShcEJSHbcz9BvI06hAp8vw==
/**
** Copyright (C) 2000-2015 Opera Software AS. All rights reserved.
**
** This file is part of the Opera web browser.
**
** This script patches sites to work better with Opera
** For more information see http://www.opera.com/docs/browserjs/
**
** If you have comments on these patches (for example if you are the webmaster
@xbenjii
xbenjii / TinyEE.js
Created Feb 6, 2017
Tiny Event Emitter
View TinyEE.js
/**
* TinyEE - A tiny event emitter using Map.
*/
class TinyEE {
constructor() {
// Where we will store the events
this.events = new Map();
}
on(eventName, action) {
if(typeof action !== 'function') {
View qry.js
import { createSocket } from 'dgram'
import { lookup } from 'dns';
const IPRe = /^\d+\.\d+\.\d+\.\d+$/;
const IPPortRe = /^\d+\.\d+\.\d+\.\d+\:\d+$/;
class Qry {
constructor(options) {
this.options = Object.assign({
bindAddress: 1337
View tabReply.js
const input = $('#input');
const yourName = $('#active-user .avatar img').attr('title').replace(/\s/g,"");
const mention = `@${yourName}`;
$(document).on('keydown', (e) => {
if(e.which === 9) {
if($('#autocomplete').children().length) {
return false;
}
e.preventDefault();
View gist:c7b6bdc618bd19852b5c
fs.readdir(`./plugins`, (err, plugins) => {
if(err) {
console.log(`Error reading plugins folder: ${err}`);
}
webview.addEventListener('did-navigate', (event) => {
plugins.forEach((plugin) => {
const pluginSettings = require(`../plugins/${plugin}/settings.json`);
fs.readFile(`./plugins/${plugin}/plugin.js`, 'utf8', (err, code) => {
if(err) {
console.log(`Error loading plugin (${plugin}): ${err}`);
You can’t perform that action at this time.