kopia lustrzana https://github.com/c9/core
Set year of c9.ide.help dinamically
rodzic
718f53d835
commit
6e23b7834b
|
@ -22,6 +22,9 @@ define(function(require, exports, module) {
|
|||
var aboutDialog;
|
||||
|
||||
function load() {
|
||||
var year = (new Date()).getFullYear();
|
||||
markup = formatString(markup, year);
|
||||
|
||||
menus.addItemByPath("Cloud9/About Cloud9", new ui.item({
|
||||
onclick: function() { showAbout(); }
|
||||
}), 100, plugin);
|
||||
|
@ -136,6 +139,13 @@ define(function(require, exports, module) {
|
|||
document.getElementById("c9Version").textContent = "Version " + version;
|
||||
}
|
||||
|
||||
function formatString(str) {
|
||||
var args = Array.prototype.slice.call(arguments).slice(1);
|
||||
return str.replace(/{(\d+)}/g, function(match, number) {
|
||||
return typeof args[number] != 'undefined' ? args[number] : match;
|
||||
});
|
||||
}
|
||||
|
||||
/***** Lifecycle *****/
|
||||
|
||||
plugin.on("load", function() {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="c9Copyright">
|
||||
<p>© 2010 — 2017 Cloud9 Inc. All rights reserved</p>
|
||||
<p>© 2010 — {0} Cloud9 Inc. All rights reserved</p>
|
||||
</div>
|
||||
</div>
|
||||
</a:window>
|
||||
|
|
Ładowanie…
Reference in New Issue