# Bookmarklets (Bookmarks)
## Metadata
**Parent**:: [[Other Favorites (Bookmarks)|Other Favorites]]
**Kind**:: #bookmarks-collection
**Source**:: #from/browser
**Generated by**:: [[ob-bookmarks]]
**Chrome URL**:: `edge://favorites/?id=40`
## Children
- Background All #bookmarklet ^43
```javascript
document.querySelectorAll("*").forEach(element => element.style.background="rgb(0 0 0 / 10%)");
```
- Color Picker #bookmarklet ^44
```html
<html><title>Color Picker</title><input type="color"></html>
```
- Copy Readwise Wikilink #bookmarklet ^45
```javascript
(function(){(function () {
const title = (document.querySelector(".list-book-title") || document.querySelector(".header-content h1")).textContent;
const authors = (document.querySelector(".list-book-author") || document.querySelector(".document-header-author-text")).textContent.split(/ (and|&) /);
const author = authors.length > 1 ? `${authors[0]} et al.` : authors[0];
const result = `[[${author} - ${title} (Highlights)]]`;
prompt("clipboard", result);
})();})();
```
- Design Mode #bookmarklet ^46
```javascript
document.designMode="on";void 0;
```
- dotepub #bookmarklet ^47
```javascript
(function(){try{var d=document,w=window;if(!d.body||d.body.innerHTML=='')throw(0);var s=d.createElement('link'),h=d.getElementsByTagName('head')[0],i=d.createElement('div'),j=d.createElement('script');s.rel='stylesheet';s.href='//dotepub.com/s/dotEPUB-favlet.css';s.type='text/css';s.media='screen';h.appendChild(s);i.setAttribute('id','dotepub');i.innerHTML='<div id="status"><p>Conversion in progress...</p></div>';d.body.appendChild(i);j.type='text/javascript';j.charset='utf-8';j.src='//dotepub.com/j/dotepub.js?v=1.2&s=1&t=epub&g=en';h.appendChild(j);}catch(e){w.alert('The page has no content or it is not fully loaded. Please, wait till the page is loaded.');}})();
```
- PrintFriendly #bookmarklet ^50
```javascript
(function(){if(window['priFri']){window.print()}else{pfstyle='nbk';pfBkVersion='1';_pnicer_script=document.createElement('SCRIPT');_pnicer_script.type='text/javascript';_pnicer_script.src='//cdn.printfriendly.com/printfriendly.js';document.getElementsByTagName('head')[0].appendChild(_pnicer_script);}})();
```
- Rename Tab #bookmarklet ^51
```javascript
(function(){if (!("_renameTitle" in document)) {
document.title = document.title || "";
const titleEl = document.getElementsByTagName("title")[0];
const titleTokenRegex = /%t/g;
let titleWithoutRenaming = document.title;
let titleWithRenaming = '';
document._renameTitle = (v) => {
titleWithRenaming = v;
titleEl.innerText = v.replace(titleTokenRegex, titleWithoutRenaming);
};
Object.defineProperty(document, "title", {
set: (v) => {
titleWithoutRenaming = v;
titleEl.innerText = titleWithRenaming.replace(titleTokenRegex, v);
},
get: () => titleEl.innerText,
});
}
const title = prompt("Rename tab (Leave empty to restore original name)", document.title);
// title is null when user cancel the dialog.
if (title !== null) {
document._renameTitle(title);
}})();
```
- Select and Delete #bookmarklet ^52
```javascript
(function(){var isIe=false;/*@cc_on isIe=true; @*/function fe(a,fn){var i,l=a.length;for(i=0;i<l;i++){fn(a[i]);}};function ae(el,n,fn,ix){function wfn(ev){var el=(isIe?window.event.srcElement:ev.target);if(ix || !el.xmt) fn(el);}if (isIe){n='on' + n;el.attachEvent(n, wfn);} else {el.addEventListener(n, wfn, false);}if(!el.es)el.es=[];el.es.push(function(){if(isIe){el.detachEvent(n,wfn);} else {el.removeEventListener(n, wfn, false);}});el.re=function(){fe(el.es,function(f){f()});};}function sce(el){var oldclick=el.onclick,oldmu=el.onmouseup,oldmd=el.onmousedown;el.onclick=function(){return false;};el.onmouseup=function(){return false;};el.onmousedown=function(){return false;};el.rce=function(){el.onclick=oldclick;el.onmouseup=oldmu;el.onmousedown=oldmd;};}if (!window.r_)window.r_=[];var r=window.r_;var D=document;ae(D.body,'mouseover', function(el){el.style.backgroundColor='#ffff99'; sce(el)});ae(D.body,'mouseout', function(el){el.style.backgroundColor='';if(el.rce)el.rce();});ae(D.body,'click', function(el){el.style.display='none'; r.push(el);});function ac(p,tn,ih){var e=D.createElement(tn);if(ih)e.innerHTML=ih;p.appendChild(e);return e;}var p=0;var bx=ac(D.body,'div');bx.style.cssText='position:'+(isIe?'absolute':'fixed')+';padding:2px;background-color:#99FF99;border:1px solid green;z-index:9999;font-family:sans-serif;font-size:10px';function sp(){bx.style.top=(p&2)?'':'10px';bx.style.bottom=(p&2)?'10px':'';bx.style.left=(p&1)?'':'10px';bx.style.right=(p&1)?'10px':'';}sp();var ul=ac(bx,'a',' Undo |');ae(ul,'click',function(){var e=r.pop(); if(e)e.style.display='';}, true);var ual=ac(bx,'a',' Undo All |');ae(ual,'click',function(){var e;while(e=r.pop())e.style.display='';}, true);var ml=ac(bx,'a',' Move |');ae(ml,'click',function(){p++;sp();}, true);var xl=ac(bx,'a',' Exit ');ae(xl,'click',function(){D.body.re();bx.parentNode.removeChild(bx);}, true);fe([bx,ul,ml,xl,ual],function(e){e.style.cursor='pointer';e.xmt=1;});})()
```