Skip to content

Instantly share code, notes, and snippets.

@cherrysushi
cherrysushi / rmbr_pw_bookmarklet.js
Last active June 19, 2022 14:52
Bookmarklet to force browser to remember your password on current page
javascript: (() => { var%20ca,cea,cs,df,dfe,i,j,x,y;function%20n(i,what){return%20i+"%20"+what+((i==1)?"":"s")}ca=cea=cs=0;df=document.forms;for(i=0;i<df.length;++i){x=df[i];dfe=x.elements;if(x.onsubmit){x.onsubmit="";++cs;}if(x.attributes["autocomplete"]){x.attributes["autocomplete"].value="on";++ca;}for(j=0;j<dfe.length;++j){y=dfe[j];if(y.attributes["autocomplete"]){y.attributes["autocomplete"].value="on";++cea;}}}alert("Removed%20autocomplete=off%20from%20"+n(ca,"form")+"%20and%20from%20"+n(cea,"form%20element")+",%20and%20removed%20onsubmit%20from%20"+n(cs,"form")+".%20After%20you%20type%20your%20password%20and%20submit%20the%20form,%20the%20browser%20will%20offer%20to%20remember%20your%20password."); })()
@cherrysushi
cherrysushi / save_pdf_bookmarklet.js
Last active April 8, 2021 15:34
Bookmarklet to save pdf
javascript:document.getElementById('download').click();
@cherrysushi
cherrysushi / wayback_bookmarklet.js
Last active November 14, 2022 11:38
Bookmarklet to search current page on Google Cache and on the Wayback Machine (http://web.archive.org/), edited from https://gist.github.com/n-st/0dd03b2323e7f9acd98e. /!\ Allow pop-ups! Otherwise only Google Cache will open.
javascript: (() => { if (location.href) { origin = location.href; const url = ['https://webcache.googleusercontent.com/search?q=cache:' + origin, 'https://web.archive.org/web/*/' + origin + '*']; url.forEach(element => { window.open(element, "'" + element + "'"); }); } })();