Skip to content

Commit

Permalink
Added config option to disable the Github ribbon.
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoe75 committed Feb 24, 2014
1 parent 39693a4 commit 293a887
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
18 changes: 12 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</head>

<body>
<div id='ribbon'>
<div id='ribbon' style='display:none;'>
<a href="https://github.com/johndoe75/p2pool-node-status">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="img/forkme_right_orange_ff7600.png" alt="Fork me on GitHub">
</a>
Expand Down Expand Up @@ -194,6 +194,10 @@ <h4>Recent blocks</h4>
<script type="text/javascript">

$(document).ready(function() {
// shall the Github ribbon been shown?
if(config.show_github_ribbon) { $('#ribbon').fadeIn(1000); }
else { $('#ribbon').remove(); }

$(document).trigger('init');
});

Expand Down Expand Up @@ -526,11 +530,13 @@ <h4>Recent blocks</h4>

// Let the GitHub ribbon fade out and be removed after 5 seconds.

setTimeout(function() {
$('#ribbon').fadeOut(1000, function() {
this.remove();
});
}, 10 * 1000);
if(config.show_github_ribbon) {
setTimeout(function() {
$('#ribbon').fadeOut(1000, function() {
this.remove();
});
}, 5 * 1000);
}

// update tables and miner data

Expand Down
3 changes: 2 additions & 1 deletion js/config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ var config = {
reload_interval : 30,
// chart reload interval in seconds
reload_chart_interval : 600,
use_fontawesome: true
use_fontawesome: true,
show_github_ribbon: true
}
3 changes: 2 additions & 1 deletion js/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ var config = {
reload_interval : 30,
// chart reload interval in seconds
reload_chart_interval : 600,
use_fontawesome: true
use_fontawesome: true,
show_github_ribbon: true
}

0 comments on commit 293a887

Please sign in to comment.