So here is what I have so far:
I made a new file called googleSearch.jsp and placed it in the webapp directory.
Here is the file's contents:
- Code: Select all
<html>
<head>
<title>Google Chrome Search</title>
<script type="text/javascript">
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var url = unescape(window.location.href).replace(/\+/g," ");
var results = regex.exec( url );
if( results == null )
return "";
else
return results[1];
}
function passpar() {
document.getElementById("query").value = gup('q');
document.forms["searchForm"].submit();
}
</script>
</head>
<body onload="passpar()">
<div style="display:none">
<form method="post" action="search.view" name="searchForm">
<table>
<tr>
<td>
<input type="text" name="query" id="query" size="28" value="">
</td>
<td>
<input type="submit" id="submitform" onclick="passpar()">
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
Basically it parses the url and sends the "q" parameter's value to the textbox. Then it submits the form.
So the url would be: [subsonic]/googleSearch.jsp?q=[searchString]
The next step is to set up a chrome search engine. The url should be [subsonic]/googleSearch.jsp?q=%s
Here is the problem: It searches fine, but it is only the search window. It does not have all the frames.