summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2008-03-01 17:26:13 (UTC)
committer Michael Krelin <hacker@klever.net>2008-03-01 17:26:13 (UTC)
commitb2e587331d0020fa2bf35e5a5ada249020858e14 (patch) (side-by-side diff)
tree1b6b490275bb54b6f579bad3cf6592a1677aa0a8
parentfe00dd0be8fd88dc8179eed7a38663f07c1288a7 (diff)
downloadfoxri-b2e587331d0020fa2bf35e5a5ada249020858e14.zip
foxri-b2e587331d0020fa2bf35e5a5ada249020858e14.tar.gz
foxri-b2e587331d0020fa2bf35e5a5ada249020858e14.tar.bz2
added handling of append='authority' attribute in URI construction.HEADmaster
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xsrc/components/xriProtocolHandler.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/components/xriProtocolHandler.js b/src/components/xriProtocolHandler.js
index 3d27784..2e09f64 100755
--- a/src/components/xriProtocolHandler.js
+++ b/src/components/xriProtocolHandler.js
@@ -272,48 +272,50 @@ function renderService(srv, doc, qxri)
uriParts = uriParts[2].match('^(.*)\\?(.*)');
if (uriParts) {
if (uriParts[2] == "call") {
linkContent = "<img src=\"chrome://foxri/content/skype_call_large.png\" alt=\"Call " + uriParts[1] + "\"/>";
}
else if (uriParts[2] == "chat") {
linkContent = "<img src=\"chrome://foxri/content/skype_chat_large.png\" alt=\"Chat with " + uriParts[1] + "\"/>";
}
else if (uriParts[2] == "add") {
linkContent = "<img src=\"chrome://foxri/content/skype_add_large.png\" alt=\"Add " + uriParts[1] + " to Skype\"/>";
}
}
}
else if (uriParts[1] == 'aim') {
uriParts = uriParts[2].match('^(.*)\\?.*screenname=([^&]*)', 'i');
if (uriParts) {
linkContent = "<img src=\"chrome://foxri/content/aim_logo.gif\" alt=\"Chat with " + uriParts[2] + "\"/> Chat with " + uriParts[2];
}
}
var linkhref = u.nodeValue;
var xrap = uu.getAttribute('append');
if(xrap=='qxri') {
linkhref += qxri.replace(/^xri:\/\//,'');
+ }else if(xrap=='authority') {
+ linkhref += qxri.replace(/^xri:\/\//,'').replace(/\//.*,'');
}else if(xrap!=null){
dump("Unhandled @append: "+xrap+"\n");
}
html_uris += "<a href=\""+linkhref+"\">"
+ linkContent + "</a>";
html_uris += "</div>";
}
var html = "<div class=\"service srv_" + getServiceClass(knownServiceType) + "\">\n";
html += html_types;
html += html_paths;
html += html_mediatypes;
if (html_uris) {
html += "<strong>URI(s):</strong><br/>\n";
html += html_uris;
}
html += "</div>";
return html;
}
function isKnownServiceType(type)