summaryrefslogtreecommitdiff
path: root/static/js/src
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/src')
-rw-r--r--static/js/src/away.js2
-rw-r--r--static/js/src/chat.js10
-rw-r--r--static/js/src/main.js48
-rw-r--r--static/js/src/search.js2
-rw-r--r--static/js/src/spacefill.js4
5 files changed, 9 insertions, 57 deletions
diff --git a/static/js/src/away.js b/static/js/src/away.js
index f669d6a..8d910f3 100644
--- a/static/js/src/away.js
+++ b/static/js/src/away.js
@@ -1,4 +1,4 @@
-var Away = {
+window.Away = {
"UnseenMsgCounter": 0,
"OrigTitle": "",
"HasFocus": true,
diff --git a/static/js/src/chat.js b/static/js/src/chat.js
index 07796b2..09954de 100644
--- a/static/js/src/chat.js
+++ b/static/js/src/chat.js
@@ -44,7 +44,7 @@ function initChat() {
}
-var imgZoomThreshhold = [125, 125];
+window.imgZoomThreshhold = [125, 125];
function initChatMsgs() {
$('.msgDiv .content').live('mouseenter', function(e) {
@@ -152,7 +152,7 @@ function getMessageInfo(e){
}
// Message Handling
-var ImageMsgCount = 0
+window.ImageMsgCount = 0
function removeOldMessages(){
// don't count posts that are all text
if (LastMsgContainsImage) ImageMsgCount += 1;
@@ -166,8 +166,8 @@ function removeOldMessages(){
}
}
-var TextEnabled = Preferences.getProperty("chat.textEnabled", "true") == "none";
-var ImgsEnabled = Preferences.getProperty("chat.imgsEnabled", "true") == "true";
+window.TextEnabled = Preferences.getProperty("chat.textEnabled", "true") == "none";
+window.ImgsEnabled = Preferences.getProperty("chat.imgsEnabled", "true") == "true";
function muteSelector() {
var muted = [];
@@ -227,7 +227,7 @@ function scrollIfPossible(){
scrollToEnd()
}
-var lastScriptedScrolledPosition = 0
+window.lastScriptedScrolledPosition = 0
function scrollToEnd(){
messageList.scrollTop = messageList.scrollHeight
lastScriptedScrolledPosition = messageList.scrollTop
diff --git a/static/js/src/main.js b/static/js/src/main.js
deleted file mode 100644
index ddb4111..0000000
--- a/static/js/src/main.js
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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)
-var RootDomain = location.href.match(/http:\/\/(\w)+\./)
- ? 'http://dump.fm/' : '/';
-
-var cache = {};
-var PendingMessages = {};
-var MessageContentCache = {};
-var RawFavs = {};
-var MaxImagePosts = 30;
-
-// todo: preload these. also, look into image sprites (no go on animating their sizes tho)
-// css clipping perhaps?
-Imgs = {
- "chatThumb": "/static/img/thumbs/smallheartfaved.gif",
- "chatThumbBig": "/static/img/thumbs/chatheartover.gif",
- "chatThumbOff": "/static/img/thumbs/smallheart.gif",
- "chatThumbDot": "/static/img/thumbs/smallheart.gif",
- "logThumb": "/static/img/thumbs/heartfaved.gif",
- "logThumbBig": "/static/img/thumbs/heartover.gif",
- "logThumbOff": "/static/img/thumbs/heart.gif"
-}
-
-Anim = {
- "chatThumbBig": {"width": "54px", "height": "54px", "right": "0px", "bottom": "2px"},
- "chatThumbTiny": {"width": "16px", "height": "16px", "right": "8px", "bottom": "8px"},
- "chatThumb": {"width": "16px", "height": "16px", "right": "4px", "bottom": "4px"},
- "logThumb": {"width": "27px", "height": "27px", "marginRight": "0px", "marginTop": "0px"},
- "logThumbBig": {"width": "64px", "height": "64px", "marginRight": "-2px", "marginTop": "-2px"}
-}
-
-
-var Preferences = {
- "Domain": '.dump.fm',
-
- "getProperty": function(prop, defaultValue) {
- var value = $.cookie(prop);
- return (value !== null) ? value : defaultValue;
- },
-
- "setProperty": function(prop, val) {
- $.cookie(prop, val, { domain: Preferences.Domain, path: '/' });
- },
-
- "delProperty": function(prop) {
- $.cookie(prop, null, { domain: Preferences.Domain, path: '/' });
- }
-};
diff --git a/static/js/src/search.js b/static/js/src/search.js
index d854e34..f62f432 100644
--- a/static/js/src/search.js
+++ b/static/js/src/search.js
@@ -1,5 +1,5 @@
-var Search = {
+Search = {
'term': "",
'images': [],
diff --git a/static/js/src/spacefill.js b/static/js/src/spacefill.js
index adf16bf..404adc0 100644
--- a/static/js/src/spacefill.js
+++ b/static/js/src/spacefill.js
@@ -1,4 +1,4 @@
-var ColumnFill = {
+window.ColumnFill = {
"init": function(){
var cfg = SpaceFill.config
var numColumns = ColumnFill.calcColumns()
@@ -75,7 +75,7 @@ var ColumnFill = {
}
-var SpaceFill = {
+window.SpaceFill = {
"init": function(config){
config.type = "columns"
SpaceFill.config = config