From 36202d8defb26f87264914f60c39c768cff3729e Mon Sep 17 00:00:00 2001 From: yo momma Date: Tue, 3 Feb 2026 22:01:05 +0000 Subject: Hump.fm: remove dump.fm branding --- static/js/fullscreen.js | 5 +++-- static/js/fullscreenmgmt.js | 3 ++- static/js/fullscreenphotobooth.js | 3 ++- static/js/home.js | 6 +++++- static/js/pages/chat_init.js | 2 +- static/js/pichat-old.js | 10 +++++----- static/js/pichat.butt.js | 4 ++-- static/js/pichat.js | 8 ++++---- static/js/pichat2.js | 10 +++++----- static/js/register.js | 6 +++++- static/js/registerdis.js | 8 ++++++-- static/js/src/_main.js | 2 +- static/js/src/chat.js | 2 +- static/js/src/profile.js | 2 +- static/js/src/search.js | 2 +- 15 files changed, 44 insertions(+), 29 deletions(-) (limited to 'static/js') diff --git a/static/js/fullscreen.js b/static/js/fullscreen.js index 38e09ee..89cb163 100755 --- a/static/js/fullscreen.js +++ b/static/js/fullscreen.js @@ -1,5 +1,5 @@ function initFullscreen(room){ - Room = room || "dumpfm"; + Room = room || (typeof window.DefaultRoom === 'string' && window.DefaultRoom ? window.DefaultRoom : 'humpfm'); // Timestamp = Timestamp || Date.now(); refresh(); ImageCache = []; @@ -121,7 +121,8 @@ function login() { var nick = $('#nickInput').val(); var password = $('#passwordInput').val() || ''; var rememberme = $('#remembermeInput').attr('checked') ? 'yes' : ''; - var hash = password ? hex_sha1(nick + '$' + password + '$dumpfm') : ''; + var salt = (typeof window.AuthSalt === 'string' && window.AuthSalt) ? window.AuthSalt : 'humpfm'; + var hash = password ? hex_sha1(nick + '$' + password + '$' + salt) : ''; var onSuccess = function(json) { // if (typeof pageTracker !== 'undefined') { diff --git a/static/js/fullscreenmgmt.js b/static/js/fullscreenmgmt.js index 189b79a..1387110 100755 --- a/static/js/fullscreenmgmt.js +++ b/static/js/fullscreenmgmt.js @@ -132,7 +132,8 @@ function login() { var nick = $('#nickInput').val(); var password = $('#passwordInput').val() || ''; var rememberme = $('#remembermeInput').attr('checked') ? 'yes' : ''; - var hash = password ? hex_sha1(nick + '$' + password + '$dumpfm') : ''; + var salt = (typeof window.AuthSalt === 'string' && window.AuthSalt) ? window.AuthSalt : 'humpfm'; + var hash = password ? hex_sha1(nick + '$' + password + '$' + salt) : ''; var onSuccess = function(json) { if (typeof pageTracker !== 'undefined') { diff --git a/static/js/fullscreenphotobooth.js b/static/js/fullscreenphotobooth.js index 2bbbbb5..0c4e586 100755 --- a/static/js/fullscreenphotobooth.js +++ b/static/js/fullscreenphotobooth.js @@ -132,7 +132,8 @@ function login() { var nick = $('#nickInput').val(); var password = $('#passwordInput').val() || ''; var rememberme = $('#remembermeInput').attr('checked') ? 'yes' : ''; - var hash = password ? hex_sha1(nick + '$' + password + '$dumpfm') : ''; + var salt = (typeof window.AuthSalt === 'string' && window.AuthSalt) ? window.AuthSalt : 'humpfm'; + var hash = password ? hex_sha1(nick + '$' + password + '$' + salt) : ''; var onSuccess = function(json) { if (typeof pageTracker !== 'undefined') { diff --git a/static/js/home.js b/static/js/home.js index 37666ae..b90e4d8 100755 --- a/static/js/home.js +++ b/static/js/home.js @@ -4,6 +4,10 @@ function ifEnter(fn) { }; } +function getAuthSalt() { + return (typeof window.AuthSalt === 'string' && window.AuthSalt) ? window.AuthSalt : 'humpfm'; +} + function initLoginForm() { var nick = "#nickInput", nickFiller = "username" var pass = "#passwordInput", passLabel = "#passwordInputLabel", passFiller = "password" @@ -147,7 +151,7 @@ function login() { var nick = $('#nickInput').val(); var password = $('#passwordInput').val() || ''; var rememberme = $('#remembermeInput').attr('checked') ? 'yes' : ''; - var hash = password ? hex_sha1(nick + '$' + password + '$dumpfm') : ''; + var hash = password ? hex_sha1(nick + '$' + password + '$' + getAuthSalt()) : ''; var onSuccess = function(json) { location.href = '/chat'; diff --git a/static/js/pages/chat_init.js b/static/js/pages/chat_init.js index 7149291..7f3c2e1 100644 --- a/static/js/pages/chat_init.js +++ b/static/js/pages/chat_init.js @@ -3,7 +3,7 @@ (function($){ function defaultShowAlert() { - alert(window.Nick ? 'MUST LOGIN' : 'Join dump.fm @ /register'); + alert(window.Nick ? 'MUST LOGIN' : 'Join hump.fm @ /register'); } function defaultPop(url) { diff --git a/static/js/pichat-old.js b/static/js/pichat-old.js index ba2d89e..5ba7e8e 100755 --- a/static/js/pichat-old.js +++ b/static/js/pichat-old.js @@ -6,7 +6,7 @@ var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; d return cookieValue;}}; // The root domain is used so that subdomains don't result in -// spurious extra urls (e.g. both dump.fm/nick and sub.dump.fm/nick) +// spurious extra urls (e.g. both hump.fm/nick and sub.hump.fm/nick) var RootDomain = location.href.match(/http:\/\/(\w)+\./) ? '/' : '/'; @@ -64,7 +64,7 @@ function track(group, name) { } var Preferences = { - "Domain": '.dump.fm', + "Domain": '.hump.fm', "getProperty": function(prop, defaultValue) { var value = $.cookie(prop); @@ -971,7 +971,7 @@ function setupUploadAvatar(elementId) { } else if (r == 'NOT_LOGGED_IN') { location.reload(); } else if (r == 'INVALID_IMAGE') { - alert("Sorry, dump.fm can't deal with your image. Pick another :("); + alert("Sorry, hump.fm can't deal with your image. Pick another :("); return; } else if (r.match(/FILE_TOO_BIG/)) { var maxSize = r.split(" ")[1] / 1024; @@ -1132,7 +1132,7 @@ function getMessageInfo(e){ if (!content.length) content = message.find(".content") var rawContent = content.html() var img = content.find("img").attr("src") - var via = "via " + nick + " on dump.fm" + var via = "via " + nick + " on hump.fm" return {"nick": nick, "id": id, "link": encodeURIComponent(link), "content": rawContent, "img": encodeURIComponent(img), "via": encodeURIComponent(via)} @@ -1369,7 +1369,7 @@ var Search = { $('#search-results-images a').live('hover', Search.resultsHover) var input = Search.$input = $("#search-query") - var label = "search dump.fm" + var label = "search hump.fm" Search.$container = $("#search-results-images") input.val(label) diff --git a/static/js/pichat.butt.js b/static/js/pichat.butt.js index f0baae5..c78db99 100755 --- a/static/js/pichat.butt.js +++ b/static/js/pichat.butt.js @@ -757,7 +757,7 @@ function setupUploadAvatar(elementId) { } else if (resp == 'NOT_LOGGED_IN') { location.reload(); } else if (resp == 'INVALID_IMAGE') { - alert("Sorry, dump.fm can't deal with your image. Pick another :("); + alert("Sorry, hump.fm can't deal with your image. Pick another :("); return; } var s = ''; @@ -903,7 +903,7 @@ function getMessageInfo(e){ if (!content.length) content = message.find(".content") var rawContent = content.html() var img = content.find("img").attr("src") - var via = "via " + nick + " on dump.fm" + var via = "via " + nick + " on hump.fm" return {"nick": nick, "id": id, "link": encodeURIComponent(link), "content": rawContent, "img": encodeURIComponent(img), "via": encodeURIComponent(via)} diff --git a/static/js/pichat.js b/static/js/pichat.js index ad50fae..ca49ab4 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -199,7 +199,7 @@ var SHA1 = { "bit_rol": function(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)) } } // The root domain is used so that subdomains don't result in -// spurious extra urls (e.g. both dump.fm/nick and sub.dump.fm/nick) +// spurious extra urls (e.g. both hump.fm/nick and sub.hump.fm/nick) window.RootDomain = location.href.match(/http:\/\/(\w)+\./) ? '/' : '/'; @@ -443,7 +443,7 @@ function getMessageInfo(e){ if (!content.length) content = message.find(".content") var rawContent = content.html() var img = content.find("img").attr("src") - var via = "via " + nick + " on dump.fm" + var via = "via " + nick + " on hump.fm" return {"nick": nick, "id": id, "link": encodeURIComponent(link), "content": rawContent, "img": encodeURIComponent(img), "via": encodeURIComponent(via)} @@ -1659,7 +1659,7 @@ function setupUploadAvatar(elementId) { } else if (r == 'NOT_LOGGED_IN') { location.reload(); } else if (r == 'INVALID_IMAGE') { - alert("Sorry, dump.fm can't deal with your image. Pick another :("); + alert("Sorry, hump.fm can't deal with your image. Pick another :("); return; } else if (r.match(/FILE_TOO_BIG/)) { var maxSize = r.split(" ")[1] / 1024; @@ -1712,7 +1712,7 @@ Search = { $('#search-results-images a').live('hover', Search.resultsHover) var input = Search.$input = $("#search-query") - var label = "search dump.fm" + var label = "search hump.fm" Search.$container = $("#search-results-images") input.val(label) diff --git a/static/js/pichat2.js b/static/js/pichat2.js index 30fb055..e6078eb 100755 --- a/static/js/pichat2.js +++ b/static/js/pichat2.js @@ -199,7 +199,7 @@ var SHA1 = { "bit_rol": function(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)) } } // The root domain is used so that subdomains don't result in -// spurious extra urls (e.g. both dump.fm/nick and sub.dump.fm/nick) +// spurious extra urls (e.g. both hump.fm/nick and sub.hump.fm/nick) window.RootDomain = location.href.match(/http:\/\/(\w)+\./) ? '/' : '/'; @@ -231,7 +231,7 @@ window.Anim = { window.Preferences = { - "Domain": '.dump.fm', + "Domain": '.hump.fm', "getProperty": function(prop, defaultValue) { var value = $.cookie(prop); @@ -424,7 +424,7 @@ function getMessageInfo(e){ if (!content.length) content = message.find(".content") var rawContent = content.html() var img = content.find("img").attr("src") - var via = "via " + nick + " on dump.fm" + var via = "via " + nick + " on hump.fm" return {"nick": nick, "id": id, "link": encodeURIComponent(link), "content": rawContent, "img": encodeURIComponent(img), "via": encodeURIComponent(via)} @@ -1640,7 +1640,7 @@ function setupUploadAvatar(elementId) { } else if (r == 'NOT_LOGGED_IN') { location.reload(); } else if (r == 'INVALID_IMAGE') { - alert("Sorry, dump.fm can't deal with your image. Pick another :("); + alert("Sorry, hump.fm can't deal with your image. Pick another :("); return; } else if (r.match(/FILE_TOO_BIG/)) { var maxSize = r.split(" ")[1] / 1024; @@ -1693,7 +1693,7 @@ Search = { $('#search-results-images a').live('hover', Search.resultsHover) var input = Search.$input = $("#search-query") - var label = "search dump.fm" + var label = "search hump.fm" Search.$container = $("#search-results-images") input.val(label) diff --git a/static/js/register.js b/static/js/register.js index f4039a8..310990b 100755 --- a/static/js/register.js +++ b/static/js/register.js @@ -4,6 +4,10 @@ function validateEmail(email) { return email.match(re); } +function getAuthSalt() { + return (typeof window.AuthSalt === 'string' && window.AuthSalt) ? window.AuthSalt : 'humpfm'; +} + function submitRegistration() { var nick = $('#regNickInput').val(); var email = $('#regEmailInput').val(); @@ -26,7 +30,7 @@ function submitRegistration() { return; } - var hash = hex_sha1(nick + '$' + password + '$dumpfm'); + var hash = hex_sha1(nick + '$' + password + '$' + getAuthSalt()); var onSuccess = function() { if (typeof pageTracker !== 'undefined') { pageTracker._trackEvent('User', 'Register', nick); diff --git a/static/js/registerdis.js b/static/js/registerdis.js index d4a662b..76fd261 100755 --- a/static/js/registerdis.js +++ b/static/js/registerdis.js @@ -4,6 +4,10 @@ function validateEmail(email) { return email.match(re); } +function getAuthSalt() { + return (typeof window.AuthSalt === 'string' && window.AuthSalt) ? window.AuthSalt : 'humpfm'; +} + function submitRegistration() { var nick = $('#nickInput').val(); var email = $('#emailInput').val(); @@ -26,12 +30,12 @@ function submitRegistration() { return; } - var hash = hex_sha1(nick + '$' + password + '$dumpfm'); + var hash = hex_sha1(nick + '$' + password + '$' + getAuthSalt()); var onSuccess = function() { if (typeof pageTracker !== 'undefined') { pageTracker._trackEvent('User', 'Register', nick); } - location.href = "http://dis.dump.fm"; + location.href = "https://dis.hump.fm"; }; var onError = function(resp) { diff --git a/static/js/src/_main.js b/static/js/src/_main.js index 18592d5..8d15c66 100755 --- a/static/js/src/_main.js +++ b/static/js/src/_main.js @@ -1,5 +1,5 @@ // The root domain is used so that subdomains don't result in -// spurious extra urls (e.g. both dump.fm/nick and sub.dump.fm/nick) +// spurious extra urls (e.g. both hump.fm/nick and sub.hump.fm/nick) window.RootDomain = location.href.match(/http:\/\/(\w)+\./) ? '/' : '/'; diff --git a/static/js/src/chat.js b/static/js/src/chat.js index 7a82ad0..b9b69d3 100755 --- a/static/js/src/chat.js +++ b/static/js/src/chat.js @@ -153,7 +153,7 @@ function getMessageInfo(e){ if (!content.length) content = message.find(".content") var rawContent = content.html() var img = content.find("img").attr("src") - var via = "via " + nick + " on dump.fm" + var via = "via " + nick + " on hump.fm" return {"nick": nick, "id": id, "link": encodeURIComponent(link), "content": rawContent, "img": encodeURIComponent(img), "via": encodeURIComponent(via)} diff --git a/static/js/src/profile.js b/static/js/src/profile.js index 1fa6610..180fdf8 100755 --- a/static/js/src/profile.js +++ b/static/js/src/profile.js @@ -80,7 +80,7 @@ function setupUploadAvatar(elementId) { } else if (r == 'NOT_LOGGED_IN') { location.reload(); } else if (r == 'INVALID_IMAGE') { - alert("Sorry, dump.fm can't deal with your image. Pick another :("); + alert("Sorry, hump.fm can't deal with your image. Pick another :("); return; } else if (r.match(/FILE_TOO_BIG/)) { var maxSize = r.split(" ")[1] / 1024; diff --git a/static/js/src/search.js b/static/js/src/search.js index 9a9d389..0ce9b07 100755 --- a/static/js/src/search.js +++ b/static/js/src/search.js @@ -24,7 +24,7 @@ Search = { $('#search-results-images a').live('hover', Search.resultsHover) var input = Search.$input = $("#search-query") - var label = "search dump.fm" + var label = "search hump.fm" Search.$container = $("#search-results-images") input.val(label) -- cgit v1.2.3-70-g09d2