X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjs%2Fblerg.js;h=b0bc38fe7c2c4033f9c6d127377c243183f25c83;hb=35b7988fc55d794a4d6fa466c61b21be176e64d0;hp=944f112634cbe70f12e81cce6e824ca0d53cc75c;hpb=3f2f34bd763a1f3e1da52a0ca0e66ca4daacc1ca;p=blerg.git
diff --git a/www/js/blerg.js b/www/js/blerg.js
index 944f112..b0bc38f 100644
--- a/www/js/blerg.js
+++ b/www/js/blerg.js
@@ -5,10 +5,10 @@
// Config
var baseURL = '';
var recordTemplate = new Template(
- '
'
+ ''
);
var tagRecordTemplate = new Template(
- ''
+ ''
);
var latestRecordsTemplate = new Template(
''
@@ -69,7 +69,7 @@ LoginStatus.prototype.logout = function() {
parameters: {
username: this.username
},
- onSuccess: function(r) {
+ onComplete: function(r) {
this.loggedIn = false;
document.cookie = "auth=; expires=1-Jan-1970 00:00:00 GMT";
this.update();
@@ -352,7 +352,7 @@ function mangleRecord(record, template) {
// Turn refs and tags into links
l = l.replace(/(\s|^)#([A-Za-z0-9_-]+)/g, '$1#$2');
- l = l.replace(/(\s|^)@([A-Za-z0-9_-]+)/g, '$1@$2');
+ l = l.replace(/(\s|^)@([A-Za-z0-9_-]+)(\/\d+)?/g, '$1@$2');
// Create lists when lines begin with *
if (l[0] == '*') {
@@ -514,14 +514,16 @@ Feed.prototype.show = function() {
}
-function postPopup() {
- if (loginStatus.loggedIn) {
+function postPopup(initial) {
+ if (loginStatus.loggedIn || initial) {
var post = $('post');
if (post.visible()) {
post.hide();
} else {
post.show();
- if (currentPager.username && currentPager.username != loginStatus.username && !$('post.content').value) {
+ if (initial) {
+ $('post.content').value = initial;
+ } else if (!$('post.content').value && currentPager.username && currentPager.username != loginStatus.username) {
$('post.content').value = '@' + currentPager.username + ': ';
}
$('post.content').focus();