Enhance welcome message
This commit is contained in:
parent
e7de42cf16
commit
c34bfbf229
@ -72,6 +72,32 @@ function welcomeMessage() {
|
|||||||
` });
|
` });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
// Register world usage statistics
|
||||||
|
function registerUsageCount( registerKey ) {
|
||||||
|
if ( game.user.isGM ) {
|
||||||
|
game.settings.register(registerKey, "world-key", {
|
||||||
|
name: "Unique world key",
|
||||||
|
scope: "world",
|
||||||
|
config: false,
|
||||||
|
default: "",
|
||||||
|
type: String
|
||||||
|
});
|
||||||
|
|
||||||
|
let worldKey = game.settings.get(registerKey, "world-key")
|
||||||
|
if ( worldKey == undefined || worldKey == "" ) {
|
||||||
|
worldKey = randomID(32)
|
||||||
|
game.settings.set(registerKey, "world-key", worldKey )
|
||||||
|
}
|
||||||
|
// Simple API counter
|
||||||
|
let regURL = `https://www.uberwald.me/fvtt_appcount/count.php?name="${registerKey}"&worldKey="${worldKey}"&version="${game.release.generation}.${game.release.build}"&system="${game.system.id}"&systemversion="${game.system.version}"`
|
||||||
|
//$.ajaxSetup({
|
||||||
|
//headers: { 'Access-Control-Allow-Origin': '*' }
|
||||||
|
//})
|
||||||
|
$.ajax(regURL)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/* Foundry VTT Initialization */
|
/* Foundry VTT Initialization */
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -92,7 +118,7 @@ Hooks.once("ready", function () {
|
|||||||
let sidebar = document.getElementById("sidebar");
|
let sidebar = document.getElementById("sidebar");
|
||||||
sidebar.style.width = "min-content";
|
sidebar.style.width = "min-content";
|
||||||
}
|
}
|
||||||
|
registerUsageCount('fvtt-mournblade')
|
||||||
welcomeMessage();
|
welcomeMessage();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "fvtt-mournblade",
|
"id": "fvtt-mournblade",
|
||||||
"description": "Mournblade RPG for FoundryVTT",
|
"description": "Mournblade RPG for FoundryVTT",
|
||||||
"version": "10.0.4",
|
"version": "10.0.5",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Uberwald/LeRatierBretonnien",
|
"name": "Uberwald/LeRatierBretonnien",
|
||||||
@ -15,7 +15,7 @@
|
|||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.4.zip",
|
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.5.zip",
|
||||||
"packs": [
|
"packs": [
|
||||||
{
|
{
|
||||||
"type": "Item",
|
"type": "Item",
|
||||||
|
Loading…
Reference in New Issue
Block a user