Skip to content

Instantly share code, notes, and snippets.

@mattn
Forked from hitode909/kurukuruimg.user.js
Created April 5, 2010 01:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/355876 to your computer and use it in GitHub Desktop.
Save mattn/355876 to your computer and use it in GitHub Desktop.
webkit version
// ==UserScript==
// @name kurukuruimg
// @namespace http://www.hatena.ne.jp/hitode909
// @include *
// ==/UserScript==
var style = document.createElement('style');
document.body.appendChild(style);
style.textContent = "img, canvas, video {\n" + "-webkit-transform: rotate(0deg);\n" + " }";
var deg = 0;
var diff = 0;
setInterval(function() {
deg += diff;
diff++;
style.sheet.cssRules[0].style.WebkitTransform = 'rotate(' + deg % 360 + 'deg)';
}, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment