forked from Archives/Athou_commafeed
social sharing buttons
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
var module = angular.module('commafeed.directives', []);
|
||||
|
||||
module.directive('popup', function() {
|
||||
return {
|
||||
link : function(scope, elm, attrs) {
|
||||
elm.bind('click', function(event) {
|
||||
window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');
|
||||
event.preventDefault();
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
module.directive('favicon', function() {
|
||||
return {
|
||||
restrict : 'E',
|
||||
|
||||
@@ -7,9 +7,13 @@ module.filter('entryDate', function() {
|
||||
var formatted;
|
||||
if (d.date() === now.date() && Math.abs(d.diff(now)) < 86400000) {
|
||||
formatted = d.fromNow();
|
||||
} else {
|
||||
formatted = d.format('YYYY-MM-DD HH:mm');
|
||||
}
|
||||
return formatted;
|
||||
} else {
|
||||
formatted = d.format('YYYY-MM-DD HH:mm');
|
||||
}
|
||||
return formatted;
|
||||
};
|
||||
});
|
||||
|
||||
module.filter('escape', function() {
|
||||
return encodeURIComponent;
|
||||
});
|
||||
Reference in New Issue
Block a user