aboutsummaryrefslogtreecommitdiffhomepage
path: root/web/bookmarklet/add-outline
blob: 880e9ffb3037e38ed08c14fcde1ba05551cfe5de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
javascript: (function() {
  let domStyle = document.getElementById('domStylee');
  if (domStyle) {
    document.body.removeChild(domStyle);
    return;
  }
  domStyle = document.createElement("style");
  domStyle.setAttribute('id', 'domStylee');
  color = Math.random() * (1<<24);
  color = Math.floor(color).toString(16);
  domStyle.append(
    [`* { outline: 1px solid #${color}; outlineOffsset: -1px }`]
  );
  document.body.appendChild(domStyle);
})();