Skip to content

Instantly share code, notes, and snippets.

@hitode909
Created April 4, 2010 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hitode909/355396 to your computer and use it in GitHub Desktop.
Save hitode909/355396 to your computer and use it in GitHub Desktop.
画像くるくる回すやつ
// ==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" + "-moz-transform: rotate(0deg);\n" + " }";
var deg = 0;
var diff = 0;
setInterval(function() {
deg += diff;
diff++;
style.sheet.cssRules[0].style.MozTransform = 'rotate(' + deg % 360 + 'deg)';
}, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment