Skip to content

Commit f04647a

Browse files
authored
Merge pull request #108 from AI-Tournaments/domain-checks
Changed back to plain supa link.
2 parents 22bd608 + 2c3b0fe commit f04647a

8 files changed

Lines changed: 14 additions & 13 deletions

File tree

Arena

Submodule Arena updated from 6f15509 to b39cb0d

Backend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Backend{
1818
console.error('Invalid backend');
1919
}finally{
2020
return {
21-
path: 'https://backend.ai-tournaments.io',
21+
path: 'https://nfegdyrzrdhwvqpujxhj.functions.supabase.co',
2222
headers: {
2323
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTY0MzY2MTc3MCwiZXhwIjoxOTU5MjM3NzcwfQ.x_SvsnLkgYNEgpxa7h74Z__aBgGbGIYVmljhwYDJ1Bc'
2424
}

GitHubApi.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class GitHubApi{
7474
if(this.isLoggedIn()){
7575
localStorage.setItem('PopupMessage-'+this.#STARTED+timestamp, 'GitHub API rate limit reached\n424px\nWait until the <a href="https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit" target="_blank">API rate limit</a> timer resets: <time class="countdown" datetime="'+new Date(timestamp)+'"></time>');
7676
}else{
77-
localStorage.setItem('PopupMessage-'+this.#STARTED+timestamp, 'GitHub API rate limit reached\n371px\nGitHub has a lower <a href="https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit" target="_blank">API rate limit</a> for unsigned requests. <a href="https://ai-tournaments.github.io/login">Login</a> to be able to continue to create matches or wait until the timer resets: <time class="countdown" datetime="'+new Date(timestamp)+'"></time>');
77+
localStorage.setItem('PopupMessage-'+this.#STARTED+timestamp, 'GitHub API rate limit reached\n371px\nGitHub has a lower <a href="https://docs.github.com/en/free-pro-team@latest/rest/reference/rate-limit" target="_blank">API rate limit</a> for unsigned requests. <a href="https://ai-tournaments.io/login">Login</a> to be able to continue to create matches or wait until the timer resets: <time class="countdown" datetime="'+new Date(timestamp)+'"></time>');
7878
}
7979
return this.#waitUntil(timestamp).then(()=>GitHubApi.fetch(path, init));
8080
}
@@ -118,7 +118,7 @@ class GitHubApi{
118118
`<!DOCTYPE html>
119119
<html>
120120
<head>
121-
<link rel="stylesheet" href="https://ai-tournaments.github.io/defaults.css">
121+
<link rel="stylesheet" href="https://ai-tournaments.io/defaults.css">
122122
<style>
123123
${options.removeBodyMargin?`html, body {
124124
margin: 0;

Replay/ReplayExportTemplate.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
function a(){
2121
if(Object.keys(DATA).length){
2222
let iframe = document.getElementById('iframe');
23-
iframe.src = 'https://ai-tournaments.github.io/Replay/';
23+
iframe.src = 'https://ai-tournaments.io/Replay/';
2424
window.onmessage = messageEvent => {
2525
switch(messageEvent.data.type){
2626
case 'Replay-Initiated':
2727
iframe.contentWindow.postMessage({type: 'Add-External-Replay-Data', name: DATA.name, value: DATA.value}, '*');
2828
break;
2929
case 'Replay-Store-ID':
30-
location.href = 'https://ai-tournaments.github.io/#Replay/#'+messageEvent.data.value;
30+
location.href = 'https://ai-tournaments.io/#Replay/#'+messageEvent.data.value;
3131
break;
3232
}
3333
};

Replay/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<input type="button" id="open-replay-in-new-tab" value="🡽" class="sticky"/>
5959
</div>
6060
<div id="replay-container-failToLoad" class="hidden error">
61-
Replay failed to load <a href="https://ai-tournaments.github.io/ReplayHelper.js">ReplayHelper.js</a>.
61+
Replay failed to load <a href="https://ai-tournaments.io/ReplayHelper.js">ReplayHelper.js</a>.
6262
</div>
6363
<div id="previous-replay-container" class="hidden">
6464
<label>Previous replay:</label>

Replay/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,12 @@ function a(){
415415
});
416416

417417
let options = [..._element_viewOptions.options];
418+
const officialUrl = 'https://ai-tournaments.github.io/';
418419
options.sort(function(a, b){
419420
if(b.id === 'default-option'){return 1;}
420421

421-
let aOfficial = a.value.startsWith('https://ai-tournaments.github.io/');
422-
let bOfficial = b.value.startsWith('https://ai-tournaments.github.io/');
422+
let aOfficial = a.value.startsWith(officialUrl);
423+
let bOfficial = b.value.startsWith(officialUrl);
423424
if(aOfficial ? !bOfficial : bOfficial){return 1;}
424425

425426
if(parseFloat(a.dataset.stars) < parseFloat(b.dataset.stars)){return -1;}

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
<div class="dropdown">
306306
<label>Community</label>
307307
<div class="dropdown-content">
308-
<a class="github-logo" href="https://github.com/AI-Tournaments/AI-Tournaments.github.io/discussions/">
308+
<a class="github-logo" href="https://github.com/orgs/AI-Tournaments/discussions">
309309
<svg xmlns="https://www.w3.org/2000/svg" viewBox="0 0 496 496"><path d="M165.9 389.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2 .6-2-1.3-4.3-4.3-5.2-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 0C106.1 0 0 105.3 0 244c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5 21.3 0 42.8 2.9 62.8 8.5 0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 449.8 496 354.9 496 244 496 105.3 383.5 0 244.8 0zM97.2 344.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>
310310
GitHub
311311
</a>
@@ -323,7 +323,7 @@
323323
</div>
324324
</div>
325325
<div id="login-button-wrapper">
326-
<a id="login-button" href="https://ai-tournaments.github.io/login">Login</a>
326+
<a id="login-button" href="https://ai-tournaments.io/login">Login</a>
327327
</div>
328328
</div>
329329
</div>

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function a(){
5656
document.getElementById('login-button').href += '?origin='+encodeURI(location.protocol+'//'+location.host+location.pathname);
5757
document.getElementById('logout-button').addEventListener('click', GitHubApi.logout);
5858
openWindow(
59-
'Welcome to the tournament!','Here you can participate in different games (known as Arenas) for a fun challenge to stay atop of the leaderboards. Read the <a href="https://github.com/AI-Tournaments/AI-Tournaments.github.io#participate" target="_blank">Participate</a> section in the README to get started.\n'+
59+
'Welcome to the tournament!','Here you can participate in different games (known as Arenas) for a fun challenge to stay atop of the leaderboards. Read the <a href="https://github.com/AI-Tournaments#participate" target="_blank">Participate</a> section in the README to get started.\n'+
6060
'If you want to you can join the community discussions over at the <a href="https://discord.gg/jhUJNsN" target="_blank">Discord server</a>.\n'+
6161
'<span style="color:var(--secondary-background-color)">- Tournament servant</span>',
6262
true, '582px', true);
@@ -427,7 +427,7 @@ function a(){
427427
fetch('https://ai-tournaments.io/').then(r=>r.text()).then().catch(error => {
428428
postGitHubProblem('GitHub Pages');
429429
});
430-
fetch('https://raw.githubusercontent.com/AI-Tournaments/AI-Tournaments.github.io/main/index.html').then(r=>r.text()).then().catch(error => {
430+
fetch('https://raw.githubusercontent.com/AI-Tournaments/AI-Tournaments.io/main/index.html').then(r=>r.text()).then().catch(error => {
431431
postGitHubProblem('raw.githubusercontent.com');
432432
});
433433
}

0 commit comments

Comments
 (0)