Calculator Tools Calculator Tools

Format Builder

Oct 26, 2023

About this app

Create dynamic messages for people

Format Builder Format Builder Generate Message

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Format Builder</title>
<meta name="description" content="Create dynamic messages for people">
<meta name="keywords" content="format builder, dynamic messages, text messages">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Array of available message formats
var messageFormats = [
"asking for money text message",
"donation messages",
"Charity messages",
"Trust creation message",
"help for gas fee"
];

// Function to generate a random message format
function generateMessage() {
var randomIndex = Math.floor(Math.random() * messageFormats.length);
return messageFormats[randomIndex];
}

// Event listener for the "Generate Message" button
$("#generate-message-btn").click(function() {
var message = generateMessage();
$("#message-output").text(message);
});
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
background-color: #f1f1f1;
font-family: 'Roboto', sans-serif;
}

.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}

.title {
text-align: center;
font-size: 24px;
font-weight: bold;
margin-bottom: 30px;
}

.btn {
display: block;
width: 100%;
margin-bottom: 20px;
background-color: #ff8c00;
color: #fff;
font-size: 16px;
font-weight: bold;
border: none;
border-radius: 5px;
padding: 10px;
text-align: center;
cursor: pointer;
transition: background-color 0.3s ease;
}

.btn:hover {
background-color: #ff6b00;
}

.message-output {
background-color: #fff;
padding: 20px;
border-radius: 5px;
font-size: 16px;
line-height: 1.5;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<div class="title">Format Builder</div>
<button id="generate-message-btn" class="btn">Generate Message</button>
<div id="message-output" class="message-output"></div>
</div>
</body>
</html>