Skip to content

Instantly share code, notes, and snippets.

View stijnherreman's full-sized avatar

Stijn Herreman stijnherreman

View GitHub Profile
@stijnherreman
stijnherreman / StackTopReorder
Created February 22, 2017 11:57
Based on the Chrome extension of Travis J at http://meta.stackoverflow.com/a/344231/247702
// ==UserScript==
// @name StackTopReorder
// @description A top bar in a different order.
// @namespace TravisJ
// @author TravisJ
// @license GNU GPL v3 (http://www.gnu.org/copyleft/gpl.html)
// @include http://meta.stackoverflow.com/*
// @include http://stackoverflow.com/*
// @include *.stackexchange.com/*
// @grant GM_addStyle
(function(){
var separateThousands = function(n) {
var s = String(n);
s = s.replace(/[1-9][0-9]*/, function(match) {
var r = "";
for (var i = 0; i < match.length; i++) {
r = match[match.length - 1 - i] + r;
if (i % 3 == 2 && i < match.length - 1) {
r = "," + r;
}
@stijnherreman
stijnherreman / gist:6316394
Created August 23, 2013 07:13
CKEditor typings
declare module CKEditor
{
interface CKEDITOR
{
config: config;
editor: editor;
instances: { [name: string]: editor }
replaceAll(): void;
replaceAll(className: string): void;