Permalink
Browse files

Better and more expandable list of possible 'actions' to check.

  • Loading branch information...
1 parent 137cab4 commit 1d414f3d272e2901f8e7f5cdf0df42dc53d3a8d9 @tupton tupton committed May 10, 2012
Showing with 6 additions and 4 deletions.
  1. +3 −2 pkg/github.com.js
  2. +3 −2 src/header.js
View
@@ -1,7 +1,8 @@
var _INLINE_CSS = ".str { color: #080; }.kwd { color: #008; }.com { color: #800; }.typ { color: #606; }.lit { color: #066; }.pun { color: #660; }.pln { color: #000; }.tag { color: #008; }.atn { color: #606; }.atv { color: #080; }.dec { color: #606; }pre.prettyprint { padding: 2px; }ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }li.L1,li.L3,li.L5,li.L7,li.L9 { background: #eee }@media print { .str { color: #060; } .kwd { color: #006; font-weight: bold; } .com { color: #600; font-style: italic; } .typ { color: #404; font-weight: bold; } .lit { color: #044; } .pun { color: #440; } .pln { color: #000; } .tag { color: #006; font-weight: bold; } .atn { color: #404; } .atv { color: #060; }}.prettyprint ol,.prettyprint ul { list-style: none;}.prettyprint ol.linenums { list-style: decimal outside; padding-left: 47px; color:#AFAFAF; font-size:12px;}.prettyprint ol.linenums li { padding-left: 15px; border-left:3px #6CE26C solid;}.prettyprint li > * { font-size:14px;}.prettyprint { padding: 7px 0 5px; font-size: 14px; white-space: pre; overflow: auto; max-height: 500px; width: 100%; display: block;}.prettyprint ol, .prettyprint ul { padding: 5px 0;}.prettyprint li.L0,.prettyprint li.L1,.prettyprint li.L2,.prettyprint li.L3,.prettyprint li.L4,.prettyprint li.L5,.prettyprint li.L6,.prettyprint li.L7,.prettyprint li.L8,.prettyprint li.L9 { list-style:inherit; background:none;}.prettyprint.alternate .prettyprint.alternate li.L1, .prettyprint.alternate li.L3, .prettyprint.alternate li.L5, .prettyprint.alternate li.L7, .prettyprint.alternate li.L9 { background:#F5F5F5;}.prettyprint.theme-balupton { font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; font-style: normal; font-weight: normal; line-height: 15px;}.prettyprint.theme-balupton .com { color: #008200; /* balupton green */}.prettyprint.theme-balupton .lit { color: #066; /* google green */}.prettyprint.theme-balupton.lang-html .lit { /* CSS Property Value */ color: #066; /* google green */}.prettyprint.theme-balupton.lang-html .kwd { /* CSS Property Value Keyword */ color: #066; /* google green */ font-weight:bold;}.prettyprint.theme-balupton.lang-html .atv + .pln,.prettyprint.theme-balupton.lang-html .pun + .pln { /* CSS Property Name */ color: blue;}.prettyprint.theme-balupton .atv,.prettyprint.theme-balupton .str { color: blue;}.prettyprint.theme-balupton .atn { color: gray;}.prettyprint.theme-balupton .pln { color: black;}.prettyprint.theme-balupton .pun { color: #666;}.prettyprint.theme-balupton .typ { color: #606;}.prettyprint.theme-balupton .tag,.prettyprint.theme-balupton .kwd { color: #006699; font-weight: bold;}";
$(function() {
- var action = window.location.href.split("/")[5];
- if (action != 'commit' && action != 'pulls') {
+ var valid_actions = ['commit', 'pull', 'pulls'],
+ action = window.location.pathname.split("/")[3];
+ if (!$.inArray(action, valid_actions)) {
return;
}
/**
View
@@ -1,5 +1,6 @@
$(function() {
- var action = window.location.href.split("/")[5];
- if (action != 'commit' && action != 'pulls' && action != 'pull') {
+ var valid_actions = ['commit', 'pull', 'pulls'],
+ action = window.location.pathname.split("/")[3];
+ if (!$.inArray(action, valid_actions)) {
return;
}

0 comments on commit 1d414f3

Please sign in to comment.