diff options
author | Kris Maglione <kris@vimperator.org> | 2009-10-31 18:42:48 -0400 |
---|---|---|
committer | Kris Maglione <kris@vimperator.org> | 2009-10-31 18:42:48 -0400 |
commit | cf03f99246d2efb4caf6bb1b2aa2810726b14bb7 (patch) | |
tree | d3c0971981407025b957862cbc1116725d5005ed /common/components | |
parent | 785c416b3d458188b4df13f307d1373534ab157a (diff) | |
download | pentadactyl-cf03f99246d2efb4caf6bb1b2aa2810726b14bb7.tar.gz |
Fix broken :colorscheme completion.
Diffstat (limited to 'common/components')
-rw-r--r-- | common/components/protocols.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/components/protocols.js b/common/components/protocols.js index 7a7a0090..c906d031 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -29,8 +29,12 @@ const systemPrincipal = channel.owner; channel.cancel(NS_BINDING_ABORTED); delete channel; +function dataURL(type, data) + "data:" + (type || "application/xml;encoding=UTF-8") + "," + escape(data); function makeChannel(url, orig) { + if (typeof url == "function") + url = dataURL.apply(null, url()); let uri = ioService.newURI(url, null, null); let channel = ioService.newChannelFromURI(uri); channel.owner = systemPrincipal; @@ -42,7 +46,7 @@ function fakeChannel(orig) function redirect(to, orig) { let html = <html><head><meta http-equiv="Refresh" content={"0;" + to}/></head></html>.toXMLString(); - return makeChannel('data:text/html,' + escape(html), orig); + return makeChannel(dataURL('text/html', html), orig); } function ChromeData() {} |