This file contains 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
base_url = 'http://nymkit.com/generators/chatterbots/gort/' | |
module.exports = (robot) -> | |
robot.catchAll (msg) -> | |
if msg.message.text.match(/\bgort\b/i) or msg.message.text.match(/\n/) | |
# When addressed, I'll pull something out of my... sock | |
# drawer. Or, if it's a multi-line message, I'll add my | |
# two cents. | |
json_params = | |
name: 'gort' |
This file contains 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
var setTextMeasure = function (contentElement, targetMeasure, maxSize, minSize) { | |
if (!contentElement) contentElement = document.createElement('p'); | |
if (!targetMeasure) targetMeasure = 66; | |
if (!maxSize) maxSize = 16; | |
if (!minSize) minSize = 9; | |
var sizer = contentElement.cloneNode(); | |
sizer.style.cssText = 'margin: 0; padding: 0; color: transparent; background-color: transparent; position: absolute;'; |