mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-12-28 09:38:50 +01:00
[refactor] improve edge module
This commit is contained in:
parent
2fa1fec109
commit
ae905a9fae
@ -83,32 +83,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -116,7 +116,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -211,32 +211,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -244,7 +244,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -257,32 +257,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".layout"),
|
element: helper.e(".layout"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -290,7 +290,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -318,32 +318,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-area")
|
element: helper.e(".header-area")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-area")
|
element: helper.e(".header-area")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-area"),
|
element: helper.e(".header-area"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -351,7 +351,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -363,7 +363,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-area"),
|
element: helper.e(".header-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -371,7 +371,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -389,7 +389,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-area"),
|
element: helper.e(".header-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -405,7 +405,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-area"),
|
element: helper.e(".header-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -421,7 +421,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-area"),
|
element: helper.e(".header-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -501,32 +501,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".greeting"),
|
element: helper.e(".greeting"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".greeting"),
|
element: helper.e(".greeting"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".greeting"),
|
element: helper.e(".greeting"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -534,7 +534,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -546,7 +546,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".greeting"),
|
element: helper.e(".greeting"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -591,32 +591,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".transitional"),
|
element: helper.e(".transitional"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".transitional"),
|
element: helper.e(".transitional"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".transitional"),
|
element: helper.e(".transitional"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -624,7 +624,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -636,7 +636,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".transitional"),
|
element: helper.e(".transitional"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -805,32 +805,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".clock"),
|
element: helper.e(".clock"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".clock"),
|
element: helper.e(".clock"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".clock"),
|
element: helper.e(".clock"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -838,7 +838,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -850,7 +850,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".clock"),
|
element: helper.e(".clock"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1157,32 +1157,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".date"),
|
element: helper.e(".date"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".date"),
|
element: helper.e(".date"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".date"),
|
element: helper.e(".date"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1190,7 +1190,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -1202,7 +1202,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".date"),
|
element: helper.e(".date"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1229,7 +1229,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1247,7 +1247,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1265,32 +1265,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1298,7 +1298,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -1399,32 +1399,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1432,7 +1432,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -1444,7 +1444,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".header-search-input"),
|
element: helper.e(".header-search-input"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1493,32 +1493,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".control-menu-open"),
|
element: helper.e(".control-menu-open"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".control-menu-open"),
|
element: helper.e(".control-menu-open"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".control-menu-open"),
|
element: helper.e(".control-menu-open"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1526,7 +1526,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -1538,7 +1538,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".control-menu-open"),
|
element: helper.e(".control-menu-open"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1612,32 +1612,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-area"),
|
element: helper.e(".link-area"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-area"),
|
element: helper.e(".link-area"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-area"),
|
element: helper.e(".link-area"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1645,7 +1645,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -1657,7 +1657,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-area"),
|
element: helper.e(".link-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1665,7 +1665,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -1683,7 +1683,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-area"),
|
element: helper.e(".link-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1699,7 +1699,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-area"),
|
element: helper.e(".link-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1715,7 +1715,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "change",
|
event: "change",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-area"),
|
element: helper.e(".link-area"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
@ -1732,32 +1732,32 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "input",
|
event: "input",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-item"),
|
element: helper.e(".link-item"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mousedown",
|
event: "mousedown",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-item"),
|
element: helper.e(".link-item"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "mouseup",
|
event: "mouseup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "touchend",
|
event: "touchend",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
event: "keydown",
|
event: "keydown",
|
||||||
func: function() {
|
func: function() {
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-item"),
|
element: helper.e(".link-item"),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -1765,7 +1765,7 @@ var control = (function() {
|
|||||||
}, {
|
}, {
|
||||||
event: "keyup",
|
event: "keyup",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.clear();
|
edge.box.close();
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -1786,7 +1786,7 @@ var control = (function() {
|
|||||||
additionalEvents: [{
|
additionalEvents: [{
|
||||||
event: "click",
|
event: "click",
|
||||||
func: function() {
|
func: function() {
|
||||||
edge.render.box({
|
edge.box.open({
|
||||||
element: helper.e(".link-item"),
|
element: helper.e(".link-item"),
|
||||||
delay: 500
|
delay: 500
|
||||||
});
|
});
|
||||||
|
@ -3,9 +3,27 @@ var edge = (function() {
|
|||||||
var _timer = null;
|
var _timer = null;
|
||||||
var _currentEdge = null;
|
var _currentEdge = null;
|
||||||
|
|
||||||
|
var mod = {};
|
||||||
|
|
||||||
|
mod.open = function() {
|
||||||
|
helper.setObject({
|
||||||
|
object: state.get(),
|
||||||
|
path: "edge",
|
||||||
|
newValue: true
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
mod.close = function() {
|
||||||
|
helper.setObject({
|
||||||
|
object: state.get(),
|
||||||
|
path: "edge",
|
||||||
|
newValue: false
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var render = {};
|
var render = {};
|
||||||
|
|
||||||
render.clear = function() {
|
render.close = function() {
|
||||||
var allEdge = helper.eA(".edge");
|
var allEdge = helper.eA(".edge");
|
||||||
if (allEdge[0]) {
|
if (allEdge[0]) {
|
||||||
for (var i = 0; i < allEdge.length; i++) {
|
for (var i = 0; i < allEdge.length; i++) {
|
||||||
@ -14,7 +32,7 @@ var edge = (function() {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
render.box = function(override) {
|
render.open = function(override) {
|
||||||
var options = {
|
var options = {
|
||||||
element: null,
|
element: null,
|
||||||
delay: null
|
delay: null
|
||||||
@ -32,11 +50,6 @@ var edge = (function() {
|
|||||||
_currentEdge.style.left = rect.left + scrollLeft + "px";
|
_currentEdge.style.left = rect.left + scrollLeft + "px";
|
||||||
};
|
};
|
||||||
var _makeEdge = function() {
|
var _makeEdge = function() {
|
||||||
helper.setObject({
|
|
||||||
object: state.get(),
|
|
||||||
path: "edge",
|
|
||||||
newValue: true
|
|
||||||
});
|
|
||||||
var html = helper.e("html");
|
var html = helper.e("html");
|
||||||
var body = helper.e("body");
|
var body = helper.e("body");
|
||||||
var edgeElement = helper.node("div|class:edge is-transparent");
|
var edgeElement = helper.node("div|class:edge is-transparent");
|
||||||
@ -48,11 +61,6 @@ var edge = (function() {
|
|||||||
edgeElement.remove();
|
edgeElement.remove();
|
||||||
};
|
};
|
||||||
_currentEdge = null;
|
_currentEdge = null;
|
||||||
helper.setObject({
|
|
||||||
object: state.get(),
|
|
||||||
path: "edge",
|
|
||||||
newValue: false
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
edgeElement.addEventListener("transitionend", function(event, elapsed) {
|
edgeElement.addEventListener("transitionend", function(event, elapsed) {
|
||||||
if (event.propertyName === "opacity" && getComputedStyle(this).opacity == 0) {
|
if (event.propertyName === "opacity" && getComputedStyle(this).opacity == 0) {
|
||||||
@ -81,9 +89,22 @@ var edge = (function() {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var box = {
|
||||||
|
open: function(override) {
|
||||||
|
mod.open();
|
||||||
|
render.open(override);
|
||||||
|
},
|
||||||
|
close: function() {
|
||||||
|
mod.close();
|
||||||
|
render.close();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// exposed methods
|
// exposed methods
|
||||||
return {
|
return {
|
||||||
render: render
|
mod: mod,
|
||||||
|
render: render,
|
||||||
|
box: box
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
var version = (function() {
|
var version = (function() {
|
||||||
|
|
||||||
var current = "3.54.0";
|
var current = "3.55.0";
|
||||||
|
|
||||||
var compare = function(a, b) {
|
var compare = function(a, b) {
|
||||||
var pa = a.split(".");
|
var pa = a.split(".");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"short_name": "nightTab",
|
"short_name": "nightTab",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||||
"version": "3.54.0",
|
"version": "3.55.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"chrome_url_overrides": {
|
"chrome_url_overrides": {
|
||||||
"newtab": "index.html"
|
"newtab": "index.html"
|
||||||
|
Loading…
Reference in New Issue
Block a user