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:
parent
6a1d8e7515
commit
82a89c4eb1
@ -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"));
|
||||
}
|
||||
|
@ -395,5 +395,5 @@ function visitModWebsite()
|
||||
if (!url.startsWith("http://") && !url.startsWith("https://"))
|
||||
url = "http://" + url;
|
||||
|
||||
Engine.OpenURL(url);
|
||||
openURL(url);
|
||||
}
|
||||
|
@ -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 = [];
|
||||
|
Loading…
Reference in New Issue
Block a user