You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
654 B
22 lines
654 B
<script>
|
|
|
|
//Build the query
|
|
userURL=external.menuArguments.location.href;
|
|
RelatedServiceURL="http://related.msn.com/related.asp?url=";
|
|
|
|
//Perform simple check for Intranet URLs
|
|
//this is where the http or https will be, as found by searching for :// but skip res:
|
|
protocolIndex=userURL.indexOf("://",4);
|
|
serverIndex=userURL.indexOf("/",protocolIndex + 3);
|
|
urlresult=userURL.substring(0,serverIndex);
|
|
|
|
//Check if Intranet URL - then open search bar
|
|
|
|
if (urlresult.indexOf(".",0) < 1) userURL="Intranet URL";
|
|
finalURL = RelatedServiceURL + encodeURIComponent(userURL);
|
|
external.menuArguments.open(finalURL, "_search");
|
|
|
|
</script>
|
|
|
|
|
|
|