Skip to content

Commit

Permalink
optional-js-tree
Browse files Browse the repository at this point in the history
- Minor PR changes
  • Loading branch information
brentyates committed Apr 27, 2015
1 parent 26e6493 commit 4669dba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions options.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<title>Options - Pretty pull requests</title>
<title>Options - Pretty Pull Requests</title>
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="options.css">
</head>
Expand All @@ -16,7 +16,7 @@
<h1>Options</h1>
<div class="form-group">
<label for="url">
Github enterprise URL
Github Enterprise URL
</label>
<input id="url" type="url" class="form-control">
</div>
Expand Down
2 changes: 1 addition & 1 deletion options.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// Add new items here to get them loaded and their values put in the form.
}, setFormValues);

$('#options-form').on('submit', function (e) {
$('#options-form').submit(function (e) {
e.preventDefault();

var $form = $(e.currentTarget);
Expand Down
4 changes: 3 additions & 1 deletion pullrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
var isGitHub = $("meta[property='og:site_name']").attr('content') === 'GitHub';

function htmlIsInjected() {
return $('.collapse-lines').length !== 0;
return document.getElementById('pretty-pull-requests') !== undefined;
}

function injectHtml() {
$('body').prepend('<div id="pretty-pull-requests"></div>');

$('<span class="collapse-lines">' +
'<label><input type="checkbox" class="js-collapse-additions" checked="yes">+</label>' +
'<label><input type="checkbox" class="js-collapse-deletions" checked="yes">-</label>' +
Expand Down

0 comments on commit 4669dba

Please sign in to comment.