summaryrefslogtreecommitdiff
path: root/static/js/pichat-old.js
diff options
context:
space:
mode:
authoryo momma <shutup@oops.wtf>2026-02-04 19:04:59 +0000
committeryo momma <shutup@oops.wtf>2026-02-04 19:04:59 +0000
commitad4d74ea45be6b227027588f6515fb22fafc335a (patch)
treedc33e854cc1f6f7d12ca746edef0e844be17f97f /static/js/pichat-old.js
parentae480c44c59a9e77ea279f2208dd7f932079e078 (diff)
Refactor UI: dump classes -> hump
Diffstat (limited to 'static/js/pichat-old.js')
-rwxr-xr-xstatic/js/pichat-old.js60
1 files changed, 30 insertions, 30 deletions
diff --git a/static/js/pichat-old.js b/static/js/pichat-old.js
index 5ba7e8e..e0a7692 100755
--- a/static/js/pichat-old.js
+++ b/static/js/pichat-old.js
@@ -339,12 +339,12 @@ function setTextEnable() {
TextEnabled = true;
Preferences.setProperty("chat.textEnabled", "false");
track('UI', 'TextEnabled');
- $('.dump').not('.contains-image,'+muted).show();
+ $('.hump').not('.contains-image,'+muted).show();
} else {
TextEnabled = false;
Preferences.setProperty("chat.textEnabled", "false");
track('UI', 'TextDisabled');
- $('.dump').not('.contains-image').hide()
+ $('.hump').not('.contains-image').hide()
}
};
@@ -384,7 +384,7 @@ function buildMessageDiv(msg, opts) {
if (displayStyle === '' && MUTES[nick])
displayStyle = ' style="display: none"';
- return '<div class="msgDiv dump ' + loadingClass + containsImageClass + " nick_" + nick + '" ' + msgId + displayStyle + '>'
+ return '<div class="msgDiv hump ' + loadingClass + containsImageClass + " nick_" + nick + '" ' + msgId + displayStyle + '>'
+ '<span class="nick"><b><a href="' + RootDomain + nick + ' ">' + nick + '</a></b>'
+ ' <img src="'+Imgs.chatThumbDot+'" class="chat-thumb" onclick="Tag.favorite(this)"> '
+ '</span>'
@@ -510,7 +510,7 @@ function invalidImageDomain(content) {
function clearMessages(){
track('UI', 'ClearScreen');
- $('.dump').remove();
+ $('.hump').remove();
}
function submitMessage() {
@@ -690,22 +690,22 @@ function initChat() {
$('#imgbutton input').attr('checked', ImgsEnabled).change(setImgsEnable);
/* $('#clearbutton input').click(function() {
track('UI', 'ClearScreen');
- $('.dump').remove();
+ $('.hump').remove();
$(this).removeAttr('checked');
return false;
});
*/
$('.oldmsg').each(function() {
- var dump = $(this);
- var content = dump.find(".content")
- MessageContentCache[dump.attr("id").substr(8)] = content.text()
+ var hump = $(this);
+ var content = hump.find(".content")
+ MessageContentCache[hump.attr("id").substr(8)] = content.text()
content.html(buildMsgContent(content.text(), Recips));
- if ((ImgsEnabled && dump.hasClass('contains-image')) || (TextEnabled && !dump.hasClass('contains-image')))
- dump.show();
+ if ((ImgsEnabled && hump.hasClass('contains-image')) || (TextEnabled && !hump.hasClass('contains-image')))
+ hump.show();
else
- dump.hide();
+ hump.hide();
});
Drag.bindImages();
@@ -793,7 +793,7 @@ function initProfile(recips) {
$('#edit-toggle').click(enableProfileEdit);
activateProfileEditable();
- $('.dash-dump .content').each(function() {
+ $('.dash-hump .content').each(function() {
var t = $(this);
t.html(buildMsgContent(t.text()));
});
@@ -801,11 +801,11 @@ function initProfile(recips) {
function initLog(recips) {
Search.initInpage();
- $('.logged-dump .content').each(function() {
+ $('.logged-hump .content').each(function() {
var t = $(this);
t.html(buildMsgContent(t.text(), recips));
});
- initLogThumb(".logged-dump .thumb", '.dump');
+ initLogThumb(".logged-hump .thumb", '.hump');
}
function initLogThumb(selector, parentSelector) {
@@ -834,7 +834,7 @@ function initLogThumb(selector, parentSelector) {
function initChatThumb(){
$(".chat-thumb").live('mouseover mouseout',
function(e) {
- var favorited = $(this).parents(".dump").hasClass("favorite") ? true : false;
+ var favorited = $(this).parents(".hump").hasClass("favorite") ? true : false;
if (e.type == "mouseover") {
if (favorited) {
$(this).attr("src", Imgs.chatThumbOff);
@@ -1051,7 +1051,7 @@ function initDirectory() {
t.html(buildMsgContent(t.text()));
});
Search.initInpage()
- initLogThumb('.dlogged-dump .thumb', '.dlogged-dump');
+ initLogThumb('.dlogged-hump .thumb', '.dlogged-hump');
}
//big hand stuff
@@ -1121,10 +1121,10 @@ function initBigHand(id){
}
-// grab message id etc from some element e that's inside a dump
-// (messages have something like id="message-0001" class="dump" )
+// grab message id etc from some element e that's inside a hump
+// (messages have something like id="message-0001" class="hump" )
function getMessageInfo(e){
- var message = $(e).parents(".dump")
+ var message = $(e).parents(".hump")
var id = message.attr("id").substr(8) // cut "message-001" to "001"
var nick = message.attr("nick")
var link = "/p/" + nick + "/" + id
@@ -1167,17 +1167,17 @@ Share = {
Tag = {
"favorite": function(button) {
var message = getMessageInfo(button);
- var favorited = $(button).parents(".dump").hasClass("favorite");
+ var favorited = $(button).parents(".hump").hasClass("favorite");
if (favorited) {
Tag.rm(message.id, "favorite");
- $(button).parents(".dump").removeClass("favorite");
+ $(button).parents(".hump").removeClass("favorite");
if (RawFavs[message.id]) {
delete RawFavs[message.id];
paletteImageCache = false;
}
} else {
Tag.add(message.id, "favorite");
- $(button).parents(".dump").addClass("favorite");
+ $(button).parents(".hump").addClass("favorite");
if (RawFavs && MessageContentCache[message.id]) { // chat ui stuff
if ($("#palette-button").css("display") == "none")
paletteButtonShowAnim();
@@ -1204,19 +1204,19 @@ Tag = {
"animated_fav": function(button, scoreClass, bigTextSize, smallTextSize) {
if (!Nick) { return; }
Tag.favorite(button);
- var $dump = $(button).parents(".dump");
- var isAdding = $dump.hasClass('favorite');
+ var $hump = $(button).parents(".hump");
+ var isAdding = $hump.hasClass('favorite');
// Frontpage-favs can be triggered by clicking score number,
// so manually sync heart-thumb visual state.
if ($(button).hasClass('hallscore')) {
- $dump.find('.thumb').attr('src', isAdding ? Imgs.logThumb : Imgs.logThumbOff);
+ $hump.find('.thumb').attr('src', isAdding ? Imgs.logThumb : Imgs.logThumbOff);
}
- if ($dump.attr('nick') == Nick)
+ if ($hump.attr('nick') == Nick)
return;
- var $score = $dump.find(scoreClass);
+ var $score = $hump.find(scoreClass);
var inc = isAdding ? 1 : -1;
var oldScore = parseInt($score.text(), 10);
$score.text(oldScore + inc);
@@ -1229,9 +1229,9 @@ Tag = {
.attr('href', Domain + '/' + Nick + '/popular')
.append($('<b>').text(Nick))
.append(" ");
- $dump.find('.faver-list').append(link);
+ $hump.find('.faver-list').append(link);
} else {
- $dump.find('.faver-list b').filter(function() { return $(this).text() == Nick }).parent().remove();
+ $hump.find('.faver-list b').filter(function() { return $(this).text() == Nick }).parent().remove();
}
}
}
@@ -1754,7 +1754,7 @@ var Away = {
"updateTitle": function () {
if (Away.UnseenMsgCounter > 0) {
var plural = Away.UnseenMsgCounter > 1 ? 's' : '';
- $('title').text(Away.UnseenMsgCounter + ' new dump' + plural + '! | ' + Away.OrigTitle);
+ $('title').text(Away.UnseenMsgCounter + ' new hump' + plural + '! | ' + Away.OrigTitle);
}
setTimeout(Away.updateTitle, Away.UpdateFrequency);