Last active
January 3, 2016 05:09
-
-
Save j0rdsta/8413448 to your computer and use it in GitHub Desktop.
Basecamp Classic Auto Signature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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