My internal search engine is displaying search results in a specific format, like so:
Currently, the JavaScript on the page adds attributes such as "target=blank"
and #search="query_String"
to each link in the search results.
I am attempting to modify the JavaScript so that every link is transformed from
"http://test.mobilkul.se/search/click?query..."
to
"http://test.mobilkul.se/search/fetch?query..."
I have experimented with adding:
.replace('search/click?query=','search/fetch?query=');
at various points within the JavaScript code, but I haven't seen any changes take effect..
Could someone please provide assistance?
EDIT:
I have created a JSfiddle for reference: http://jsfiddle.net/shibaja/kK2PZ/
The relevant JavaScript code can be found at the bottom of the html file.
The following modifications need to be applied to each link:
.replace('&url=%2Fsearch','&urlx=%2Fsearch')
.replace('search/click?query=','search/fetch?query=')
.replace('&title=file','&url=file')
.replace('&spaceId=','&space=')
However, I am unsure where exactly in the JavaScript to insert these replacements.. Your help would be greatly appreciated :)