How can I had some contents from Chrome/Chromium browsers?
- by MIH1406
I need to put a "Bookmark us" in my website. But as I searched using Google all the results conclude that no way to do "Bookmark us" for Chrome/Chromium browsers.
So I want to either:
1- Hide the content from chrome/chromium browsers.
or at least,
2- Show a message if the user's browser is chrome/chromium after clicking that buttong.
Here is my "Bookmark Us" script:
/** Bookmark Us */
function bookmark_us(url, title){
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);
} else {
}
/** Bookmark Us */
<a href="javascript:bookmark_us('URL','TITLE')">Bookmark Us!</a>