Fix toggle button style to render correctly in Firefox
This commit is contained in:
parent
441522a500
commit
8b191ffacb
|
@ -94,6 +94,10 @@ html.octotree {
|
|||
.jstree-anchor {
|
||||
color: #4183c4 !important;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
}
|
||||
.jstree-anchor:hover {
|
||||
text-decoration: none !important; /* Safari needs this */
|
||||
}
|
||||
|
||||
.jstree-default .jstree-wholerow {
|
||||
|
@ -144,25 +148,34 @@ html.octotree {
|
|||
left: 5px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-family: octicons;
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
padding: 6px 10px !important;
|
||||
color: black;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
z-index: 999992;
|
||||
transition: left 0.2s ease, color 0.1s ease-in;
|
||||
-webkit-transition: left 0.2s ease, color 0.1s ease-in;
|
||||
}
|
||||
.octotree_toggle:after {
|
||||
content: '\f078';
|
||||
}
|
||||
.octotree_toggle:hover {
|
||||
color: #4183C4;
|
||||
}
|
||||
|
||||
.octotree_toggle > span {
|
||||
font: normal normal 16px octicons;
|
||||
line-height: 1;
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
}
|
||||
|
||||
.octotree_toggle > span:after {
|
||||
content: '\f078';
|
||||
}
|
||||
|
||||
.octotree .octotree_toggle {
|
||||
left: 214px;
|
||||
}
|
||||
.octotree .octotree_toggle:after {
|
||||
.octotree .octotree_toggle > span:after {
|
||||
content: '\f0a4';
|
||||
}
|
|
@ -28,7 +28,7 @@
|
|||
'</div>' +
|
||||
'<div class="error"></div>' +
|
||||
'</form>')
|
||||
, $toggleBtn = $('<div class="octotree_toggle button"></div>')
|
||||
, $toggleBtn = $('<a class="octotree_toggle button"><span></span></a>')
|
||||
, $dummyDiv = $('<div/>')
|
||||
, store = new Storage()
|
||||
, domInitialized = false
|
||||
|
@ -38,7 +38,7 @@
|
|||
loadRepo()
|
||||
|
||||
// When navigating from non-code pages (i.e. Pulls, Issues) to code page
|
||||
// GitHub doesn't reload the page but use pjax. Need to de
|
||||
// GitHub doesn't reload the page but use pjax. Need to detect and load Octotree.
|
||||
var href = location.href
|
||||
, hash = location.hash
|
||||
function detectLocationChange() {
|
||||
|
@ -74,12 +74,17 @@
|
|||
}
|
||||
|
||||
function getRepoFromPath() {
|
||||
if (!!$('#parallax_wrapper').length) return false
|
||||
// 404 page, skip
|
||||
if ($('#parallax_wrapper').length) return false
|
||||
|
||||
var match = location.pathname.match(REGEXP)
|
||||
if (!match) return false
|
||||
|
||||
// Not a repository, skip
|
||||
if (~RESERVED_USER_NAMES.indexOf(match[1])) return false
|
||||
if (~RESERVED_REPO_NAMES.indexOf(match[2])) return false
|
||||
|
||||
// Not a code page, skip
|
||||
if (match[3] && !~['tree', 'blob'].indexOf(match[3])) return false
|
||||
|
||||
return {
|
||||
|
@ -248,5 +253,4 @@
|
|||
return localStorage.setItem(key, JSON.stringify(val))
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
})()
|
Loading…
Reference in New Issue