Jump to content

Topic on Extension talk:GoogleSiteSearch

How to make search results open in same window?

4
Summary by Jkmartindale

Version 3.0 added this as the default. In previous versions this can be accomplished by editing a line in GoogleSiteSearch.content.default.html from customSearchControl.setLinkTarget(google.search.Search.FILTERED_CSE_RESULTSET); to customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);.

2601:5:1800:248:B1AA:719B:3289:8F58 (talkcontribs)

Thank you for the extension. I wanted to know if it is possible to have search results open in same winodow/tab when clicked. As of now it opens in a new window/tab instead of just taking user to the page. Is this something that can be implemented?

Wikimanz (talk) 06:27, 29 March 2014 (UTC)

83.100.199.133 (talkcontribs)

I'd be interested in this too.

Anyone have any ideas?

83.100.199.133 (talkcontribs)

OK, I've managed to solve it.

Edit the GoogleSiteSearch.content.default.html

Change the line: customSearchControl.setLinkTarget(google.search.Search.FILTERED_CSE_RESULTSET);

To: customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);

Fo0bar (talkcontribs)

The latest release (3.0) changed the CSE API used, and now defaults to same window/tab.