WebNook
Last updated: June 29, 2026
WebNook allows you to inject custom JavaScript into the websites you add to the app. This lets you add new features, automate tasks, or modify the UI.
Scripts run automatically at the document-start phase, right before the site loads.
Scripts added from a file must have a .js extension. Other extensions are not accepted.
Correct examples:
example-menu-action.js
site-helper.js
otomatik-islem.js
Incorrect examples:
script.txt
script.md
script.htmlWebNook can read a special comment block at the beginning of the script to ensure it runs on the correct site. It is recommended to add the following structure to the top of your script:
// ==WebNookScript==
// @name Example Script Name
// @domain example.com
// ==/WebNookScript==
@domain: Specifies which domain this script belongs to (e.g., example.com). If present, WebNook checks if the domain matches the current site when the user adds the script. If it does not match, WebNook will throw an error.@domain is not present, the script is bound to the selected site and runs only on that domain.When your script runs inside WebNook, a special window.WebNook object is injected into the page. You can use this object to communicate with the Android app.
addMenuAction)You can add your own buttons to WebNook's left drawer menu.
WebNook.addMenuAction("action_id_1", "Button Text");
onWebNookAction)When the user clicks the button you added to the menu, WebNook calls the global window.onWebNookAction(actionId) function.
window.onWebNookAction = function(actionId) {
if (actionId === "action_id_1") {
// Button clicked! Do your automation here.
document.getElementById('username').value = 'User' + Math.floor(Math.random() * 1000);
}
};
showToast)You can show a message to the user using Android's native Toast notification.
WebNook.showToast("Operation completed successfully!");An example script for automation scenarios:
// ==WebNookScript==
// @name Auto Action Script
// @domain example.com
// ==/WebNookScript==
// 1. Add our button to the app's left menu
WebNook.addMenuAction("auto_action_btn", "Start Auto Action");
// 2. Define what happens when the button is clicked
window.onWebNookAction = function(actionId) {
if (actionId === "auto_action_btn") {
// Get comma-separated data from the user
let data = prompt("Paste data separated by commas:");
if (data) {
let dataArray = data.split(",");
WebNook.showToast("Processing " + dataArray.length + " items...");
// Sequential form filling logic (example)
let i = 0;
let interval = setInterval(function() {
if (i >= dataArray.length) {
clearInterval(interval);
WebNook.showToast("All items processed!");
return;
}
let inputField = document.querySelector("input[name='data']");
let submitBtn = document.querySelector("button[type='submit']");
if (inputField && submitBtn) {
inputField.value = dataArray[i].trim();
submitBtn.click();
}
i++;
}, 2000); // Wait 2 seconds between actions
}
}
};