Formatting (bloody ide not doing qml)

This commit is contained in:
Fluffy Jenkins 2020-01-16 19:44:34 +00:00
parent 1e47165303
commit 6bed25ee27
2 changed files with 17 additions and 18 deletions

View file

@ -188,7 +188,6 @@ function go2(msg) {
domainsList.forEach(function (domain) {
if (domain["Domain Name"].toLowerCase().indexOf(msg.toLowerCase()) !== -1 && !dest) {
dest = {"name": domain["Domain Name"], "url": domain["Visit"]};
}
});
return dest;
@ -217,7 +216,7 @@ function processChat(cmd) {
if (msg.indexOf("/") === 0) {
msg = msg.substring(1);
var commandList = msg.split(" ");
var tempList = commandList.join(";'#[]").split(";'#[]");
var tempList = commandList.concat();
tempList.shift();
var restOfMsg = tempList.join(" ");

View file

@ -30,19 +30,19 @@ Rectangle {
} catch(e){
//
}
if(!data.failed){
if(data.cmd){
if (!data.failed) {
if (data.cmd) {
JSConsole.executeCommand(data.msg);
}
console.log(data.visible);
if(data.visible){
if (data.visible) {
thing.visible = true;
textArea.focus = true;
} else if(!data.visible){
} else if (!data.visible) {
thing.visible = false;
textArea.focus = false;
}
if(data.history){
if (data.history) {
history = data.history;
}
}
@ -69,36 +69,36 @@ Rectangle {
clip: false
font.pointSize: 20
function _onEnterPressed(event){
sendMessage(JSON.stringify({type:"MSG",message:text,event:event}));
function _onEnterPressed(event) {
sendMessage(JSON.stringify({type:"MSG", message:text, event:event}));
history.unshift(text);
text = "";
hist = -1;
}
function upPressed(event){
function upPressed(event) {
hist++;
if(hist > history.length-1){
if (hist > history.length-1) {
hist = history.length-1;
}
text = history[hist];
}
function downPressed(event){
function downPressed(event) {
hist--;
if(hist<-1){
if (hist < -1) {
hist = -1;
}
if(hist===-1){
if (hist === -1) {
text = "";
} else{
text = history[hist];
}
}
Keys.onReturnPressed: { _onEnterPressed(event) }
Keys.onEnterPressed: { _onEnterPressed(event) }
Keys.onUpPressed: { upPressed(event) }
Keys.onDownPressed: { downPressed(event) }
Keys.onReturnPressed: { _onEnterPressed(event); }
Keys.onEnterPressed: { _onEnterPressed(event); }
Keys.onUpPressed: { upPressed(event); }
Keys.onDownPressed: { downPressed(event); }
}
MouseArea {