fix text wrapping style issues in player tracker (fixes #212)
This commit is contained in:
parent
cfc4443e3d
commit
2396f34e7a
@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @id iitc-plugin-player-tracker@breunigs
|
// @id iitc-plugin-player-tracker@breunigs
|
||||||
// @name iitc: player tracker
|
// @name iitc: player tracker
|
||||||
// @version 0.1
|
// @version 0.2
|
||||||
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
// @namespace https://github.com/breunigs/ingress-intel-total-conversion
|
||||||
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js
|
// @updateURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js
|
||||||
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js
|
// @downloadURL https://raw.github.com/breunigs/ingress-intel-total-conversion/gh-pages/plugins/player-tracker.user.js
|
||||||
@ -208,11 +208,12 @@ window.plugin.playerTracker.drawData = function() {
|
|||||||
+ ago(last.time, now) + ' minutes ago\n'
|
+ ago(last.time, now) + ' minutes ago\n'
|
||||||
+ last.name;
|
+ last.name;
|
||||||
// show previous data in tooltip
|
// show previous data in tooltip
|
||||||
|
var minsAgo = '\t<span style="white-space: nowrap;">mins ago</span>\t';
|
||||||
if(evtsLength >= 2)
|
if(evtsLength >= 2)
|
||||||
title += '\n \nprevious locations:\n';
|
title += '\n \nprevious locations:\n';
|
||||||
for(var i = evtsLength - 2; i >= 0 && i >= evtsLength - 10; i--) {
|
for(var i = evtsLength - 2; i >= 0 && i >= evtsLength - 10; i--) {
|
||||||
var ev = playerData.events[i];
|
var ev = playerData.events[i];
|
||||||
title += ago(ev.time, now) + '\tmins ago\t' + ev.name + '\n';
|
title += ago(ev.time, now) + minsAgo + ev.name + '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
// marker itself
|
// marker itself
|
||||||
|
Loading…
x
Reference in New Issue
Block a user