Added sign out link when hovering over name (fixes #352)
This commit is contained in:
parent
62c6f0e397
commit
32ca78b1d7
11
code/boot.js
11
code/boot.js
@ -186,13 +186,22 @@ window.setupPlayerStat = function() {
|
|||||||
|
|
||||||
$('#playerstat').html(''
|
$('#playerstat').html(''
|
||||||
+ '<h2 title="'+t+'">'+level+' '
|
+ '<h2 title="'+t+'">'+level+' '
|
||||||
|
+ '<div id="name">'
|
||||||
+ '<span class="'+cls+'">'+PLAYER.nickname+'</span>'
|
+ '<span class="'+cls+'">'+PLAYER.nickname+'</span>'
|
||||||
+ '<div>'
|
+ '<a href="https://www.ingress.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttps://appengine.google.com/_ah/logout%253Fcontinue%253Dhttps://www.ingress.com/intel%26service%3Dah" id="signout">sign out</a>'
|
||||||
|
+ '</div>'
|
||||||
|
+ '<div id="stats">'
|
||||||
+ '<sup>XM: '+xmRatio+'%</sup>'
|
+ '<sup>XM: '+xmRatio+'%</sup>'
|
||||||
+ '<sub>' + (level < 8 ? 'level: '+lvlApProg+'%' : 'max level') + '</sub>'
|
+ '<sub>' + (level < 8 ? 'level: '+lvlApProg+'%' : 'max level') + '</sub>'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '</h2>'
|
+ '</h2>'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$('#name').mouseenter(function() {
|
||||||
|
$('#signout').show();
|
||||||
|
}).mouseleave(function() {
|
||||||
|
$('#signout').hide();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.setupSidebarToggle = function() {
|
window.setupSidebarToggle = function() {
|
||||||
|
17
style.css
17
style.css
@ -329,21 +329,34 @@ h2 {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 span {
|
h2 #name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: "~";
|
text-overflow: "~";
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 205px;
|
width: 205px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 div {
|
h2 #stats {
|
||||||
float: right;
|
float: right;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2 #signout {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 29px;
|
||||||
|
padding: 0 4px;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: rgba(8, 48, 78, 0.5);
|
||||||
|
display: none; /* starts hidden */
|
||||||
|
}
|
||||||
|
|
||||||
h2 sup, h2 sub {
|
h2 sup, h2 sub {
|
||||||
display: block;
|
display: block;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user