Skip to content

Instantly share code, notes, and snippets.

@j0rdsta
Last active January 3, 2016 05:09
Show Gist options
  • Save j0rdsta/8413448 to your computer and use it in GitHub Desktop.
Save j0rdsta/8413448 to your computer and use it in GitHub Desktop.
Basecamp Classic Auto Signature
// ==UserScript==
// @name Basecamp Classic Auto Signature
// @namespace https://gist.github.com/j0rdsta/8413448
// @version 0.1.2
// @description Automatically appends signature to Basecamp Classic textbox
// @match https://*.basecamphq.com/*
// @copyright 2014+, Jordan Gardiner
// ==/UserScript==
var selector = document.getElementById("comment_body_editor");
// Change me!
var greeting = "Cheers";
var name = "Jordan Gardiner";
(function(){
var tId = setInterval(function(){if(document.readyState == "complete") onComplete()},11);
function onComplete(){
clearInterval(tId);
if(selector.innerHTML.indexOf(name) <= -1) {
selector.innerHTML = selector.innerHTML + greeting + ",<br>" + name;
}
};
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment