Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
TheYoBots committed Oct 3, 2023
1 parent 2a9d388 commit eda3a6f
Show file tree
Hide file tree
Showing 249 changed files with 1,380 additions and 1,176 deletions.
2 changes: 1 addition & 1 deletion public/javascripts/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $(function () {

$("label[for='irdisplay_boardLayout_2']").click(function () {
alert(
'Soon to be removed! If you believe this layout should be preserved, please comment you reasoning here: https://github.com/WandererXII/lishogi/issues/682. If enough people prefer this layout I will try my best to keep it around.'
'Soon to be removed! If you believe this layout should be preserved, please comment you reasoning here: https://github.com/WandererXII/lishogi/issues/682. If enough people prefer this layout I will try my best to keep it around.',
);
});
});
2 changes: 1 addition & 1 deletion public/javascripts/coach.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ $(function () {
.getAttribute('data-value')
.split(',')
.map(code => tagify.settings.whitelist.find(l => l.code == code))
.filter(x => x)
.filter(x => x),
);

todo();
Expand Down
18 changes: 9 additions & 9 deletions public/javascripts/confetti.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ var retina = window.devicePixelRatio,
_g.beginPath();
_g.moveTo(
(this.pos.x + this.corners[0].x * this.size) * retina,
(this.pos.y + this.corners[0].y * this.size * this.cosA) * retina
(this.pos.y + this.corners[0].y * this.size * this.cosA) * retina,
);
for (var i = 1; i < 4; i++) {
_g.lineTo(
(this.pos.x + this.corners[i].x * this.size) * retina,
(this.pos.y + this.corners[i].y * this.size * this.cosA) * retina
(this.pos.y + this.corners[i].y * this.size * this.cosA) * retina,
);
}
_g.closePath();
Expand Down Expand Up @@ -282,7 +282,7 @@ var retina = window.devicePixelRatio,
var p0 = new Vector2(this.particles[i].position.x + this.xOff, this.particles[i].position.y + this.yOff);
var p1 = new Vector2(
this.particles[i + 1].position.x + this.xOff,
this.particles[i + 1].position.y + this.yOff
this.particles[i + 1].position.y + this.yOff,
);
if (
this.Side(
Expand All @@ -291,7 +291,7 @@ var retina = window.devicePixelRatio,
this.particles[i + 1].position.x,
this.particles[i + 1].position.y,
p1.x,
p1.y
p1.y,
) < 0
) {
_g.fillStyle = this.frontColor;
Expand All @@ -306,7 +306,7 @@ var retina = window.devicePixelRatio,
_g.lineTo(this.particles[i + 1].position.x * retina, this.particles[i + 1].position.y * retina);
_g.lineTo(
(this.particles[i + 1].position.x + p1.x) * 0.5 * retina,
(this.particles[i + 1].position.y + p1.y) * 0.5 * retina
(this.particles[i + 1].position.y + p1.y) * 0.5 * retina,
);
_g.closePath();
_g.stroke();
Expand All @@ -316,7 +316,7 @@ var retina = window.devicePixelRatio,
_g.lineTo(p0.x * retina, p0.y * retina);
_g.lineTo(
(this.particles[i + 1].position.x + p1.x) * 0.5 * retina,
(this.particles[i + 1].position.y + p1.y) * 0.5 * retina
(this.particles[i + 1].position.y + p1.y) * 0.5 * retina,
);
_g.closePath();
_g.stroke();
Expand All @@ -327,7 +327,7 @@ var retina = window.devicePixelRatio,
_g.lineTo(this.particles[i + 1].position.x * retina, this.particles[i + 1].position.y * retina);
_g.lineTo(
(this.particles[i].position.x + p0.x) * 0.5 * retina,
(this.particles[i].position.y + p0.y) * 0.5 * retina
(this.particles[i].position.y + p0.y) * 0.5 * retina,
);
_g.closePath();
_g.stroke();
Expand All @@ -337,7 +337,7 @@ var retina = window.devicePixelRatio,
_g.lineTo(p0.x * retina, p0.y * retina);
_g.lineTo(
(this.particles[i].position.x + p0.x) * 0.5 * retina,
(this.particles[i].position.y + p0.y) * 0.5 * retina
(this.particles[i].position.y + p0.y) * 0.5 * retina,
);
_g.closePath();
_g.stroke();
Expand Down Expand Up @@ -380,7 +380,7 @@ var retina = window.devicePixelRatio,
ribbonPaperDist,
ribbonPaperThick,
45,
0.05
0.05,
);
}
var confettiPapers = new Array();
Expand Down
14 changes: 7 additions & 7 deletions public/javascripts/fipr.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ window.fipr = (function () {
} catch (t) {
return n.ERROR;
}
}
},
))
: e.push(n.NOT_AVAILABLE),
navigator.plugins && (e = e.concat(i(n))),
Expand Down Expand Up @@ -282,13 +282,13 @@ window.fipr = (function () {
a = o.createShader(o.VERTEX_SHADER);
o.shaderSource(
a,
'attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}'
'attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}',
),
o.compileShader(a);
var i = o.createShader(o.FRAGMENT_SHADER);
o.shaderSource(
i,
'precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}'
'precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}',
),
o.compileShader(i),
o.attachShader(r, a),
Expand Down Expand Up @@ -324,7 +324,7 @@ window.fipr = (function () {
return 0 === n && (n = 2), n;
}
return null;
})(o)
})(o),
),
c.push('webgl max combined texture image units:' + o.getParameter(o.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),
c.push('webgl max cube map texture size:' + o.getParameter(o.MAX_CUBE_MAP_TEXTURE_SIZE)),
Expand Down Expand Up @@ -574,7 +574,7 @@ window.fipr = (function () {
navigator.userLanguage ||
navigator.browserLanguage ||
navigator.systemLanguage ||
t.NOT_AVAILABLE
t.NOT_AVAILABLE,
);
},
},
Expand Down Expand Up @@ -883,7 +883,7 @@ window.fipr = (function () {
o[e[0]] !== undefined &&
'function' == typeof o[e[0]].setValueAtTime &&
o[e[0]].setValueAtTime(e[1], a.currentTime);
}
},
),
i.connect(o),
o.connect(a.destination),
Expand All @@ -894,7 +894,7 @@ window.fipr = (function () {
console.warn(
'Audio fingerprint timed out. Please report bug at https://github.com/Valve/fingerprintjs2 with your user agent: "' +
navigator.userAgent +
'".'
'".',
),
(a.oncomplete = function () {}),
(a = null),
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/forum-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ $(function () {
{
placement: 'top',
appendTo: '#lishogi_forum',
}
},
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $(function () {
var res = e.target.result;
if (encoding === 'UTF-8' && res.match(//)) {
console.log(
"UTF-8 didn't work, trying shift-jis, if you still have problems with your import, try converting the file to a different encoding"
"UTF-8 didn't work, trying shift-jis, if you still have problems with your import, try converting the file to a different encoding",
);
readFile(file, 'shift-jis');
} else {
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/lag.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ $(function () {
}),
function (c) {
charts.server = c;
}
},
);
$('.network .meter').highcharts(
buildChart({
title: 'PING',
}),
function (c) {
charts.network = c;
}
},
);
var values = {
server: -1,
Expand Down
6 changes: 3 additions & 3 deletions public/javascripts/music/orchestra.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function lishogiOrchestra() {
new Howl({
src: makeSoundPair('celesta/' + fn),
volume: 0.3,
})
}),
);
instruments.clav.push(
new Howl({
src: makeSoundPair('clav/' + fn),
volume: 0.2,
})
}),
);
}
// load swell sounds
Expand All @@ -38,7 +38,7 @@ function lishogiOrchestra() {
new Howl({
src: makeSoundPair('swells/swell' + i),
volume: 0.5,
})
}),
);
}

Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/public-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(function () {
$('<a id="auto_refresh" class="button">Auto refresh</a>').click(function () {
autoRefreshEnabled = !autoRefreshEnabled;
renderButton();
})
}),
);
renderButton();

Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $(function () {
function () {
$('#infscr-loading').remove();
lishogi.pubsub.emit('content_loaded');
}
},
);
});

Expand Down
6 changes: 4 additions & 2 deletions public/oops/disabled.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -10,7 +10,9 @@
font-family: 'PT Serif';
font-style: italic;
font-weight: 400;
src: local('PT Serif Italic'), local('PTSerif-Italic'),
src:
local('PT Serif Italic'),
local('PTSerif-Italic'),
url(https://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212,
U+2215, U+E0FF, U+EFFD, U+F000;
Expand Down
10 changes: 8 additions & 2 deletions public/oops/scheduled-maintenance.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -7,7 +7,13 @@
<style type="text/css">
body {
text-align: center;
font: 18px 'Noto Sans', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, Sans-Serif;
font:
18px 'Noto Sans',
'Lucida Grande',
'Lucida Sans Unicode',
Geneva,
Verdana,
Sans-Serif;
background-color: #181818;
background-image: linear-gradient(to bottom, #2c2c2c, #181818 116px);
background-repeat: no-repeat;
Expand Down
6 changes: 4 additions & 2 deletions public/oops/servererror.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -9,7 +9,9 @@
font-family: 'PT Serif';
font-style: italic;
font-weight: 400;
src: local('PT Serif Italic'), local('PTSerif-Italic'),
src:
local('PT Serif Italic'),
local('PTSerif-Italic'),
url(https://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212,
U+2215, U+E0FF, U+EFFD, U+F000;
Expand Down
15 changes: 10 additions & 5 deletions public/oops/timeout.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand All @@ -9,7 +9,9 @@
font-family: 'PT Serif';
font-style: italic;
font-weight: 400;
src: local('PT Serif Italic'), local('PTSerif-Italic'),
src:
local('PT Serif Italic'),
local('PTSerif-Italic'),
url(https://fonts.gstatic.com/s/ptserif/v8/03aPdn7fFF3H6ngCgAlQzPk_vArhqVIZ0nv9q090hN8.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212,
U+2215, U+E0FF, U+EFFD, U+F000;
Expand Down Expand Up @@ -51,9 +53,12 @@ <h1>lishogi.org timeout</h1>
<br />
<img src="//lishogi.org/assets/images/maintenance.jpg" alt="Lishogi timeout" />
<script>
setTimeout(function () {
location.reload();
}, 2000 + Math.round(Math.random() * 10000));
setTimeout(
function () {
location.reload();
},
2000 + Math.round(Math.random() * 10000),
);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion public/oops/toomanyrequests.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
6 changes: 3 additions & 3 deletions public/sound/test.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down Expand Up @@ -63,7 +63,7 @@ <h1>Sound Test Page</h1>
}),
}).play();
})
.text(soundName)
.text(soundName),
)
.appendTo(tr);
});
Expand All @@ -85,7 +85,7 @@ <h1>Sound Test Page</h1>
i-- || clearInterval(tId);
}, 1000);
})
.text('CountDown10 --1> 0')
.text('CountDown10 --1> 0'),
)
.appendTo(tr);
tr.appendTo($('#sounds'));
Expand Down
12 changes: 6 additions & 6 deletions ui/analyse/src/acpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ function renderPlayer(ctrl: AnalyseCtrl, color: Color): VNode {
{
attrs: { href: '/@/' + p.user.username },
},
[p.user.username, ' ', renderRatingDiff(p.ratingDiff)]
[p.user.username, ' ', renderRatingDiff(p.ratingDiff)],
);
return h(
'span',
p.name ||
(ctrl.data.game.variant.key == 'standard' && p.ai && 'YaneuraOu level ' + p.ai) ||
(p.ai && 'Fairy-Stockfish level ' + p.ai) ||
(ctrl.study && findTag(ctrl.study.data.chapter.tags, color)) ||
'Anonymous'
'Anonymous',
);
}

Expand Down Expand Up @@ -75,9 +75,9 @@ function playerTable(ctrl: AnalyseCtrl, color: Color): VNode {
: {};
return h('tr' + (nb ? `.symbol${style}` : ''), { attrs }, [h('td', '' + nb), h('th', trans(a.plural))]);
})
.concat(h('tr', [h('td', '' + (defined(acpl) ? acpl : '?')), h('th', trans('averageCentipawnLoss'))]))
.concat(h('tr', [h('td', '' + (defined(acpl) ? acpl : '?')), h('th', trans('averageCentipawnLoss'))])),
),
]
],
);
}

Expand Down Expand Up @@ -105,10 +105,10 @@ function doRender(ctrl: AnalyseCtrl): VNode {
attrs: dataIcon('G'),
hook: bind('click', ctrl.toggleRetro, ctrl.redraw),
},
ctrl.trans.noarg('learnFromYourMistakes')
ctrl.trans.noarg('learnFromYourMistakes'),
),
playerTable(ctrl, 'gote'),
]
],
);
}

Expand Down
Loading

0 comments on commit eda3a6f

Please sign in to comment.