kopia lustrzana https://github.com/c9/core
Improve reload tip
rodzic
dcf4e5076e
commit
a80297b6eb
|
@ -665,13 +665,7 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload(name) {
|
function reload(name) {
|
||||||
var key = commands.getHotkey("reloadLastPlugin");
|
showReloadTip();
|
||||||
if (commands.platform == "mac")
|
|
||||||
key = apf.hotkeys.toMacNotation(key);
|
|
||||||
if (!getLastReloaded())
|
|
||||||
showInfo("Reloaded " + name + ". Press " + key + " to reload again.", 3000);
|
|
||||||
else
|
|
||||||
showInfo("Reloaded " + name + ".", 1000);
|
|
||||||
|
|
||||||
var href = document.location.href.replace(/[?&]reload=[^&]+/, "")
|
var href = document.location.href.replace(/[?&]reload=[^&]+/, "")
|
||||||
+ (document.location.href.match(/\?/) ? "&" : "?")
|
+ (document.location.href.match(/\?/) ? "&" : "?")
|
||||||
|
@ -687,6 +681,19 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showReloadTip() {
|
||||||
|
if (options.devel) {
|
||||||
|
var key = commands.getHotkey("reloadLastPlugin");
|
||||||
|
if (commands.platform == "mac")
|
||||||
|
key = apf.hotkeys.toMacNotation(key);
|
||||||
|
if (!getLastReloaded()) {
|
||||||
|
showInfo("Reloaded " + name + ". Press " + key + " to reload again.", 3000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showInfo("Reloaded " + name + ".", 1000);
|
||||||
|
}
|
||||||
|
|
||||||
function getLastReloaded() {
|
function getLastReloaded() {
|
||||||
return qs.parse(document.location.search.substr(1)).reload;
|
return qs.parse(document.location.search.substr(1)).reload;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue