Updated Plugins (markdown)

jeena 2012-11-25 13:41:38 -08:00
parent 6a8b20d5fb
commit 5c6bac24a6

@ -51,24 +51,3 @@ And add this to your CSS plugin file.
.selected {
border-right: 5px solid green;
}
## Fuzzy location plugin
if (tentia_instance.action == "timeline") {
(function() {
var fuzzyness = 1; // Set how fuzzy it should be rounded. 0 ≈ country, 1 ≈ city, 6 = very exact
function shortenDecimals(number, decimals) {
return Math.round(number * Math.pow(10, decimals)) / Math.pow(10, decimals);
}
tentia_instance.original_sendNewMessage = tentia_instance.sendNewMessage;
tentia_instance.sendNewMessage = function(content, in_reply_to_status_id, in_reply_to_entity, location) {
if (location) {
location = [
shortenDecimals(location[0], fuzzyness),
shortenDecimals(location[1], fuzzyness)
];
}
tentia_instance.original_sendNewMessage(content, in_reply_to_status_id, in_reply_to_entity, location);
}
})();
}