»
Log In
«
[
mmii.info
]
// Bookmark Script Viewer
Icon Search
|
CarlBucket
|
Icon Tester
|
Other Scripts
[+] Quicknote
-- drag this link to your bookmark bar to install the script.
To use this script, just click the bookmark link while viewing the page you want to use it on.
javascript: function close_note() { save_note(); e_note.style.display='none'; } function save_note() { update_j=false; var note_txt=note_textarea.value; update_cok('note_txt',note_txt); } function timeout_update() { if(update_j) clearTimeout(update_j); update_j=setTimeout('save_note()',300); } function retrieve_note() { var cok=document.cookie; var cok_arr=cok.split(';'); var note_txt=''; for(var i=0;i<cok_arr.length;i++) { cok_aa=cok_arr[i].split('='); if(cok_aa[0].indexOf('note_txt')!=-1) note_txt=unescape(cok_aa[1]); } note_textarea.value=note_txt; } function update_cok(param,val) { document.cookie=param+'='+escape(val)+';expires='+note_exp.toGMTString(); } function do_note() { make_new_note=true; try{ if(typeof(note_exists)!='undefined') make_new_note=false; } catch(e) { alert(e); } note_exists=true; note_expDays=14; note_exp=new Date(); note_exp.setTime(note_exp.getTime()+(note_expDays*24*60*60*1000)); if(make_new_note) { create_note(); document.body.appendChild(e_note); retrieve_note(); } else { e_note.style.display='block'; } window_offsetX=window.pageXOffset; window_offsetY=window.pageYOffset; window_width=window.innerWidth; obj_x=Math.round(window_offsetX+window_width/2-e_note.offsetWidth/2); obj_y=Math.round(window_offsetY+20); e_note.style.left=obj_x+'px'; e_note.style.top=obj_y+'px'; note_textarea.focus(); document.onmousemove=getMousePos; document.onmousedown=catchClick; document.onmouseup=releaseClick; document.onmouseout=function(){docOut=setTimeout('releaseClick()',50)}; document.onmouseover=function(){if(docOut)clearTimeout(docOut);docOut=false}; moving_obj=false; mouse_x0=0; mouse_y0=0; obj_x0=0; obj_y0=0; docOut=false; working_obj=false; update_j=false; } function create_note() { e_note=document.createElement('div'); e_note.style.position='absolute'; e_note.style.width='200px'; e_note.style.height='200px'; e_note.style.zIndex='999'; e_note.style.border='1px solid black'; e_note.style.backgroundColor='#dddddd'; e_note.style.textAlign='center'; e_note.style.fontFamily='Verdana,Arial,sans-serif'; e_note.style.fontSize='12px'; e_note.style.padding='0px'; e_note.style.margin='0px'; e_note.style.opacity='.9'; var note_topbar=document.createElement('div'); note_topbar.style.position='relative'; note_topbar.style.borderBottom='1px solid black'; note_topbar.style.backgroundColor='#003366'; note_topbar.style.fontWeight='bold'; note_topbar.style.color='white'; note_topbar.style.width='200px'; note_topbar.style.height='14px'; note_topbar.style.fontSize='10px'; note_topbar.style.cursor='default'; note_topbar.style.textAlign='left'; note_topbar.appendChild(document.createTextNode('Note: '+location.host)); note_topbar.onmouseover=function(){working_obj=e_note}; note_topbar.onmouseout=function(){working_obj=false}; note_closeX=document.createElement('div'); note_closeX.style.position='absolute'; note_closeX.style.left='181px'; note_closeX.style.top='0px'; note_closeX.style.width='18px'; note_closeX.style.height='14px'; note_closeX.style.borderLeft='1px solid black'; note_closeX.style.backgroundColor='#800000'; note_closeX.style.textAlign='center'; note_closeX.onmouseover=function(){this.style.backgroundColor='#400000'}; note_closeX.onmouseout=function(){this.style.backgroundColor='#800000'}; note_closeX.onclick=close_note; note_closeX.appendChild(document.createTextNode('[x]')); note_topbar.appendChild(note_closeX); e_note.appendChild(note_topbar); note_textarea=document.createElement('textarea'); note_textarea.style.width='198px'; note_textarea.style.height='184px'; note_textarea.style.border='0px'; note_textarea.style.backgroundColor='#ffffef'; note_textarea.style.padding='0px'; note_textarea.onkeypress=timeout_update; e_note.appendChild(note_textarea); return e_note; } function getMousePos(e) { if(document.all) { mouse_x=window.event.x+document.body.scrollLeft; mouse_y=window.event.y+document.body.scrollTop; } else if(document.getElementById) { mouse_x=e.pageX; mouse_y=e.pageY; } if(moving_obj) move_obj(moving_obj); } function catchClick(e) { if(working_obj&&!moving_obj) { moving_obj=working_obj; obj_x0=absX(moving_obj); obj_y0=absY(moving_obj); obj_x=obj_x0; obj_y=obj_y0; mouse_x0=mouse_x; mouse_y0=mouse_y; } } function releaseClick(e) { moving_obj=false; } function move_obj(obj) { obj_x=obj_x0+mouse_x-mouse_x0; obj_y=obj_y0+mouse_y-mouse_y0; if(obj_x<0) obj_x=0; if(obj_y<0) obj_y=0; if(obj_x+obj.offsetWidth>document.width) obj_x=document.width-obj.offsetWidth; if(obj_y+obj.offsetHeight>document.height) obj_y=document.height-obj.offsetHeight; obj.style.left=obj_x+'px'; obj.style.top=obj_y+'px'; } function absY(elmt) { var etop=0; while(elmt!=document.body) { etop+=elmt.offsetTop; elmt=elmt.offsetParent; } return etop; } function absX(elmt) { var eleft=0; while(elmt!=document.body) { eleft+=elmt.offsetLeft; elmt=elmt.offsetParent; } return eleft; } void(do_note());
[
mmii.info
]