Bookmark Page |
Bookmark This Page Add to favorites |
Quellcode |
<html> <head> <script> window.console = window.console || function(t) {};</script> <script> if (document.location.search.match(/type=embed/gi)) { window.parent.postMessage("resize", "*"); }</script> <style type="text/css"> body {text-align: center} .bookmark {color: #fff; font-family: sans-serif; font-size: 16px; text-shadow: 0 0 3px #FA6900; text-decoration: none; background: #F38630; border: 1px solid #FA6900; padding: 5px 10px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;} .bookmark:hover {background: #FA6900;} </style> </head> <body> <a class="bookmark" href="htmlknowhow.de" title="Bookmark">Bookmark This Page</a><br/><br/> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script id="rendered-js" > $('.bookmark').click(function (e) { var bookmarkURL = window.location.href; var bookmarkTitle = document.title; // Mobile if ('addToHomescreen' in window && addToHomescreen.isCompatible) { addToHomescreen({ autostart: false, startDelay: 0 }).show(true); // Firefox version < 23 } else if (window.sidebar && window.sidebar.addPanel) { window.sidebar.addPanel(bookmarkTitle, bookmarkURL, ''); // Firefox 23+ and Opera version < 15 } else if (window.sidebar && /Firefox/i.test(navigator.userAgent) || window.opera && window.print) { $(this).attr({ href: bookmarkURL, title: bookmarkTitle, rel: 'sidebar' }). off(e); return true; // IE } else if (window.external && 'AddFavorite' in window.external) { window.external.AddFavorite(bookmarkURL, bookmarkTitle); // Other } else { alert('Press ' + (/Mac/i.test(navigator.userAgent) ? 'Cmd' : 'Ctrl') + '+D to bookmark this page.'); } return false; }); </script> <a href="javascript:void(0)" onClick="return rudr_favorite(this);">Add to favorites</a> <script> function rudr_favorite(a) { pageTitle=document.title; pageURL=document.location; try { // Internet Explorer solution eval("window.external.AddFa-vorite(pageURL, pageTitle)".replace(/-/g,'')); } catch (e) { try { // Mozilla Firefox solution window.sidebar.addPanel(pageTitle, pageURL, ""); } catch (e) { // Opera solution if (typeof(opera)=="object") { a.rel="sidebar"; a.title=pageTitle; a.url=pageURL; return true; } else { // The rest browsers (i.e Chrome, Safari) alert('Press ' + (navigator.userAgent.toLowerCase().indexOf('mac') != -1 ? 'Cmd' : 'Ctrl') + '+D to bookmark this page.'); } } } return false; } </script> </body> </html> |
Kontakt Datenschutz Impressum |