Man kann auch Java-Scripte als Lesezeichen speichern und für unterschiedliche Dienste nutzen. Dazu wird am einfachsten ein Lesezeichen mit dem Inhalt des Scripts, hier immer kursiv geschrieben, erstellt. Das Lesezeichen wird bei geöffneter Webseite aufgerufen.
Gespeicherte Kennworte eines Browser sichtbar machen
denied:javascript:(function()%7Bvar%20IN,F;IN=document.getElementsByTagName('input');for(var%20i=0;i<IN.length;i++)%7BF=IN%5Bi%5D;if(F.type.toLowerCase()=='password')%7Btry%7BF.type='text'%7Dcatch(r)%7Bvar%20n,Fa;n=document.createElement('input');Fa=F.attributes;for(var%20ii=0;ii<Fa.length;ii++)%7Bvar%20k,knn,knv;k=Fa%5Bii%5D;knn=k.nodeName;knv=k.nodeValue;if(knn.toLowerCase()!='type')%7Bif(knn!='height'&&knn!='width'&!!knv)n%5Bknn%5D=knv%7D%7D;F.parentNode.replaceChild(n,F)%7D%7D%7D%7D)()
Schnellnotiz zu Evernote hinzufügen (Cookies von Drittanbietern müssen zugelassen werden)
javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();
RSS- oder Atom-Quelle zu Feedly hinzufügen
javascript:var%20el=document.createElement('div');el.style.zIndex=10000;el.style.position='absolute';el.style.padding='2em';el.style.top=0;el.style.backgroundColor='#ffffcc';el.style.border='1px%20solid%20#008000';el.style.color='#000%20!important';el.style.fontFamily='Arial,%20sans-serif';el.style.textAlign='left';el.innerHTML='View%20the%20following%20feeds%20in%20Feedly:';var%20found%20=%20false;var%20links%20=%20document.getElementsByTagName('link');for%20(var%20i%20=%200,%20link;%20link%20=%20links[i];%20i++)%20{%20var%20type%20=%20link.getAttribute('type');%20var%20rel%20=%20link.getAttribute('rel');%20var%20title%20=%20link.getAttribute('title');%20if%20(type%20&&%20(type%20==%20'application/rss+xml'%20||%20type%20==%20'application/atom+xml')%20&&%20rel%20&&%20rel%20==%20'alternate')%20{%20var%20href%20=%20link.getAttribute('href');%20if%20(!href.match(/^http/))%20{%20var%20path%20=%20(href.match(/^\//))%20?%20'/'%20:%20location.pathname;%20href='http://'%20+%20location.hostname%20+%20path%20+%20href;%20}%20var%20previewLink%20=%20document.createElement('a');%20previewLink.href%20=%20'%20http://cloud.feedly.com/#subscription/feed/'%20+%20href;%20previewLink.innerHTML%20=%20((title)%20?%20title%20:%20'')%20+%20'%20-%20'%20+%20href;%20previewLink.style.display='block';%20previewLink.style.color='#00c';previewLink.style.textDecoration='underline';%20el.appendChild(previewLink);%20found%20=%20true;}}%20var%20close=document.createElement('a');%20close.innerHTML='Hide%20this%20box';%20close.href='#';%20close.style.display='block';%20close.style.marginTop='2em';%20close.style.color='#00c';%20close.style.textDecoration='underline';%20close.onclick=function()%20{el.style.display='none';%20return%20false;};%20el.appendChild(close);%20function%20AddFeedBox()%20{document.body.appendChild(el);y=window.scroll(0,%200);}%20if%20(!found)%20alert('Oops.%20Can\'t%20find%20any%20feeds%20for%20this%20page.');%20else%20void(z=AddFeedBox());
MyPage Bookmarklet bearbeitet Webseiten vor dem Ausdrucken oder Speichern
javascript:javascript:(function(){var d=document,i=0,l,em=0,ed,b=d.body,w=window,sl=[],hid=[],$=b.getElementsByTagName('*'),cTp=(d.all&&!w.opera)?'absolute':'fixed',css=d.createElement('style');css.type='text/css';css.media='all';var cT='#mPp{font-size:15px;padding:5px;background:#fdd;color:#000;position:'+cTp+';top:0;right:0;zIndex:1000;text-align:right}#mPp:hover{padding:.5em;line-height:1.6;}#mPp:hover u{display:none}#mPp i{display:none;text-align:left;cursor:default;color:#000}#mPp:hover i{display:block}#mPp b{border:1px outset #000;background:#fff;color:#666;padding:0 2px;margin-right:4px}#mPe{position:absolute;left:0;right:0;padding:5px 10px;background:#fdd;text-align:left}#mPe textarea{width:99%;display:block}'+'.mPs,.mPs *{background:#ff0;color:#000;}.mPh{background:#ffc;}.mPi,.mPi *{background:#fff;width:auto;float:none;margin:1em 0;padding:0;}body.mPi{text-align:left;margin:0;}'.replace(/;/g,' !important;');if(css.styleSheet)css.styleSheet.cssText=cT;else css.appendChild(d.createTextNode(cT));d.getElementsByTagName('head')[0].appendChild(css);function nB(e){if(!e)var e=w.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()}function over(e){nB(e);!em&&!this.isSel&&changeCn(this,'mPh')}function out(e){nB(e);!em&&!this.isSel&&changeCn(this)}function clik(e){nB(e);!em&&this.isSel?unSel(this):sel(this);return false}while(l=$.item(i++)){addEvents(l)}var h=d.createElement('a');h.id='mPp';h.href='http://mrclay.org/';h.innerHTML='<u>?</u><i><b>R</b>emove Selected</i><i><b>U</b>ndo Remove</i><i><b>I</b>solate Selected</i><i><b>P</b>rint Preview</i><i><b>W</b>iden Selected</i><i><i><b>B</b>ackwards</i><b>N</b>ext</i><i><b>D</b>eselect</i><i><b>C</b>opy Element</i><i><b>E</b>dit HTML</i><i><b>Esc</b>ape/Quit</i>';h.onclick=function(e){nB(e)};b.appendChild(h);d.onkeydown=function(e){var ls=sl.length?sl[sl.length-1]:0;if(!e)var e=window.event;if(e.keyCode==27){rm(h);rm(css);i=0;while(l=$.item(i++)){l.onmouseover=l.oldOnmouseover||null;l.onmouseout=l.oldOnmouseout||null;l.onclick=l.oldOnclick||null;l.oldOnmouseover=null;l.oldOnmouseout=null;l.oldOnclick=null}d.onkeydown=null;em&&rm(ed)}if(em)return true;switch(e.keyCode){case 82:while(sl.length){ls=sl[sl.length-1];ls.style.display='none';unSel(ls);hid.push(ls)}break;case 73:sel(h);while(b.hasChildNodes())b.removeChild(b.firstChild);while(sl.length){b.appendChild(sl[0]);unSel(sl[0])}break;case 87:if(ls){unSel(ls);(ls!=b)&&sel(ls.parentNode)}break;case 80:pp();break;case 68:unSel(ls);break;case 85:hid.length&&(hid.pop().style.display='');break;case 69:ls&&ls.innerHTML&&edit(ls);break;case 66:if(ls){l=d.getElementsByTagName('*').item(getSourceIndex(ls)-1);if(l&&l!=b){unSel(ls);sel(l)}}break;case 78:if(ls){l=d.getElementsByTagName('*').item(getSourceIndex(ls)+1);if(l&&l!=h){unSel(ls);sel(l)}}break;case 67:if(ls){l=ls.cloneNode(true);if(ls.id){l.id+='_copy'}ls.parentNode.insertBefore(l,ls.nextSibling);addEvents(l);i=0;var desc;while(desc=l.getElementsByTagName('*').item(i++))addEvents(desc);unSel(ls);sel(l)}break;default:return true}return false};function rm(l){l.parentNode.removeChild(l)}function changeCn(l,cN){l.className=l.className.replace(/\bmP[hs]\b/g,'');if(cN)l.className+=l.className?' '+cN:cN}function sel(l){changeCn(l,'mPs');l.isSel='1';sl.push(l)}function unSel(l){changeCn(l);l.isSel='';for(var i=0,len=sl.length;i<len;i++){if(sl[i]==l){sl.splice(i,1);return}}}function edit(l){em=1;var left=0,top=0,tmp=l,chg=0;if(tmp.offsetParent){while(tmp.offsetParent){left+=tmp.offsetLeft;top+=tmp.offsetTop;tmp=tmp.offsetParent}}ed=d.createElement('div');ed.id='mPe';b.appendChild(ed);ed.style.top=(top+l.offsetHeight+5)+'px';unSel(l);var oh=getOuterHTML(l).replace(/^\s*|\s*$/g,'').replace(/ isSel[<>]*\u003E/g,'>').replace(/ class=""(?=[^<>]*>)/g,'');sel(l);var rows=Math.min(15,oh.split('\n').length+3);ed.innerHTML='<textarea id=mPta rows='+rows+'></textarea><button id=mPbu>done</button>';d.getElementById('mPta').value=oh;d.getElementById('mPta').onchange=function(){chg=1};function finEdit(){unSel(l);em=0;if(chg){var tmp=b.appendChild(d.createElement('div'));tmp.innerHTML=d.getElementById('mPta').value;i=0;var desc;while(desc=tmp.getElementsByTagName('*').item(i++))addEvents(desc);while(tmp.hasChildNodes())l.parentNode.insertBefore(tmp.firstChild,l);rm(l);rm(tmp)}rm(ed)}d.getElementById('mPbu').onclick=d.getElementById('mPbu').onkeypress=finEdit}function addEvents(l){if('String'!=typeof l.isSel){l.isSel='';l.oldOnmouseover=l.onmouseover;l.oldOnmouseout=l.onmouseout;l.oldOnclick=l.onclick;l.onmouseover=over;l.onmouseout=out;l.onclick=clik}}function getSourceIndex(l){if(l.sourceIndex)return l.sourceIndex;i=0;var el;while(el=d.getElementsByTagName('*').item(i)){if(el==l)return i;++i}}function getOuterHTML(l){if(l.outerHTML)return l.outerHTML;var dv=d.createElement('div');dv.appendChild(l.cloneNode(true));return dv.innerHTML}function pp(){var i=0,m,ss=d.styleSheets,wk=/webkit/i.test(navigator.userAgent);if(ss&&!wk){for(i=0;i<ss.length;i++){m=ss[i].media;if(m.mediaText)m.mediaText=media(m.mediaText);else ss[i].media=media(m)}}else{ss=[];var r,l;while(l=d.getElementsByTagName('link').item(i++)){r=l.getAttribute('rel');if(r&&/^style/i.test(r))ss.push(l)}i=0;while(l=d.getElementsByTagName('style').item(i++))ss.push(l);for(i=ss.length-1;i>=0;i--){if(wk)handleWk(ss[i]);else ss[i].media=media(ss[i].media)}}function media(m){return(m=='all')?m:(/projection/.test(m))?'print':(/speech/.test(m))?'screen':(/print/.test(m))?'screen,print,projection':'speech'}function handleWk(l){if(/print/.test(l.media)){var n=l.cloneNode(true);n.media='screen';l.parentNode.appendChild(n)}else if(/screen/.test(l.media)){l.disabled=true}}}})();
Hinweise zu Nutzung von MyPage Bookmarklet
http://www.mrclay.org/2006/04/23/mypage-bookmarklet/
YouTu.be-Link erstellen, um ein kurze URL eines Videos zu erhalten
javascript:alert('http://youtu.be/'+window.location.href.match(/v=([a-zA-Z0-9-_]+)/)[1])
Geöffnete Cookies einer Webseite anzeigen lassen
javascript:document.cookie
Erstellungsdatum einer Seite feststellen; diese Funktion wird immer weniger interessant, weil die meisten Seiten inzwischen beim Aufruf generiert werden und deswegen die Gegenwart anzeigen
javascript:alert(document.lastModified)