It doesnt change anything, what is wrong with my code?
CmdUtils.CreateCommand({
name: "example",
icon:"http://thepiratebay.org/favicon.ico",
takes: {"input": noun_arb_text},
preview: function(previewBlock,input) {
Utils.parseRemoteDocument(
"http://thepiratebay.org/search/"+input.text+"/0/7/0", // URL
null, // post data
function(doc) { // success callback
//on n'affiche pas la premiere colone
jQuery(".vertTh",doc).css("display","none");
//on definit la couleur du fond de la ligne
jQuery("tr",doc).css("background","#F6F1EE none repeat scroll 0
0");
//on definit la couleur de l'autre ligne
jQuery("tr.alt",doc).css("background","#ccc none repeat scroll 0
0");
//on definit la couleur des lien
jQuery("a",doc).css("color","#000099");
//on n'affiche que les 10 premiers elements
jQuery("tr",doc).slice(10, 100).hide();
//on n'affiche pas les titres
jQuery("th",doc).slice(2, 3).hide();
//on n'affiche pas les bordure des images
jQuery("img",doc).css("border","0 none");
//on definit la couleur du text
jQuery("*",doc).css("color","#000099");
previewBlock.innerHTML = '<base href="http://url.of.your/
choice/"/>';
previewBlock.innerHTML = jQuery("#main-content"), doc).html();
},
function() { // error callback
previewBlock.innerHTML = "Error!";
}
);
}
});
On Feb 1, 3:56 pm, satyr <[email protected]> wrote:
> The easiest way would be to use the BASE element. e.g.:
>
> pblock.innerHTML = '<base href="http://url.of.your/choice/"/>'+ htm;
>
> On Feb 2, 4:00 am, amau96 <[email protected]> wrote:
>
> > In my code, I use jquery to get html from a page and insert it by
> > inner html in the preview part of ubiquity.
> > The probleme is some link are relative, like <a href="/mypage/
> > look.txt">, so when I click on the link the url look like that :
> > chrome://ubiquity/mypage/look.txt
>
> > What can I do to fix this, to replace chrome://ubiquity bye the url
> > of my choice?
>
> > thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ubiquity-firefox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---