Added dynamic page title
This commit is contained in:
parent
14cd7e2409
commit
095bdc407b
|
@ -113,7 +113,7 @@ socket.emit("networks", {
|
|||
networks: [{
|
||||
id: 0,
|
||||
host: "",
|
||||
nick: "",
|
||||
name: "",
|
||||
channels: [],
|
||||
}]
|
||||
});
|
||||
|
|
|
@ -130,7 +130,6 @@ button {
|
|||
color: #84d1ff !important;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
#sidebar .close {
|
||||
background: no-repeat url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQogPGc+DQogIDx0aXRsZT5MYXllciAxPC90aXRsZT4NCiAgPHBhdGggZmlsbD0iI2ZmZmZmZiIgaWQ9InN2Z18xIiBkPSJtMTIuODcyLDEuNTYyYzAuMTk1MDAxLDAuMTk0IDAuMTk1MDAxLDAuNTEzIDAsMC43MDdsLTMuODg5LDMuODkxYy0wLjE5MywwLjE5NCAtMC4xOTMsMC41MTMgMCwwLjcwOGwzLjg4NywzLjg5MmMwLjE5NSwwLjE5NCAwLjE5NSwwLjUxMyAwLDAuNzA3bC0xLjQxNTk5OSwxLjQxM2MtMC4xOTMwMDEsMC4xOTQgLTAuNTEyLDAuMTk0IC0wLjcwNzAwMSwwbC0zLjg4NSwtMy44OTJjLTAuMTk0LC0wLjE5NCAtMC41MTMsLTAuMTk0IC0wLjcwNywwbC0zLjg4OSwzLjg4OWMtMC4xOTQsMC4xOTUgLTAuNTEzLDAuMTk1IC0wLjcwNywwbC0xLjQxNCwtMS40MTU5OTljLTAuMTk0LC0wLjE5MzAwMSAtMC4xOTQsLTAuNTEyIDAsLTAuNzA3MDAxbDMuODksLTMuODg5YzAuMTk0LC0wLjE5NCAwLjE5NCwtMC41MTMgMCwtMC43MDhsLTMuODg3LC0zLjg5MWMtMC4xOTQsLTAuMTk1IC0wLjE5NCwtMC41MTMgMCwtMC43MDdsMS40MTUsLTEuNDE0YzAuMTk0LC0wLjE5NCAwLjUxMywtMC4xOTQgMC43MDcsMGwzLjg4NSwzLjg5MWMwLjE5NCwwLjE5NSAwLjUxMywwLjE5NSAwLjcwNywwLjAwMWwzLjg4OCwtMy44OWMwLjE5NSwtMC4xOTMgMC41MTQsLTAuMTkzIDAuNzA3LDBsMS40MTUsMS40MTV6Ii8+DQogPC9nPg0KPC9zdmc+);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 333 B |
|
@ -69,7 +69,7 @@
|
|||
|
||||
<script type="text/html" class="channels">
|
||||
{{#each channels}}
|
||||
<a href="#window-{{id}}" id="channel-{{id}}" class="{{type}}">
|
||||
<a href="#window-{{id}}" id="channel-{{id}}" class="{{type}}" data-name="{{name}}">
|
||||
<span class="badge"></span>
|
||||
<span class="close"></span>
|
||||
{{name}}
|
||||
|
|
|
@ -204,6 +204,7 @@ $(function() {
|
|||
.empty();
|
||||
|
||||
$.cookie("current", target);
|
||||
document.title = link.data("name") + " — Shout";
|
||||
|
||||
if (sidebar.find(".highlight").length == 0) {
|
||||
favicon.badge("");
|
||||
|
|
|
@ -9,12 +9,10 @@ function Network(attr) {
|
|||
client: null,
|
||||
connected: false,
|
||||
host: "",
|
||||
nick: "",
|
||||
name: attr.host.split(".")[1].capitalize() || attr.host,
|
||||
channels: [],
|
||||
}, attr));
|
||||
|
||||
this.name = this.host.split(".")[1] || clone.host;
|
||||
|
||||
// Add lobby
|
||||
this.channels.unshift(
|
||||
new Chan({name: this.name, type: "lobby"})
|
||||
|
@ -33,3 +31,7 @@ Network.prototype.toJSON = function() {
|
|||
]);
|
||||
return clone;
|
||||
};
|
||||
|
||||
String.prototype.capitalize = function() {
|
||||
return this.charAt(0).toUpperCase() + this.slice(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue