nvm i found it works great :)
On May 18, 7:35 pm, Browler <[email protected]> wrote:
> I'm making my first project with ubiquity, I have no javascript
> experience, but I do have c++ and actionscript experience so I'm
> finding it pretty easy. This may seem as a newb question to most
> everyone here, but im trying to add a "this" command to my script
> (like in the email this command). inputing the string "this" should
> cause the program to use your current url in the code and the preview.
>
> so heres the basic idea (i wont give the full code as i don't want to
> give away my project lol)
>
> preview: function(pblock, input){
> if(input.text=="this"){
> pblock.innerHTML = "this is the url you selected: <b>" +
> location.href + "</b>";
> } else {
> pblock.innerHTML = "this is the url you selected: <b>" +
> input.text + "</b>";
> }
>
> }
>
> location.href is where the problem is, it cant find the url the active
> tab is currently on and/or it cant display it in the string. Please
> help :(
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---