1
0
forked from 0ad/0ad

Move openURL function and two strings from public/ to mod/.

Use it for the mod author website now.
Use it for the terms links next, refs #5257, D1627.

This was SVN commit r21889.
This commit is contained in:
elexis 2018-09-22 16:23:43 +00:00
parent 6a1d8e7515
commit 82a89c4eb1
3 changed files with 14 additions and 15 deletions

View File

@ -46,3 +46,16 @@ function messageBox(mbWidth, mbHeight, mbMessage, mbTitle, mbButtonCaptions, mbB
"callback": mbBtnCode && "messageBoxCallbackFunction"
});
}
function openURL(url)
{
Engine.OpenURL(url);
messageBox(
600, 200,
sprintf(
translate("Opening %(url)s\n in default web browser. Please wait…"),
{ "url": url }
),
translate("Opening page"));
}

View File

@ -395,5 +395,5 @@ function visitModWebsite()
if (!url.startsWith("http://") && !url.startsWith("https://"))
url = "http://" + url;
Engine.OpenURL(url);
openURL(url);
}

View File

@ -1,17 +1,3 @@
function openURL(url)
{
Engine.OpenURL(url);
messageBox(
600, 200,
sprintf(
translate("Opening %(url)s\n in default web browser. Please wait…"),
{ "url": url }
),
translate("Opening page")
);
}
function updateCounters()
{
let counters = [];