This script will get the computed background color of your body, and then will create shadows darker than your background (if you have a light background), or lighter than your background (if you have a dark background). If the body does not have a background, the script will take 160
as the default value for red, green and blue.
It will then add a border
, a box-shadow
, a padding
and a margin
to each element of your page, and will use the cool rotate3d
css function to tilt your website.
Follow these steps to make it work on any website:
- Create a new bookmark
- Paste the code inside
location
- Visit a website
- Click on the bookmark
Or remove the javascript:
part and paste the code into your JS console.
Watch this video for a quick demo.
I minified and urlencoded it in order to make it work as a bookmarklet in Brave, works in chrome too, it was only working as a paste into the console.
https://gist.github.com/cherrerajobs/ec7fc92a30bfd2bb3ba753454669a605