From a7cad3dea595698294e55673b10b4380315a8013 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Fri, 9 Aug 2013 09:28:41 -0400 Subject: Prod commit --- bin/repl2.sh | 3 + photobooth/fullscreenmgmt.js | 185 ++++++ photobooth/fullscreenphotobooth.js | 185 ++++++ photobooth/fullscreenphotobooth.st | 123 ++++ src/site.clj | 2 +- static/dumplogo.png | Bin 0 -> 1369 bytes static/error/500.html | 20 + static/error/error.html | 20 + static/fonts/PixelComicSans-Regular.bmap | 0 static/fonts/PixelComicSans-Regular.eot | Bin 0 -> 14684 bytes static/fonts/PixelComicSans-Regular.otf | Bin 0 -> 14852 bytes static/fonts/PixelComicSans-Regular.suit | 0 static/fonts/PixelComicSans-Regular.svg | 843 ++++++++++++++++++++++++ static/fonts/PixelComicSans-Regular.woff | Bin 0 -> 10052 bytes static/fonts/pixelcomicsans-regular-webfont.ttf | Bin 0 -> 26460 bytes static/img/thumbs/stripes.png | Bin 0 -> 2151 bytes static/js/fullscreen.js | 10 +- static/js/pichat.js | 2 +- static/webcam/webcam.tar | Bin 0 -> 542720 bytes 19 files changed, 1386 insertions(+), 7 deletions(-) create mode 100755 bin/repl2.sh create mode 100644 photobooth/fullscreenmgmt.js create mode 100644 photobooth/fullscreenphotobooth.js create mode 100644 photobooth/fullscreenphotobooth.st create mode 100644 static/dumplogo.png create mode 100644 static/error/500.html create mode 100644 static/error/error.html create mode 100755 static/fonts/PixelComicSans-Regular.bmap create mode 100755 static/fonts/PixelComicSans-Regular.eot create mode 100755 static/fonts/PixelComicSans-Regular.otf create mode 100755 static/fonts/PixelComicSans-Regular.suit create mode 100755 static/fonts/PixelComicSans-Regular.svg create mode 100755 static/fonts/PixelComicSans-Regular.woff create mode 100755 static/fonts/pixelcomicsans-regular-webfont.ttf create mode 100644 static/img/thumbs/stripes.png create mode 100644 static/webcam/webcam.tar diff --git a/bin/repl2.sh b/bin/repl2.sh new file mode 100755 index 0000000..4881aa5 --- /dev/null +++ b/bin/repl2.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +java -Xmx400m -server -cp .:lib/commons-io-1.4.jar:lib/commons-fileupload-1.2.1.jar:lib/commons-codec-1.3.jar:lib/commons-collections-3.2.1.jar:lib/commons-pool-1.5.5.jar:lib/jline-0.9.94.jar:lib/clojure.jar:lib/clojure-contrib.jar:lib/compojure-3.2v3.jar:lib/jetty-6.1.24.jar:lib/jetty-util-6.1.24.jar:lib/servlet-api-2.5-6.1.14.jar:lib/postgresql-8.4-701.jdbc4.jar:lib/stringtemplate-3.2.1.jar:lib/antlr-2.7.7.jar:lib/mail-1.4.4.jar:lib/jdom-1.1.jar:lib/rome-1.0.jar:lib/htmlcleaner-2.1.jar:lib/redis-clojure-1.0.4.jar:lib/jedis-1.4.0.jar:src/ jline.ConsoleRunner clojure.main -i $1 -r $@ diff --git a/photobooth/fullscreenmgmt.js b/photobooth/fullscreenmgmt.js new file mode 100644 index 0000000..6137238 --- /dev/null +++ b/photobooth/fullscreenmgmt.js @@ -0,0 +1,185 @@ +function initFullscreen(){ + Room = "mgmt"; + refresh(); + ImageCache = []; + SeenImages = {}; + FavedMap = {}; + $('#tools-button').click(toolsToggle); +} +function toolsToggle(){ + if ($("#msgInputDiv").css("display") == "none") + toolsShow() + else + toolsHide() +} +function toolsShow(){ + $("#msgInputDiv").css("display", "block") + +} +function toolsHide(){ + $("#msgInputDiv").css("display", "none") +} + +function scanMessagesForImages(messages){ + for(var m=0; m'); + if (FavedMap[this.msg_id]) + $('#fav-indicator').show(); + else + $('#fav-indicator').hide(); +} + +function refresh() { + var onSuccess = function(json) { + try { + if (json.messages && json.messages.length) + scanMessagesForImages(json.messages); + Timestamp = json.timestamp; + } catch(e) { + + } + setTimeout(refresh, 1000); + }; + + var onError = function(resp, textStatus, errorThrown) { + setTimeout(refresh, 4000); + }; + + $.ajax({ + type: 'GET', + timeout: 5000, + url: '/refresh', + data: { 'room': Room, 'since': Timestamp }, + cache: false, + dataType: 'json', + success: onSuccess, + error: onError + }); +} + +function initLogin() { + $('#logininner').ridgificate('2px solid #dd0000', + '2px solid #fe6230', + '2px solid #fef600', + '2px solid #00bc00', + '2px solid #009bfe', + '2px solid #000083', + '2px solid #30009b', + '2px solid #dd0000', + '2px solid #fe6230', + '2px solid #fef600', + '2px solid #00bc00', + '2px solid #009bfe', + '2px solid #000083', + '2px solid #30009b'); +} + +function showLogin() { + $('#nickInput').val(''); + $('#passwordInput').val(''); + $('#loginbox').show().center().center(); + $('#username').focus(); + $('input').removeAttr('disabled'); +} + +function login() { + $('#spinner').show(); + $('input').attr('disabled', 'disabled'); + var nick = $('#nickInput').val(); + var password = $('#passwordInput').val(); + var rememberme = $('#remembermeInput').attr('checked') ? 'yes' : ''; + var hash = hex_sha1(nick + '$' + password + '$dumpfm'); + + var onSuccess = function(json) { + if (typeof pageTracker !== 'undefined') { + pageTracker._setCustomVar(1, "logged-in", nick); + } + LoggedIn = true; + $('#loginbox').hide(); + $('.sublogo').text('click to fav'); + }; + + var onError = function(resp, textStatus, errorThrown) { + $('#spinner').hide(); + $('input').removeAttr('disabled'); + $('#errormsg').text("Couldn't log you in :( Bad password?"); + } + + $.ajax({ + type: 'POST', + timeout: 5000, + url: '/login', + data: {'nick': nick, ts: '', 'hash': hash, 'rememberme': rememberme}, + cache: false, + dataType: 'json', + success: onSuccess, + error: onError + }); +} + +// http://plugins.jquery.com/project/autocenter +(function($){ + $.fn.extend({ + center: function () { + return this.each(function() { + var top = ($(window).height() - $(this).outerHeight()) / 2; + var left = ($(window).width() - $(this).outerWidth()) / 2; + $(this).css({position:'absolute', margin:0, top: (top > 0 ? top : 0)+'px', left: (left > 0 ? left : 0)+'px'}); + }); + } + }); +})(jQuery); + +(function($) { + $.fn.extend({ + ridgificate: function() { + var ridges = arguments; + return this.each(function() { + for (var i = 0; i < ridges.length; i++) { + $(this).wrap('
'); + } + }); + }}); +})(jQuery); + +var LogoFadeDelay = 3000; +var PrevMouseCoord = [-1, -1]; + +$(function() { + $(document).mousemove(function(e) { + if (e.pageX == PrevMouseCoord[0] && e.pageY == PrevMouseCoord[1]) + return; + PrevMouseCoord = [e.pageX, e.pageY]; + $('#memelogo').stop(true, false).animate({opacity: 1.0}, "fast").delay(LogoFadeDelay).animate({opacity: 0}, "slow"); + }); + $('#memelogo').delay(LogoFadeDelay).animate({opacity: 0}, "slow"); +}); \ No newline at end of file diff --git a/photobooth/fullscreenphotobooth.js b/photobooth/fullscreenphotobooth.js new file mode 100644 index 0000000..6137238 --- /dev/null +++ b/photobooth/fullscreenphotobooth.js @@ -0,0 +1,185 @@ +function initFullscreen(){ + Room = "mgmt"; + refresh(); + ImageCache = []; + SeenImages = {}; + FavedMap = {}; + $('#tools-button').click(toolsToggle); +} +function toolsToggle(){ + if ($("#msgInputDiv").css("display") == "none") + toolsShow() + else + toolsHide() +} +function toolsShow(){ + $("#msgInputDiv").css("display", "block") + +} +function toolsHide(){ + $("#msgInputDiv").css("display", "none") +} + +function scanMessagesForImages(messages){ + for(var m=0; m'); + if (FavedMap[this.msg_id]) + $('#fav-indicator').show(); + else + $('#fav-indicator').hide(); +} + +function refresh() { + var onSuccess = function(json) { + try { + if (json.messages && json.messages.length) + scanMessagesForImages(json.messages); + Timestamp = json.timestamp; + } catch(e) { + + } + setTimeout(refresh, 1000); + }; + + var onError = function(resp, textStatus, errorThrown) { + setTimeout(refresh, 4000); + }; + + $.ajax({ + type: 'GET', + timeout: 5000, + url: '/refresh', + data: { 'room': Room, 'since': Timestamp }, + cache: false, + dataType: 'json', + success: onSuccess, + error: onError + }); +} + +function initLogin() { + $('#logininner').ridgificate('2px solid #dd0000', + '2px solid #fe6230', + '2px solid #fef600', + '2px solid #00bc00', + '2px solid #009bfe', + '2px solid #000083', + '2px solid #30009b', + '2px solid #dd0000', + '2px solid #fe6230', + '2px solid #fef600', + '2px solid #00bc00', + '2px solid #009bfe', + '2px solid #000083', + '2px solid #30009b'); +} + +function showLogin() { + $('#nickInput').val(''); + $('#passwordInput').val(''); + $('#loginbox').show().center().center(); + $('#username').focus(); + $('input').removeAttr('disabled'); +} + +function login() { + $('#spinner').show(); + $('input').attr('disabled', 'disabled'); + var nick = $('#nickInput').val(); + var password = $('#passwordInput').val(); + var rememberme = $('#remembermeInput').attr('checked') ? 'yes' : ''; + var hash = hex_sha1(nick + '$' + password + '$dumpfm'); + + var onSuccess = function(json) { + if (typeof pageTracker !== 'undefined') { + pageTracker._setCustomVar(1, "logged-in", nick); + } + LoggedIn = true; + $('#loginbox').hide(); + $('.sublogo').text('click to fav'); + }; + + var onError = function(resp, textStatus, errorThrown) { + $('#spinner').hide(); + $('input').removeAttr('disabled'); + $('#errormsg').text("Couldn't log you in :( Bad password?"); + } + + $.ajax({ + type: 'POST', + timeout: 5000, + url: '/login', + data: {'nick': nick, ts: '', 'hash': hash, 'rememberme': rememberme}, + cache: false, + dataType: 'json', + success: onSuccess, + error: onError + }); +} + +// http://plugins.jquery.com/project/autocenter +(function($){ + $.fn.extend({ + center: function () { + return this.each(function() { + var top = ($(window).height() - $(this).outerHeight()) / 2; + var left = ($(window).width() - $(this).outerWidth()) / 2; + $(this).css({position:'absolute', margin:0, top: (top > 0 ? top : 0)+'px', left: (left > 0 ? left : 0)+'px'}); + }); + } + }); +})(jQuery); + +(function($) { + $.fn.extend({ + ridgificate: function() { + var ridges = arguments; + return this.each(function() { + for (var i = 0; i < ridges.length; i++) { + $(this).wrap('
'); + } + }); + }}); +})(jQuery); + +var LogoFadeDelay = 3000; +var PrevMouseCoord = [-1, -1]; + +$(function() { + $(document).mousemove(function(e) { + if (e.pageX == PrevMouseCoord[0] && e.pageY == PrevMouseCoord[1]) + return; + PrevMouseCoord = [e.pageX, e.pageY]; + $('#memelogo').stop(true, false).animate({opacity: 1.0}, "fast").delay(LogoFadeDelay).animate({opacity: 0}, "slow"); + }); + $('#memelogo').delay(LogoFadeDelay).animate({opacity: 0}, "slow"); +}); \ No newline at end of file diff --git a/photobooth/fullscreenphotobooth.st b/photobooth/fullscreenphotobooth.st new file mode 100644 index 0000000..6e32453 --- /dev/null +++ b/photobooth/fullscreenphotobooth.st @@ -0,0 +1,123 @@ + + + + dump.fm - fullscreen + + + + + + + + + + + + + + + + + + + +
+ + waiting 4 new image from dump.fm............. + + + + +
+ + + $google_analytics()$ + + diff --git a/src/site.clj b/src/site.clj index 66e880e..4db093f 100644 --- a/src/site.clj +++ b/src/site.clj @@ -305,7 +305,7 @@ WHERE user_id IN ; this should check if the user was created in the last day i guess (defn ip-recently-created? [ip] - (> (count (do-select ["select * from users where created_ip=?::cidr" (str ip)] )) 10)) + (> (count (do-select ["select * from users where created_ip=?::cidr" (str ip)] )) 15)) (def *reserved-nicks-path* "docs/reserved_nicks.txt") (def *reserved-nicks-refresh-period-sec* 300) diff --git a/static/dumplogo.png b/static/dumplogo.png new file mode 100644 index 0000000..188e50c Binary files /dev/null and b/static/dumplogo.png differ diff --git a/static/error/500.html b/static/error/500.html new file mode 100644 index 0000000..dd08502 --- /dev/null +++ b/static/error/500.html @@ -0,0 +1,20 @@ + + + +dump.fm - error + + + + +
+ +
+We're sorry... +
dump is down cuz of the government or we're too poor.

+ +
+ + diff --git a/static/error/error.html b/static/error/error.html new file mode 100644 index 0000000..dd08502 --- /dev/null +++ b/static/error/error.html @@ -0,0 +1,20 @@ + + + +dump.fm - error + + + + +
+ +
+We're sorry... +
dump is down cuz of the government or we're too poor.

+ +
+ + diff --git a/static/fonts/PixelComicSans-Regular.bmap b/static/fonts/PixelComicSans-Regular.bmap new file mode 100755 index 0000000..e69de29 diff --git a/static/fonts/PixelComicSans-Regular.eot b/static/fonts/PixelComicSans-Regular.eot new file mode 100755 index 0000000..924bc6e Binary files /dev/null and b/static/fonts/PixelComicSans-Regular.eot differ diff --git a/static/fonts/PixelComicSans-Regular.otf b/static/fonts/PixelComicSans-Regular.otf new file mode 100755 index 0000000..2feecb5 Binary files /dev/null and b/static/fonts/PixelComicSans-Regular.otf differ diff --git a/static/fonts/PixelComicSans-Regular.suit b/static/fonts/PixelComicSans-Regular.suit new file mode 100755 index 0000000..e69de29 diff --git a/static/fonts/PixelComicSans-Regular.svg b/static/fonts/PixelComicSans-Regular.svg new file mode 100755 index 0000000..a68221b --- /dev/null +++ b/static/fonts/PixelComicSans-Regular.svg @@ -0,0 +1,843 @@ + + + + +Created by FontXChange 20110222 at Sun Oct 16 16:12:05 2011 + By ryder ripps +2011 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/static/fonts/PixelComicSans-Regular.woff b/static/fonts/PixelComicSans-Regular.woff new file mode 100755 index 0000000..9112ee0 Binary files /dev/null and b/static/fonts/PixelComicSans-Regular.woff differ diff --git a/static/fonts/pixelcomicsans-regular-webfont.ttf b/static/fonts/pixelcomicsans-regular-webfont.ttf new file mode 100755 index 0000000..e6ee814 Binary files /dev/null and b/static/fonts/pixelcomicsans-regular-webfont.ttf differ diff --git a/static/img/thumbs/stripes.png b/static/img/thumbs/stripes.png new file mode 100644 index 0000000..5f19d48 Binary files /dev/null and b/static/img/thumbs/stripes.png differ diff --git a/static/js/fullscreen.js b/static/js/fullscreen.js index 5b46519..17b0614 100644 --- a/static/js/fullscreen.js +++ b/static/js/fullscreen.js @@ -109,12 +109,12 @@ function login() { var hash = hex_sha1(nick + '$' + password + '$dumpfm'); var onSuccess = function(json) { - if (typeof pageTracker !== 'undefined') { - pageTracker._setCustomVar(1, "logged-in", nick); - } + // if (typeof pageTracker !== 'undefined') { + // pageTracker._setCustomVar(1, "logged-in", nick); + // } LoggedIn = true; - $('#loginbox').hide(); - $('.sublogo').text('click to fav'); + // $('#loginbox').hide(); + // $('.sublogo').text('click to fav'); window.location.href = "/chat"; }; diff --git a/static/js/pichat.js b/static/js/pichat.js index ceeb397..08054e7 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -445,7 +445,7 @@ function removeOldMessages(){ } } -window.TextEnabled = Preferences.getProperty("chat.textEnabled", "true") == "true"; +window.TextEnabled = Preferences.getProperty("chat.textEnabled", "true") == "ok"; window.ImgsEnabled = Preferences.getProperty("chat.imgsEnabled", "true") == "true"; function muteSelector() { diff --git a/static/webcam/webcam.tar b/static/webcam/webcam.tar new file mode 100644 index 0000000..eed868d Binary files /dev/null and b/static/webcam/webcam.tar differ -- cgit v1.2.3-70-g09d2