Skip to content

Commit

Permalink
Convert version text into link
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyiacono committed Jun 26, 2016
1 parent e639bef commit b16830a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
6 changes: 5 additions & 1 deletion css/popup.css
Expand Up @@ -198,7 +198,11 @@ input {
display: block;
text-align: center;
font-size: 10px;
color: #888;
margin: 9px 0 0 0;
padding: 0;
}

#current-version a {
color: #888;
text-decoration: none;
}
14 changes: 13 additions & 1 deletion js/popup.js
Expand Up @@ -62,8 +62,20 @@ $(function() {

showCurrentVersion: function() {
var self = this;

$.getJSON('manifest.json', function(data) {
$(self.el).find('#current-version').text('penalty-box-v' + data['version']);
$('<a>', {
text: 'penalty-box-v' + data['version'],
title: 'version you\'re running',
href: 'https://github.com/jeffreyiacono/penalty-blox'
}).on('click', function(e) {
chrome.tabs.create({
url: $(e.target).attr('href')
});
return false;
}).appendTo(
'#current-version'
);
});
},

Expand Down

0 comments on commit b16830a

Please sign in to comment.