Lekhoniya lekhoniya.com Subham Mandal Dhupguri ONE Code ONE ssss web West Bengal India Bangla writing pad Bengali type লেখনীয়া
লেখনীয়া
progarammed by Subham Mandal

Lekhoniya DRAW

 

Lekhoniya DRAW

Realtime Drawing Script Lekhoniya - In-depth Guide

Introduction

The Realtime Drawing Script enhances the drawing experience on Lekhoniya by providing users with a dedicated drawing space. This guide will walk you through the features and functionalities of the script.

Overview of Drawing Script

The Drawing Script is designed to offer users a real-time drawing experience within a dedicated iframe. Users accessing a specific URL (https://lekhoniya.blogspot.com/d/) will be redirected to a drawing page hosted on onessssweb's blog, allowing them to draw collaboratively.

Code Explanation

var currentUrl_dtime = window.location.href.substring(0, 33);
var durlToMatch = 'https://lekhoniya.blogspot.com/d/';

if (currentUrl_dtime === durlToMatch) {
  console.log('Realtime Drawing');

  // Create an iframe element
  let iframe = document.createElement('iframe');

  // Set the source URL for the drawing page
  iframe.src = "https://onessssweb.blogspot.com/2023/11/drawplate.html";

  // Set inline styles for the iframe
  iframe.style.position = "fixed";
  iframe.style.top = "0";
  iframe.style.left = "0";
  iframe.style.bottom = "0";
  iframe.style.right = "0";
  iframe.style.width = "100%";
  iframe.style.height = "100%";
  iframe.style.border = "none";
  iframe.style.margin = "0";
  iframe.style.padding = "0";
  iframe.style.overflow = "hidden";
  iframe.style.zIndex = "999999";

  // Append the iframe to the document body
  document.body.appendChild(iframe);

  // Hide the editableSpan to provide a clean drawing space
  document.getElementById('editableSpan').style.display = 'none';

  // Extract resolution parameters from the URL, defaulting to 800x800
  const currentURL = window.location.href;
  let ssx = 800;
  let ssy = 800;
  const match = currentURL.match(/\/d\/(\d+)-(\d+)\//);

  if (match) {
    ssx = parseInt(match[1]);
    ssy = parseInt(match[2]);
    console.log("Resolution: " + ssx + 'X' + ssy);
  }
}

Usage Instructions

  1. Access Drawing Space:

    • Open the URL https://lekhoniya.blogspot.com/d/ in your web browser.
  2. Real-time Drawing:

    • Users are redirected to a dedicated drawing page hosted on onessssweb's blog.
    • The drawing experience is collaborative and real-time within the iframe.
  3. Drawing Resolution:

    • The resolution of the drawing canvas can be customized based on parameters in the URL.
    • The default resolution is set to 800x800.
  4. Clean Drawing Space:

    • The editableSpan is hidden to provide a clean space for drawing.
  5. Console Logging:

    • Connection details and resolution parameters are logged to the console for reference.

Conclusion

The Realtime Drawing Script adds a new dimension to collaborative creativity on Lekhoniya, offering users a shared space for real-time drawing experiences. For questions, feedback, or assistance, feel free to reach out to the Lekhoniya support team. Enjoy drawing collaboratively on Lekhoniya!


Lekhoniya Global

Lekhoniya Global Script - In-depth Guide

Introduction

The Lekhoniya Global Script enhances the collaborative and real-time aspects of Lekhoniya by providing a global platform for users to share content. This guide will walk you through the features and functionalities of the script.

Overview of Global Script

The Global Script is designed to facilitate real-time collaboration and sharing of content among users on Lekhoniya. Users accessing a specific URL (https://lekhoniya.blogspot.com/g/) will be connected to a shared space where updates made by one user are reflected in real-time for others.

Code Explanation

var currentUrl_gtime = window.location.href.substring(0, 33);
var urlToMatch = 'https://lekhoniya.blogspot.com/g/';

if (currentUrl_gtime === urlToMatch) {
console.log('Connecting...');

// Listen for changes in the 'Lekhoniya-Global' Firebase database
firebase.database().ref('Lekhoniya-Global').on("value", function(snapshot) {
var firebaseValue = snapshot.val().user;

// Check and activate the script based on Firebase value
checkAndActivateScript(firebaseValue);
});

function checkAndActivateScript(firebaseValue) {
let localStorageValue = localStorage.getItem('lekhoniya-user');

if (firebaseValue === localStorageValue) {
// User is already connected
} else {
// Update content based on the 'valx' value from Firebase
firebase.database().ref('Lekhoniya-Global').on("value", function(snapshot) {
document.getElementById('editableSpan').innerHTML = snapshot.val().valx;
});
}
}

// Alert and console message to indicate successful connection
alert('Welcome to Global!');
console.log('Lekhoniya Global!');

// Set 'oninput' event for the 'editableSpan'
let editableSpan = document.getElementById('editableSpan');
editableSpan.setAttribute('oninput', 'updateGlobal()');

// Fetch initial content from Firebase
fetch('https://onerealtimeserver-default-rtdb.firebaseio.com/Lekhoniya-Global/valx.json')
.then(response => response.json())
.then(data => {
document.getElementById('editableSpan').innerHTML = data;
});
}

// Function to update global content on user input
function updateGlobal() {
let timeg = new Date().toLocaleTimeString();
let user = localStorage.getItem('lekhoniya-user');
const valx = document.getElementById('editableSpan').innerHTML;

// Update 'Lekhoniya-Global' Firebase database
firebase.database().ref('Lekhoniya-Global').set({ valx, user , timeg });
}

Usage Instructions

  1. Access Global Space:Open the URL https://lekhoniya.blogspot.com/g/ in your web browser.
  2. Real-time Collaboration:Users accessing the global space can collaboratively edit and share content in real-time.
  3. Automatic Updates:Content is automatically updated based on user inputs, providing a seamless collaborative writing experience.
  4. User Connection:User connection is managed through Firebase, ensuring that each user's contributions are reflected in the shared space.
  5. Alerts and Console Messages:Users receive an alert message ("Welcome to Global!") upon successful connection.Connection details are logged to the console for reference.

Conclusion

The Lekhoniya Global Script brings a new dimension to collaborative writing, offering users a shared space for real-time content creation and updates. For questions, feedback, or assistance, feel free to reach out to the Lekhoniya support team. Happy global writing on Lekhoniya!

Clearspace Utility on Lekhoniya - In-depth Guide

 

Clearspace Utility on Lekhoniya - In-depth Guide

Introduction

Subham Mandal has introduced a handy utility named Clearspace on Lekhoniya, enabling users to quickly clear the content within the editable span using a key combination. This guide will walk you through the functionality and usage of the Clearspace utility.

Overview of Clearspace Utility

The Clearspace utility is designed to provide users with a convenient way to clear the content within the editable span on Lekhoniya. By pressing the "Escape" key a certain number of times in quick succession, users can trigger the clearing action. This serves as a safety measure to prevent accidental content deletion.

Code Explanation

var clearspace = 0; 

document.addEventListener("keydown", function(event) {
  if (event.code === "Escape") { clearspace += 1; }
});

document.addEventListener("keyup", function(event) {
  if (event.code === "Escape") {
    if (clearspace > 50) {
      const editableSpan = document.getElementById("editableSpan");
      editableSpan.textContent = "";
      alert("Lekhoniya: Cleared!");
    }
    clearspace = 0; 
  }
});

Usage Instructions

  1. Trigger Clearspace:

    • Press and hold the "Escape" key multiple times in quick succession.
  2. Clear Content:

    • If the "Escape" key is pressed more than 50 times quickly, the content within the editable span will be cleared.
    • A confirmation alert, "Lekhoniya: Cleared!" will be displayed.

Additional Tips

  • Use the Clearspace utility with caution to avoid unintentional content deletion.
  • Customize the threshold (currently set to 50) based on your preference by adjusting the clearspace variable.

Conclusion

The Clearspace utility adds a practical feature to Lekhoniya, offering users a quick and controlled method to clear the editable span content. For any inquiries, feedback, or assistance, feel free to connect with Subham Mandal. Happy writing and exploring on Lekhoniya!

Lekhoniya CODE

 

Lekhoniya CODE

Introduction

Subham Mandal has enriched the web interaction capabilities of Lekhoniya with the addition of versatile web-related functions. Users can now seamlessly integrate external content, run code snippets, and display web pages or blog posts directly within the platform. Let's explore the new functionalities!

Overview of Web Interaction Functions

webrun(x)

The webrun function fetches content from a given URL (x) and appends the result to the editable span. It provides a dynamic way to run and display external content.

source(x)

The source function fetches the source code of a web page specified by the URL (x) and appends it to the editable span. This is useful for inspecting the underlying code of a webpage.

google(x)

The google function initiates a Google search for the provided query (x) and appends the search results to the editable span.

find(x)

The find function performs a Yahoo search for the provided query (x) and appends the search results to the editable span.

xframe(x)

The xframe function fetches content from a given URL (x) and displays it within an iframe, providing a compact view of external content.

site(x)

The site function fetches the content of the specified website (x) and displays it within an iframe, enabling users to embed external websites seamlessly.

blog(x)

The blog function fetches the content of a specified blog (x) and displays it within an iframe, facilitating the integration of blog content.

frame(x)

The frame function displays an external webpage specified by the URL (x) within an iframe, offering a compact and embedded view.

Usage Instructions

  1. Execute Web Functions: Call any of the web-related functions listed above, providing the required parameters where applicable.
  2. View Results: The output of the executed function will be appended to the editable span, allowing users to interact with the fetched content.

Examples

1. Run Code Snippet

webrun('https://example.com/code.js');

2. Fetch Source Code

source('https://example.com');

3. Perform Google Search

google('OpenAI GPT-3');

4. Display External Webpage

frame('https://example.com');

5. Display Blog Content

blog('example-blog');

6. Embed External Website

site('example-website');

7. Fetch and Display Web Content

xframe('https://example.com');

Conclusion

Experience an enhanced level of web interaction on Lekhoniya with these powerful web-related functions. Developed by Subham Mandal, these functions provide users with the ability to seamlessly integrate external content, run code snippets, and embed web pages or blog posts. For any queries or feedback, connect with Subham Mandal. Happy exploring!