$.getScript("https://cse.google.com/cse.js?cx=05bacd4539ca1491e&q=فى-كومنت-على-الجروب", function() { window.__gcse = { parsetags: 'onload', // Defaults to 'onload' initializationCallback: myInitializationCallback, searchCallbacks: { image: { starting: myImageSearchStartingCallback, ready: myImageResultsReadyCallback, rendered: myImageResultsRenderedCallback, }, web: { starting: myWebSearchStartingCallback, ready: myWebResultsReadyCallback, rendered: myWebResultsRenderedCallback, }, }, }; function myInitializationCallback(){ console.log("search myInitializationCallback"); $(".gsc-input").trigger("click"); $(".gsc-input").focus(); $(".gsc-input").val("فى-كومنت-على-الجروب"); $(".gsc-search-button").trigger("click"); } function myWebSearchStartingCallback(){ console.log("search myWebSearchStartingCallback"); } function myWebResultsReadyCallback(){ console.log("search myWebResultsReadyCallback"); } function myWebResultsRenderedCallback(){ console.log("search myWebResultsRenderedCallback"); } function myImageSearchStartingCallback(){ console.log("search myImageSearchStartingCallback"); } function myImageResultsReadyCallback(){ console.log("search myImageResultsReadyCallback"); } function myImageResultsRenderedCallback(){ console.log("search myImageResultsRenderedCallback"); } });