mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
Add support for 'webpage-title' setting, default title to server-name
This commit is contained in:
parent
43b7f22285
commit
0e118af51e
@ -24,6 +24,10 @@ public class ClientConfigurationComponent extends Component {
|
||||
s(t, "sidebaropened", c.getString("sidebaropened", "false"));
|
||||
s(t, "dynmapversion", plugin.getDescription().getVersion());
|
||||
s(t, "cyrillic", c.getBoolean("cyrillic-support", false));
|
||||
String sn = plugin.getServer().getServerName();
|
||||
if(sn.equals("Unknown Server"))
|
||||
sn = "Minecraft Dynamic Map";
|
||||
s(t, "title", c.getString("webpage-title", sn));
|
||||
|
||||
DynmapWorld defaultWorld = null;
|
||||
String defmap = null;
|
||||
|
@ -304,6 +304,9 @@ render-triggers:
|
||||
- pistonmoved
|
||||
- explosion
|
||||
|
||||
# Title for the web page - if not specified, defaults to the server's name (unless it is the default of 'Unknown Server')
|
||||
#webpage-title: "My Awesome Server Map"
|
||||
|
||||
# The path where the tile-files are placed.
|
||||
tilespath: web/tiles
|
||||
|
||||
|
@ -101,6 +101,9 @@ DynMap.prototype = {
|
||||
.addClass('map')
|
||||
.appendTo(container);
|
||||
|
||||
if(me.options.title)
|
||||
document.title = me.options.title;
|
||||
|
||||
var urlzoom = me.getIntParameterByName('zoom');
|
||||
if(urlzoom != null)
|
||||
me.options.defaultzoom = urlzoom;
|
||||
|
Loading…
Reference in New Issue
Block a user