|
|
|
|
|
by TomasSedovic
3661 days ago
|
|
For those wondering how this works (I'm not too good with webdev and thought a site can't just open another tab and control it remotely): The code driving this is at: http://ruinmysearchhistory.com/ruin.js?1 It uses window.open to run the search: window.open('https://www.google.com/search?q='+ encodeURI(ruinSearchQuery),'ruinmysearchhistory');
But the second parameter will set a name to the newly open tab. Calling window.open with the same name again will reuse the existing tab:https://developer.mozilla.org/en-US/docs/Web/API/Window/open So it doesn't actually control the google site but keeps reloading it with new search urls. This may be obvious to everybody, but it did confuse me a little. |
|