X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;ds=sidebyside;f=www%2Fjs%2Fblerg.js;fp=www%2Fjs%2Fblerg.js;h=0000000000000000000000000000000000000000;hb=c8ad4bb20cb1e10d5ac906ce1928357d1e4b3180;hp=0d114cb22f70ef8d0f3e21a490aac81f14741241;hpb=6d460ea60252c7bb6b567b06e4428e3e7986885e;p=blerg.git diff --git a/www/js/blerg.js b/www/js/blerg.js deleted file mode 100644 index 0d114cb..0000000 --- a/www/js/blerg.js +++ /dev/null @@ -1,64 +0,0 @@ -/* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a - * BSD-style license. Please see the COPYING file for details. - */ - -LoginStatus.prototype.post = function(msg) { - if (!this.loggedIn) { - alert("You are not logged in!"); - return; - } - - new Ajax.Request(baseURL + '/put', { - parameters: { - username: this.username, - data: msg - }, - onSuccess: function(r) { - var j = r.responseText.evalJSON(); - if (j && j.status == 'success') { - $('post.content').value = ''; - if (location.hash != '#' + this.username) { - qlink(this.username); - } else { - currentPager.itemCount++; - currentPager.reload(); - } - } else { - alert('Post failed!'); - } - }.bind(this), - onFailure: function(r) { - alert('Post failed!'); - } - }); -} - -function passwd() { - var old_password = $('passwd.old_password').value; - var new_password = $('passwd.new_password').value; - - new Ajax.Request(baseURL + '/passwd', { - parameters: { - username: loginStatus.username, - password: old_password, - new_password: new_password - }, - onSuccess: function(r) { - if (r.responseJSON.status == 'success') { - alert('Password changed'); - passwd_cancel(); - } else { - alert('Password change failed. Your password has NOT been changed.'); - } - }, - onFailure: function(r) { - alert('Password change error'); - } - }); -} - -function passwd_cancel() { - $('passwd').hide(); - $('navigation').show(); - urlSwitch(); -}