diff options
| author | Simon McFarlane <simon@piston.pw> | 2015-05-26 23:31:47 -0700 |
|---|---|---|
| committer | Simon McFarlane <simon@piston.pw> | 2015-05-29 01:34:53 -0700 |
| commit | 4b40f69a4e6d190f6d342875bd084c2a6c9d8b0f (patch) | |
| tree | fcc5dc9efa24afcb0bda3740b59f0c4e81c42f62 /js/watch.js | |
| parent | 2ac451ecb7aaae1ed1402425b8df6a5cb9831f2b (diff) | |
| parent | d20149b57929c27da87a7d9603d85717da15c5bc (diff) | |
Merge remote-tracking branch 'upstream/master' into vichan-merge
Diffstat (limited to 'js/watch.js')
| -rw-r--r-- | js/watch.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/watch.js b/js/watch.js index a202130f..07c6942a 100644 --- a/js/watch.js +++ b/js/watch.js @@ -98,6 +98,9 @@ $(function(){ else { bc.threads = bc.threads || {}; bc.threads[thread] = Date.now(); + + bc.slugs = bc.slugs || {}; + bc.slugs[thread] = document.location.pathname + document.location.search; } st[board] = bc; storage_save(st); @@ -121,7 +124,7 @@ $(function(){ var tag; if (variant == 'desktop') { - tag = $("<a href='"+modRoot+board+"/res/"+tid+".html'><span>#"+tid+"</span><span class='cb-uri watch-remove'>"+newposts+"</span>"); + tag = $("<a href='"+((storage()[board].slugs && storage()[board].slugs[tid]) || (modRoot+board+"/res/"+tid+".html"))+"'><span>#"+tid+"</span><span class='cb-uri watch-remove'>"+newposts+"</span>"); tag.find(".watch-remove").mouseenter(function() { this.oldval = $(this).html(); $(this).css("min-width", $(this).width()); @@ -132,7 +135,7 @@ $(function(){ }) } else if (variant == 'mobile') { - tag = $("<a href='"+modRoot+board+"/res/"+tid+".html'><span>#"+tid+"</span><span class='cb-uri'>"+newposts+"</span>" + tag = $("<a href='"+((storage()[board].slugs && storage()[board].slugs[tid]) || (modRoot+board+"/res/"+tid+".html"))+"'><span>#"+tid+"</span><span class='cb-uri'>"+newposts+"</span>" +"<span class='cb-uri watch-remove'><i class='fa fa-minus'></i></span>"); } @@ -245,7 +248,7 @@ $(function(){ var st = storage(); var sched = 0; - var sched_diff = 300; + var sched_diff = 2000; for (var i in st) { if (st[i].watched) { |
