चर्चा » विकास

How to make a greasemonkey script to automatically set seacrh field value to particular value?

How to make a greasemonkey script to automatically set seacrh field value to particular value?

This is my code, which is not working:

var id=document.getElementById["thesearchbox"].value;

if(id==="") {

if(confirm("wanna search for fifa 16 crack?"))
{
    document.getElementById["thesearchbox"].value="fifa 16 crack";
}

}

Here thesearchbox is the id of search field.

§
पोस्ट केले: 2016-01-14

replace ["thesearchbox"] by ("thesearchbox")

thanks it worked.

उत्तर पोस्ट करा

उत्तर पोस्ट करण्यासाठी साइन इन करा.