Bookmark Link for all Browsers

DarkDragonLord

New Member
Messages
782
Reaction score
0
Points
0
Hi people!

Here we will know how to make a single link with a "Bookmark Us!".
Well, i've finally founded a javascript that works with all browsers.



So, its pretty simple.

Download the .JS here ---- > http://ddl.exofire.net/js/bookmark.js

It contains:
/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}

Do NOT MODIFY it.


Now, add this inside your HEAD tag
<script type='text/javascript' src='js/bookmark.js'></script>

The bold part is an optional folder. I add all my JavaScripts into a folder.

And the code to the link is:

<a href="javascript:bookmarksite(' HERE IS THE NAME OF YOUR WEBSITE ', ' HERE IS THE URL ')">Bookmark us!</a>


Its done!
Works with FF, IE and probally Opera (did not tested it but in js seems to refer to ir too).

If you want a Bookmark Icon, you can get mine in http://ddl.exofire.net/index.php
Just don't direct link it ¬¬

See you
DDL

Credits? Dunno, the JS did not have any comments with the creator :shifty:
 
Last edited:
Top