JoKes: Rotate Images

Rotate all loaded images on webpages

  1. // ==UserScript==
  2. // @name JoKes: Rotate Images
  3. // @namespace JoKes
  4. // @description Rotate all loaded images on webpages
  5. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js
  6. // @include http://*/*
  7. // @grant none
  8. // @version 0.0.1.20150903131720
  9. // ==/UserScript==
  10.  
  11. jQuery.fn.rotate = function(degrees) {
  12. $(this).css({'-webkit-transform' : 'rotate('+ degrees +'deg)',
  13. '-moz-transform' : 'rotate('+ degrees +'deg)',
  14. '-ms-transform' : 'rotate('+ degrees +'deg)',
  15. 'transform' : 'rotate('+ degrees +'deg)'});
  16. return $(this);
  17. };
  18.  
  19. $(function() {
  20. setTimeout(function() { $('img').rotate(180) }, 2000);
  21. });