Hiding .js

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philip Ronan

    #16
    Re: Hiding .js

    On 13/10/04 1:13 pm, Andrew Thompson wrote:
    [color=blue]
    > Can anybody suggest a way to 'plant' those as href's in a web-page
    > in such a way that a random user can add them to their favorites?
    > I had a play with doing Randy's version, and got it all messed up,
    > though I was able to get in into my own favorites OK.[/color]

    Using Javascript to add bookmarks is rather unreliable. I think the best
    approach would be to just wrap these scripts into ordinary links like this:

    <A href="javascrip t:...">Right-click on this link and select "Add to
    Favorites"</A>

    Phil

    --
    Philip Ronan
    phil.ronanzzz@v irgin.net
    (Please remove the "z"s if replying by email)


    Comment

    • Randy Webb

      #17
      Re: Hiding .js

      Philip Ronan wrote:[color=blue]
      > On 13/10/04 1:13 pm, Andrew Thompson wrote:
      >
      >[color=green]
      >>Can anybody suggest a way to 'plant' those as href's in a web-page
      >>in such a way that a random user can add them to their favorites?
      >>I had a play with doing Randy's version, and got it all messed up,
      >>though I was able to get in into my own favorites OK.[/color]
      >
      >
      > Using Javascript to add bookmarks is rather unreliable. I think the best
      > approach would be to just wrap these scripts into ordinary links like this:[/color]

      Typically, I would agree with you. But this is a very unusual exception
      that needs a little more to it.
      [color=blue]
      > <A href="javascrip t:...">Right-click on this link and select "Add to
      > Favorites"</A>[/color]

      Right Click on this link and select "Add to Favorites" and change the
      name of the link, and it only works in IE as written.

      The best solution would be to simply put the bookmarklet on a page and
      let people copy/paste it. But for that purpose, this one works better:

      javascript:wind ow.clipboardDat a.setData('text ',document.docu mentElement.out erHTML);void%20 0

      And then you simply paste it into a text editor. The first one numbers
      the lines of source and displays it in the browser.



      --
      Randy
      comp.lang.javas cript FAQ - http://jibbering.com/faq

      Comment

      Working...