old_contents: // ==UserScript==
  // @name        AIM Enhanced
  // @description Improves posting on AIM. Adds partial markdown support and other fun stuff.
  // @namespace   notareal@em.ail
  // @include     http://aimgames.forummotion.com/post
  // @include     http://aimgames.forummotion.com/post*
  // @version     0.4
  // @grant       GM_addStyle
  // @license     MIT License (Expat); opensource.org/licenses/MIT
  // ==/UserScript==
  
  'use strict';
  
  // custom code styles
  const style = `<style type="text/css">
  pre {
      max-height: 200px;
      overflow: auto;
      /**/
      color: #ff6913;
      font-family: Courier,"Courier New","Source Code Pro",monospace;
      font-size: 11px;
      /* box */
      background-color: #000;
      border: solid 1px #1c1c1c;
      margin: 0;
      /* possibly? */
      margin-left: 60px;
  }
  /* inline code, shit that isnt deprecated in html5 */
  samp {
      color: #ff6913;
      font-family: Courier,"Courier New","Source Code Pro",monospace;
  }
  </style>`;
  
  const styleMin = style
    .replace(/^\s+/gm, '') // remove whitespace
    .replace(/(\r\n|\n)/g, '') // remove newlines
    .replace(/\/\*([^]+?)\*\//g, ''); // remove comments
  
  // add style to the beginning of every post
  const textArea = document.getElementById('text_editor_textarea');
  if (textArea) {
    textArea.value = styleMin + '\n' + textArea.value;
  }
  
  $(document).on('keydown', function(e) {
    if (e.which == 13) { // key is 'enter'
      textArea.value = textArea.value
        .replace(/\[cd\]([^]+?)\[\/cd\]/g, '<pre>$1</pre>')
        .replace(/`([^]+?)`/g, '<samp>$1</samp>');
    }
  });
  
new_contents: // ==UserScript==
  // @name        AIM Enhanced
  // @description Improves posting on AIM. Adds partial markdown support and other fun stuff.
  // @namespace   notareal@em.ail
  // @include     http://aimgames.forummotion.com/post
  // @include     http://aimgames.forummotion.com/post*
  // @version     0.5
  // @grant       GM_addStyle
  // @license     MIT License (Expat); opensource.org/licenses/MIT
  // ==/UserScript==
  
  'use strict';
  
  // custom code styles
  const style = `<style type="text/css">
  pre {
      max-height: 200px;
      overflow: auto;
      /**/
      color: #ff6913;
      font-family: Courier,"Courier New","Source Code Pro",monospace;
      font-size: 11px;
      /* box */
      background-color: #000;
      border: solid 1px #1c1c1c;
      margin: 0;
      /* possibly? */
      margin-left: 60px;
  }
  /* inline code, shit that isnt deprecated in html5 */
  samp {
      color: #ff6913;
      font-family: Courier,"Courier New","Source Code Pro",monospace;
  }
  </style>`;
  
  const styleMin = style
    .replace(/^\s+/gm, '') // remove whitespace
    .replace(/(\r\n|\n)/g, '') // remove newlines
    .replace(/\/\*([^]+?)\*\//g, ''); // remove comments
  
  // add style to the beginning of every post
  const textArea = document.getElementById('text_editor_textarea');
  if (textArea) {
    textArea.value = styleMin + '\n' + textArea.value;
  }
  
  window.jQuery(document).on('keydown', function(e) {
    if (e.which == 13) { // key is 'enter'
      textArea.value = textArea.value
        .replace(/\[cd\]([^]+?)\[\/cd\]/g, '<pre>$1</pre>')
        .replace(/`([^]+?)`/g, '<samp>$1</samp>');
    }
  });
  
subject: fix jQuery