"Bookmark us!" for Firefox

Discussion in 'JavaScript' started by dave78si, Dec 15, 2005.

  1. #1
    Is there a way to pop up 'Add Bookmark' window in Firefox when clicking on a "Bookmark this page" link.
    Like on the bottom of this page, but which would work also in Firefox?
     
    dave78si, Dec 15, 2005 IP
  2. Sorror

    Sorror Active Member

    Messages:
    376
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Sorry, no. Firefox (and the most of other browsers) doesn't allow viewing sites to intervene so hard.
     
    Sorror, Dec 15, 2005 IP
  3. dave78si

    dave78si Peon

    Messages:
    136
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    dave78si, Dec 18, 2005 IP
  4. Sorror

    Sorror Active Member

    Messages:
    376
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #4
    But it's not a bookmark function :)

    document.window('CTRL+D to bookmark');
    Code (markup):
    ;)

    You can also read about addPanel, but it's not the same.
     
    Sorror, Dec 18, 2005 IP
  5. pcdoc

    pcdoc Active Member

    Messages:
    690
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    70
    #5
    between <head> and </head>

    <script type="text/javascript">
    function bookmarksite(title, url){
    if (document.all)
    window.external.AddFavorite(url, title);
    else if (window.sidebar)
    window.sidebar.addPanel(title, url, "")}
    </script>

    then a clickable link between <body> and </body>

    <a href="javascript:bookmarksite('your choice of text', 'http://www.yourdomain.com')">

    see

    http://www.pcdoctorsgroup.com/

    hover | click Bookmark this page
     
    pcdoc, Dec 18, 2005 IP
  6. dave78si

    dave78si Peon

    Messages:
    136
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thank you guys! I have just implemented the script into my site, and it works great.
     
    dave78si, Dec 18, 2005 IP
  7. balkanboy

    balkanboy Banned

    Messages:
    1,950
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    0
    #7
    balkanboy, Dec 18, 2005 IP
  8. dave78si

    dave78si Peon

    Messages:
    136
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This function in Firefox 1.5.0.1 makes a Bookmark, which opens in a sidebar instead of the main window.
    That is interesting, but rather useless. Does anybody know how this could be fixed?
     
    dave78si, Feb 6, 2006 IP
  9. GeorgeB.

    GeorgeB. Notable Member

    Messages:
    5,695
    Likes Received:
    288
    Best Answers:
    0
    Trophy Points:
    280
    #9
    GeorgeB., Feb 17, 2007 IP
    8everything likes this.
  10. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #10
    There isn't a way to do it, deal with it =P.
     
    giraph, Feb 17, 2007 IP
  11. bscdesign.com

    bscdesign.com Active Member

    Messages:
    681
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #11
    If you want to do exactly what fusion.euromaterials.com does add this to your HTML

    <a href="javascript:bookmarksite('TITLE', 'URL')">Bookmark Us</a>

    but replace TITLE with a very short description of your site and replace URL with your site's url.

    All I did was copy the link from there site and add the HTML tag around it.

    I was pretty surprized to find it worked.
     
    bscdesign.com, Feb 18, 2007 IP
  12. bscdesign.com

    bscdesign.com Active Member

    Messages:
    681
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #12
    Oops. I just went through the tread again and saw pcdoc's post. Ignore my first post.
     
    bscdesign.com, Feb 18, 2007 IP
  13. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #13
    You may copy it from the source code here :)

    This goes between the head tags.
     
    eXe, Feb 18, 2007 IP
  14. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Seriously, you guys don't listen. There is no way to add your site to bookmarks on firefox. All you're doing is adding a sidebar panel, which is only going to annoy someone trying to use that bookmark.

    If you actually bother to read the javascript you'll see:

    window.sidebar.addPanel(document.title, location.href, "");
    Code (markup):
    As you can see, it adds a SIDEBAR, not a BOOKMARK.
     
    giraph, Feb 18, 2007 IP
  15. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #15
    It's visible under "bookmarks":confused:
     
    eXe, Feb 18, 2007 IP
  16. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Try CLICKING it. It opens in the SIDEBAR.
     
    giraph, Feb 18, 2007 IP
  17. eXe

    eXe Notable Member

    Messages:
    4,643
    Likes Received:
    248
    Best Answers:
    0
    Trophy Points:
    285
    #17
    Oh shit, you're right...:eek:
     
    eXe, Feb 18, 2007 IP