The demos can be used in two ways depending on your workflow. You can run it instantly on JT by simply
clicking 'View Demo', which opens the page directly in your browser with no setup required. Alternatively,
if you want to test or modify the demo in your own environment, click 'Download Demo' to save the HTML file
locally. You can then upload it to your localhost server and run it there, giving you full control to
experiment, debug, and integrate it with your own setup.
To begin, open Browser Developer Tools (DevTools) which is essentially an entire debugging suite built into
web browsers; you can typically open it with 'Ctrl + Shift + I'. We will use DevTools to inspect the browser
console logs for some demo sections.
This exercise will demonstrate how to render the social sharing inside the browser. You should observe the social sharing buttons as a vertical column on the right of the screen or a horizontal row at the bottom of the screen. By default, the buttons dynamically flip between each orientation depending on the width of the browser window - this ensures basic responsiveness. If you click on the Telegram sharing button (the paper airplane icon), you will be redirected to the Telegram website and you will notice that the link displayed for sharing is the same URL as the webpage demo with the social sharing buttons. In the next section we will discuss how to override this default behaviour to share a different URL.
<!DOCTYPE html> <!-- Copyright (c) 2026 by Javaika Technologies -->
<html lang = "en-AU"> <!-- Set the primary language to en-AU -->
<head>
<title>Basic Display</title> <!-- Set the page title -->
<meta name = "robots" content = "noindex, follow">
</head>
<body>
<!-- Include the framework script tag -->
<script type = "module" src = "https://www.javaika.com/frame/web-share@main/api.js"></script>
<!-- Run the demo as an ES Module -->
<script type = "module">
// Initialize a shorter prefix for referencing.
const jws = window.javaika.webShare;
// Initialize the developer token endpoint.
jws.init({
tokenEndpoint: "https://www.javaika.com/pscript/jwt-access.php"
});
// Authenticate before using the framework.
jws.requestToken({
framework: "web_share" // Specify the framework for token issuance.
});
// Authenticate callback handler.
function onAuthenticate(event)
{
jws.refreshToken(); // Refresh the authentication token.
console.log('[Web Share] Authentication received callback:', event);
}
// Initialized callback handler.
function onInitialized(event)
{
console.log('[Web Share] Framework initialized callback:', event);
}
// Callback event after authenticate.
document.addEventListener
(
'javaika.webShare.authenticate', onAuthenticate
);
// Callback event after initialized.
document.addEventListener
(
'javaika.webShare.initialized', onInitialized
);
</script>
</body>
</html>
Next capability: Discuss how to change the default share URL.