1 2/*********************************************** 3* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) 4* This notice MUST stay intact for legal use 5* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code 6***********************************************/ 7 8/* Modified to support Opera */ 9/* Modified to support Chrome/Safari with code at: 10 * http://www.mykeblack.com/scripts/javascript/bookmarks/add-to-favorites-bookmark-page-script 11 */ 12function bookmarksite(title,url) { 13 if (window.sidebar) { // firefox 14 window.sidebar.addPanel(title, url, ""); 15 } else if (window.opera && window.print) { // opera 16 var elem = document.createElement('a'); 17 elem.setAttribute('href',url); 18 elem.setAttribute('title',title); 19 elem.setAttribute('rel','sidebar'); 20 elem.click(); 21 } else if (window.external) { // IE or chrome 22 if (document.all) { // ie 23 window.external.AddFavorite(url, title); 24 } else { // chrome 25 alert('Chrome users: Please Press CTRL+D (or Command+D for macs) to bookmark this page'); 26 } 27 } else if (window.getComputedStyle && !window.globalStorage && !window.opera) { // safari 28 alert('Safari users: Please press CTRL+B (or Command+D for macs) to bookmark this page.'); 29 } else if (navigator.userAgent.toLowerCase().indexOf('konqueror') > -1) { // Konqueror 30 alert('Konqueror users: Please press CTRL+B to bookmark this page.'); 31 } else if (navigator.userAgent.toLowerCase().indexOf('webkit') > -1) { // safari 32 alert('Safari/Webkit users: Please press CTRL+B (or Command+D for macs) to bookmark this page.'); 33 } else { 34 alert('Your browser cannot add bookmarks using this link. Please add this link manually.'); 35 } 36} 37 38/* ***** */ 39 40/* 41This script is written by Eric ([email protected]) 42For full source code, installation instructions, 43100's more DHTML scripts, and Terms Of 44Use, visit dynamicdrive.com 45*/ 46 47function printit(){ 48if (window.print) { 49 window.print() ; 50} else { 51 var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; 52document.body.insertAdjacentHTML('beforeEnd', WebBrowser); 53 WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; 54} 55} 56 57/* ***** */ 58 59 60function yt_toolbar_bookmark() { 61 bookmarksite(document.title, document.location.href); 62} 63 64 65/* Popup code */ 66 67function yt_toolbar_popup_toggle(div_id) { 68 var el = document.getElementById(div_id); 69 if ( el.style.display != 'block' ) { 70 el.style.display = 'block';} 71 else { 72 el.style.display = 'none'; 73 } 74} 75 76/* 77function yt_toolbar_popup_close(div_id) { 78 var el = document.getElementById(div_id); 79 el.style.display = 'none'; 80} 81*/ 82
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.