Quick and dirty hack to add new users and tags
</div>
<div id="welcome">
+
+ <div style="float: right; width: 25%; margin: 0 0 8pt 8pt">
+ <h2>Quick and dirty hack to show recent tags</h2>
+ <div id="newtags"></div>
+
+ <h2>And here are some users with recent activity</h2>
+ <div id="newusers"></div>
+ </div>
+
<h2>I am 12 and what is this</h2>
<p>Blërg is a microblogging platform. Or maybe a miniblogging
if (this.loggedIn) {
$('userlink').href = '/#' + this.username;
$('userlink').update('@' + this.username);
+ $('reflink').href = '/#ref/' + this.username;
$('login').hide();
$('logout').show();
} else {
$$('[name=section]').each(function(v) { v.update(' @' + this.username) }.bind(this));
$('welcome').hide();
items.show();
- $('reflink').href = '/#ref/' + this.username;
$('rss').show();
$('rsslink').href = '/rss/' + this.username;
}
}, 150);
}
+function loadNewThings() {
+ new Ajax.Request(baseURL + '/newtags.json', {
+ onSuccess: function(r) {
+ $('newtags').update();
+ r.responseText.evalJSON().each(function(v) {
+ var a = new Element('a', {href: '/#tag/' + v});
+ a.insert('#' + v);
+ $('newtags').insert(a);
+ $('newtags').insert(new Element('br'));
+ });
+ }
+ });
+
+ new Ajax.Request(baseURL + '/newusers.json', {
+ onSuccess: function(r) {
+ $('newusers').update();
+ r.responseText.evalJSON().each(function(v) {
+ var a = new Element('a', {href: '/#' + v});
+ a.insert('@' + v);
+ $('newusers').insert(a);
+ $('newusers').insert(new Element('br'));
+ });
+ }
+ });
+}
+
function hashSwitch() {
var m;
if (m = location.search.match(/^\?post\/([^/]+)\/(.+)/)) {
$('older_link').hide();
$('welcome').show();
$('rss').hide();
+ loadNewThings();
}
}