Skip to content

Commit a09b0f1

Browse files
committed
Moved slash.
1 parent 265ed3d commit a09b0f1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Replay/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ function a(){
399399
_editor.setMode('view');
400400
IndexedDBOperation.do({operation: 'addReplayToStorage', data: _editor.getText()});
401401
GitHubApi.fetch('search/repositories?q=topic:AI-Tournaments+topic:AI-Tournaments-Replay+topic:'+_replayData.body.arena.full_name.replace('/','--')).then(response => response.json()).then(response => {
402-
const officialUrl = 'https://ai-tournaments.github.io/'; // TODO: 👇 Either only allow absolute URL:s or calculate arena origin.
402+
const officialUrl = 'https://ai-tournaments.github.io'; // TODO: 👇 Either only allow absolute URL:s or calculate arena origin.
403403
document.getElementById('default-option').value = (_replayData.header.defaultReplay[0]==='/'?officialUrl:'')+_replayData.header.defaultReplay;
404404
response.items.forEach(repo => {
405405
if(repo.has_pages){
@@ -419,8 +419,8 @@ function a(){
419419
options.sort(function(a, b){
420420
if(b.id === 'default-option'){return 1;}
421421

422-
let aOfficial = a.value.startsWith(officialUrl);
423-
let bOfficial = b.value.startsWith(officialUrl);
422+
let aOfficial = a.value.startsWith(officialUrl+'/');
423+
let bOfficial = b.value.startsWith(officialUrl+'/');
424424
if(aOfficial ? !bOfficial : bOfficial){return 1;}
425425

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

0 commit comments

Comments
 (0)