Skip to content

Commit 4e21c0d

Browse files
committed
only run dashboard code on dashboard page
1 parent 2cdf8d2 commit 4e21c0d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/assets/javascripts/dash.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ $( document ).ready(function() {
77

88
(function() {
99

10-
if($('.dash')){
10+
if( $('.dash').length ){
1111

12-
var timeTilPageReloads = 15000,
13-
timeTilHighlightNominee = 800,
14-
highlightDuration = 20000;
12+
var timeTilPageReloads = 33000,
13+
timeTilHighlightNominee = 4000,
14+
highlightDuration = 30000;
1515

1616
var $nominee = $('td.nominee').random();
1717
$('.reason-bridge').html($nominee.find('.hidden').html());

app/views/home/dash.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
%h4.text-center
1515
= nominee.name
1616
%br
17-
= link_to "@#{nominee.login}", "https://github.com/#{nominee.login}", class: 'small', target: '_blank'
17+
= "@#{nominee.login}"
1818

1919
- nominee.votes.last.tap do |vote|
2020
.reason.hidden

0 commit comments

Comments
 (0)