diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2014-06-28 12:22:17 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2014-06-28 12:22:17 -0400 |
| commit | b04eea907242bb895f9578638f5f05612311fa66 (patch) | |
| tree | 8af5175552815e15149cdfe9b7d31aab273946b7 /static | |
| parent | 0f957d316cfae62f9cfabc8df1d26e906de3e553 (diff) | |
fix bug where personal mutes didnt affect .oldmsg divs
Diffstat (limited to 'static')
| -rwxr-xr-x | static/css/dump.css | 1 | ||||
| -rw-r--r-- | static/js/pichat.js | 27 | ||||
| -rw-r--r-- | static/js/src/chat.js | 14 | ||||
| -rw-r--r-- | static/js/src/userlist.js | 13 | ||||
| -rw-r--r-- | static/register.html | 85 |
5 files changed, 72 insertions, 68 deletions
diff --git a/static/css/dump.css b/static/css/dump.css index 33211a3..acf9ea6 100755 --- a/static/css/dump.css +++ b/static/css/dump.css @@ -847,6 +847,7 @@ a:active { } #userList { + z-index: 20; overflow-x: hidden; overflow-y: auto; max-height: 76%; diff --git a/static/js/pichat.js b/static/js/pichat.js index b0bba88..1003880 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -281,6 +281,7 @@ window.Away = { function initChat() { Search.initInpage() + initMutes() $('#textbutton input').attr('checked', TextEnabled).change(setTextEnable); $('#imgbutton input').attr('checked', ImgsEnabled).change(setImgsEnable); @@ -298,10 +299,17 @@ function initChat() { MessageContentCache[dump.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(); - else + if ((ImgsEnabled && dump.hasClass('contains-image')) || (TextEnabled && !dump.hasClass('contains-image'))) { + if (dump.attr('nick') in MUTES) { + dump.hide(); + } + else { + dump.show(); + } + } + else { dump.hide(); + } }); Drag.bindImages(); @@ -2248,11 +2256,14 @@ function linkReplaceWithoutImage(url){ return "<a target='_blank' href='" + linkUrl + "'>" + url + "</a>" } -try { - var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; -} -catch (e) { - delete localStorage["mutes"] +function initMutes(){ + try { + window.MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; + } + catch (e) { + delete localStorage["mutes"] + window.MUTES = {} + } } $(".mute").live("click", function(){ $(this).removeClass("mute"); diff --git a/static/js/src/chat.js b/static/js/src/chat.js index e59e948..b2816c7 100644 --- a/static/js/src/chat.js +++ b/static/js/src/chat.js @@ -2,6 +2,7 @@ function initChat() { Search.initInpage() + initMutes() $('#textbutton input').attr('checked', TextEnabled).change(setTextEnable); $('#imgbutton input').attr('checked', ImgsEnabled).change(setImgsEnable); @@ -19,10 +20,17 @@ function initChat() { MessageContentCache[dump.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(); - else + if ((ImgsEnabled && dump.hasClass('contains-image')) || (TextEnabled && !dump.hasClass('contains-image'))) { + if (dump.attr('nick') in MUTES) { + dump.hide(); + } + else { + dump.show(); + } + } + else { dump.hide(); + } }); Drag.bindImages(); diff --git a/static/js/src/userlist.js b/static/js/src/userlist.js index 3ccb9b2..5ed34be 100644 --- a/static/js/src/userlist.js +++ b/static/js/src/userlist.js @@ -1,8 +1,11 @@ -try { - var MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; -} -catch (e) { - delete localStorage["mutes"] +function initMutes(){ + try { + window.MUTES = localStorage["mutes"] ? JSON.parse(localStorage["mutes"]) : {}; + } + catch (e) { + delete localStorage["mutes"] + window.MUTES = {} + } } $(".mute").live("click", function(){ $(this).removeClass("mute"); diff --git a/static/register.html b/static/register.html index 0382d56..7ccf80d 100644 --- a/static/register.html +++ b/static/register.html @@ -1,67 +1,48 @@ -<html><head> +<html> + <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> - <script type="text/javascript" src="http://dump.fm//static/js/underscore-min.js"></script> - <script type="text/javascript" src="http://dump.fm//static/js/register.js"></script> + <script type="text/javascript" src="/static/js/underscore-min.js"></script> + <script type="text/javascript" src="/static/js/register.js"></script> <script> $(document).ready(initRegister); </script> - <link rel="stylesheet" type="text/css" href="http://dump.fm/static/css/index.css"> - - <link rel="shortcut icon" href="static/favicon.ico"> + <link rel="stylesheet" type="text/css" href="static/css/index.css"> + <link rel="shortcut icon" href="static/favicon.ico"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> - <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <META NAME="keywords" CONTENT="dump.fm, image chat, realtime, internet 3.0, dump, dump fm, image dump, pictures, image links, image board"> <META NAME="description" CONTENT="Talk with pictures!"> <title>dump.fm - register</title></head> -<body> - -<div id="rapper"></div> -<div id="content" style="z-index:77;"> + <body> -<div id="main" align="center"> + <div id="rapper"></div> + <div id="content" style="z-index:77;height:100%;"> - <div id="passwordreset"> - <img src="/static/img/furie3.png" id="furie3" /> - <div id="passwordreset"> - <div id="logo-and-text"> - <a href="/"><img src="/static/img/dumppixellarge3.png"></a> - <div align="center"> - <label style="text-align:left;margin-bottom:-8px;">username</label> - <input type="text" class="field"id="nickInput" /> - <br> - - <label style="text-align:left;margin-bottom:-8px;">password</label> - <input type="password" class="field" id="passwordInput" /> - <br> - <label style="text-align:left;margin-bottom:-8px;">password2x</label> - <input type="password" class="field" id="passwordInput2" /> - - <label style="text-align:left;margin-bottom:-8px;">email</label> - <input type="text" class="field"id="emailInput" /> - </h1> + <div id="main" align="center"> - </form> - - <br> - - - <div align="center"> - <input type="submit" class="submit" id="submit" value="Register!" /> + <div id="passwordreset"> + <div id="passwordreset"> + <div id="logo-and-text"> + <a href="/"><img src="/static/img/dumppixellarge3.png"></a> + <div align="center"> + <label style="text-align:center;margin-bottom:10px;">Registration is currently closed. + + <br><br> + Maybe ask a friend?</label> + + </div> + </div> + </div> </div> - </div> - </div> - </div> -</div> -<script type="text/javascript"> -var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); -document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); -</script> -<script type="text/javascript"> -try { -var pageTracker = _gat._getTracker("UA-12364576-1"); -pageTracker._trackPageview(); -} catch(err) {}</script> + <script type="text/javascript"> + var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); + document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); + </script> + <script type="text/javascript"> + try { + var pageTracker = _gat._getTracker("UA-12364576-1"); + pageTracker._trackPageview(); + } catch(err) {}</script> -</body> + </body> </html> |
