mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-14 02:26:20 +02:00
use const and fix up arrow login in saved pane
This commit is contained in:
@ -14,8 +14,8 @@
|
||||
* @return element Next element that mathes `selector`
|
||||
*/
|
||||
Node.prototype.nextUntil = function (selector) {
|
||||
var siblings = [...this.parentNode.querySelectorAll(selector)];
|
||||
var index = siblings.indexOf(this);
|
||||
const siblings = [...this.parentNode.querySelectorAll(selector)];
|
||||
const index = siblings.indexOf(this);
|
||||
return siblings[index + 1];
|
||||
};
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
* @return element Next element that mathes `selector`
|
||||
*/
|
||||
Node.prototype.previousUntil = function (selector) {
|
||||
var siblings = [...this.parentNode.querySelectorAll(selector)];
|
||||
var index = siblings.indexOf(this);
|
||||
const siblings = [...this.parentNode.querySelectorAll(selector)];
|
||||
const index = siblings.indexOf(this);
|
||||
return siblings[index - 1];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user