From 5bbfc85c0c79f11d3f83a65ef969b241b98f0ca3 Mon Sep 17 00:00:00 2001 From: anonfagola Date: Wed, 24 Sep 2014 18:23:15 -0700 Subject: [PATCH] Added icon changing when thread updated. makeIcon should also have the little *bleep* sound. --- js/auto-reload.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/auto-reload.js b/js/auto-reload.js index 548d947e..633e1673 100644 --- a/js/auto-reload.js +++ b/js/auto-reload.js @@ -16,8 +16,16 @@ * */ + +au = false; auto_reload_enabled = true; // for watch.js to interop +function makeIcon(){ + if(au) return; + au = true; + $("link[rel='icon']").attr("href", "favicon_au.png"); +} + $(document).ready(function(){ if($('div.banner').length == 0) return; // not index @@ -98,6 +106,7 @@ $(document).ready(function(){ if($('#' + id).length == 0) { if (!new_posts) { first_new_post = this; + makeIcon(); } $(this).insertAfter($('div.post:last').next()).after('
'); new_posts++;