Image Rotation in Browser

Instructions: drag one of the buttons into your bookmarks, then click on it while you're at a page with an image.

0 degree rotation

Rotate 0°

90 degree rotation

Rotate 90°

180 degree rotation

Rotate 180°

270 degree rotation

Rotate 270°

Sample Image

javascript:
(function() {
    var images = document.getElementsByTagName('img');
    for (var i = 0; i < images.length; i++) {
        images[i].setAttribute('style', 'transform:rotate(90deg);'); // the 90deg parameter may be changed to whatever angle you want to rotate to
    }
})();

/* One-line Format */
javascript: (function() { var images = document.getElementsByTagName('img'); for (var i = 0; i < images.length; i++) { images[i].setAttribute('style', 'transform:rotate(90deg);'); } })();

         Created: May 12, 2015
Completed in full by: Michael Yaworski