Skip to content

Instantly share code, notes, and snippets.

@micho
micho / gist:6135657
Created August 1, 2013 21:47
Votes.js, add a voting count to Teambox
/**
* Adds a Like button to tasks, so users can like them.
*
* By default there are no votes enabled in the project. To enable:
*
* project.metadata('apps').set({ votes: true });
* project.metadata('apps').save();
*
*/
@micho
micho / support_helper
Last active June 26, 2016 03:45
Support helper for Teambox, so we can query users
$(document).on("click", ".comment a", function(e) {
if ($(this).text().indexOf("@") !== -1) {
e.preventDefault();
var email = $(this).text();
(new Teambox.Views.Dialog({
header: "User " + email + ". <a href='/become/" + email + "'>Become</a>"
, content: "<iframe src='/reports/users/" + email + "' style='width: 100%; height: 800px;'></iframe>"
})).open();
}
});
@micho
micho / gist:855b272d2f408f04729e
Last active October 9, 2015 14:08
Github PRs: Collapse/expand file
// Add a button to Collapse or Expand files in a Github PR
//
// See it in action: http://cl.ly/image/1r3q3d0d3b0p
//
// Install Tampermonkey and add this as a script
// ==UserScript==
// @name Github PRs: Collapse/expand file
// @namespace https://gist.github.com/micho/855b272d2f408f04729e
// @version 0.1