Skip to content

Instantly share code, notes, and snippets.

@rb-cohen
Last active February 26, 2016 09:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rb-cohen/b783dabaf62e385ad8af to your computer and use it in GitHub Desktop.
Add more colors to the campaign monitor color picker using tampermonkey
// ==UserScript==
// @name Update color palette in Campaign Monitor
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Inject colours into the Campaign Monitor colour picker
// @author Arron Woods <me@arronwoods.com>
// @match http*://*.createsend.com/campaigns/content/edit/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
// ##############
// INSTRUCTIONS
// ##############
//
// 1. Install the "tampermonkey" chrome extension (might work with greasemonkey on Firefox)
// 2. Add this script to your list of scripts in the extension
// 3. Make sure the "@match" line above matches your campaign monitor URL, we use .createsend.com
// 4. Edit the colors in the array below, by default these colors are appended to the existing colors
// (set replace to true to overwrite existing colors)
// 5. Log in to campaign monitor and enjoy your new colors
$(function(){
var replace = false;
var colors = [
'510c5d', //purple
'41aaaf', //green
'eb008b', // pink
'db0934', // red
'00adee', // blue
'e9e8e8', // grey
'df6503', // orange
'009345', // leaf green
'135a97' // navy
];
if(replace){
CKEDITOR.config.colorButton_colors = colors.join(',');
} else {
CKEDITOR.config.colorButton_colors += ',' + colors.join(',');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment