How can a Scrip run when pressing in another website?

I’m using and I tried to implament a “like” system in my table - a button with script that when pressed it increments "“likes” col in the row it has been pressed.
But when using the button in it sends me to the table and opens the row details.
The code:

const config = input.config({
    title: 'Add 1 to a number field',
    description: 'A script that lets you increment a number',
    items: [
        input.config.table('table', {
            label: 'Idea Table',
        input.config.field('numberField', {
            label: 'Likes',
            parentTable: 'table',
const record = await input.recordAsync("Pick a record", config.table)
const currentNumber = record.getCellValue('Likes');
const newNumber = currentNumber ? currentNumber + 1 : 1
await config.table.updateRecordAsync(record, {
    []: newNumber 
output.markdown(`Updated ${} for ${} to ${newNumber}`)