OmNomNomify

Brighten up your web browsing with the Cookie Monster!

  1. // ==UserScript==
  2. // @name OmNomNomify
  3. // @description Brighten up your web browsing with the Cookie Monster!
  4. // @include *
  5. // @author Zackton
  6. // @version 1.0
  7. // @namespace https://gf.qytechs.cn/users/8935
  8. // ==/UserScript==
  9.  
  10. setInterval(function(){start()}, 5000);
  11.  
  12. function start() {
  13. (function nomify() {
  14. var shapes = {
  15. "w_rect": ["tumblr_mohxt1V6a91svhqpoo1_500.gif", "tumblr_md0q05wMJb1rxis0k.gif", "tumblr_ml0nmjWpX41snjjivo1_500.gif", "CastDance_322x183.gif", "CookieDawn_322x183.gif", "Painting_322x183.gif"],
  16. "t_rect": ["CookieMonster-Sitting.jpg", "487961_10150955894571587_1215263686_n.jpg", "534767_10151516100086587_1790492047_n.jpg", "Static.jpg"],
  17. "square": ["cookie_monster.jpg", "935823_10151502554911587_1547641144_n.jpg", "902502_10151355606796587_45192127_o.jpg", "cookie-monster.jpg", "Cookie_250x250.gif"]
  18. },
  19. img_path = "http://downloads.cdn.sesame.org/sw/OmNomNomify/";
  20. function chooseImg(shape) {
  21. return img_path + shapes[shape][Math.floor(Math.random() * shapes[shape].length)]
  22. }
  23. function getShape(h, w) {
  24. return h === w ? "square" : h > w ? "t_rect" : "w_rect"
  25. }
  26. var imgs = document.getElementsByTagName("img"),
  27. img, h, w, shape;
  28. for (var i = 0, len = imgs.length; i < len; i++) {
  29. img = imgs[i], h = img.height, w = img.width, s = getShape(h, w);
  30. img.setAttribute("height", h);
  31. img.setAttribute("width", w);
  32. img.src = chooseImg(s)
  33. };
  34. return void 0;
  35. })();
  36. };

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址