Skip to content

Commit ba15d10

Browse files
author
Ilia Rostovtsev
committed
Version 18.32-patch [hot-fix #665]
Using the `Object.defineProperty` method and turning off the `enumerable` bit. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
1 parent 93c7cb4 commit ba15d10

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

unauthenticated/js/init.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,19 @@ if (t__wi_p.$(".mobile-menu-toggler:visible").length) {
131131
function upperFirst(a) {
132132
return a.charAt(0).toUpperCase() + a.slice(1).toLowerCase()
133133
}
134-
Array.prototype.move = function(c, a) {
135-
if (a >= this.length) {
136-
var b = a - this.length;
137-
while ((b--) + 1) {
138-
this.push(undefined)
134+
Object.defineProperty(Array.prototype, "reOrder", {
135+
enumerable: false,
136+
value: function(c, a) {
137+
if (a >= this.length) {
138+
var b = a - this.length;
139+
while ((b--) + 1) {
140+
this.push(undefined)
141+
}
139142
}
143+
this.splice(a, 0, this.splice(c, 1)[0]);
144+
return this
140145
}
141-
this.splice(a, 0, this.splice(c, 1)[0]);
142-
return this
143-
};
146+
});
144147

145148
function __slm() {
146149
if (t__wi_p.$("aside").css("transform") == "none") {

unauthenticated/js/init.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unauthenticated/js/parent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ $(window).keyup(function(D) {
10291029
H = $(a).find("pre").html().replace(/>>/g, ">" + I + ""),
10301030
c = $(a).find('select[name="pcmd"] option').map(function() {
10311031
return $(this).val()
1032-
}).get().move(-1, 0).reverse();
1032+
}).get().reOrder(-1, 0).reverse();
10331033
localStorage.setItem($hostname + "-shell_commands", JSON.stringify(c));
10341034
newPwd = $(a).find('input[name="pwd"]').val();
10351035
shellOut.find("pre").append((t ? (H.replace(new RegExp(G, "g"), t)) : H));

unauthenticated/js/parent.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)