FonGIF(v6)

Cambiar fondo de perfil y comunidad por un GIF.

  1. // ==UserScript==
  2. // @name FonGIF(v6)
  3. // @namespace FonGIF
  4. // @version 3.0
  5. // @description Cambiar fondo de perfil y comunidad por un GIF.
  6. // @match *://*.taringa.net/cuenta
  7. // @include *://*.taringa.net/cuenta
  8. // @include *://*.taringa.net/comunidades/*/editar/
  9. // @include *://*.kn3.net/
  10. // @icon http://o1.t26.net/images/favicon.ico
  11. // @copyright @EdvardGrieg
  12. // ==/UserScript==
  13. (function ($) {
  14. ///////// Estilos y botones...
  15. var cuenta = $('<style type="text/css">.fon-gif {display: inline-block; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; width: 140px; height: 15px; border: 2px solid rgba(13,215,105,0.0980392); font: normal 14px/normal Arial, Helvetica, sans-serif; color: rgb(10, 104, 51); text-align: center; -o-text-overflow: clip; text-overflow: clip; background: rgba(13,215,105,0.1); -webkit-transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); -moz-transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); -o-transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); } .fon-gif:hover {width: 150px; border: 2px solid rgba(0,0,255,0.19); -webkit-border-radius: 5px; border-radius: 5px; color: rgba(121,173,143,0.35); background: rgba(13,215,105,0.24); -webkit-transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; -moz-transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; -o-transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; } .fon-gif:focus {border: 2px solid rgba(13,215,105,0.498039); -webkit-border-radius: 10px; border-radius: 10px; color: rgba(10,104,51,0.2); background: none; -webkit-transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); -moz-transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); -o-transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); }</style><div class="field clearfix"><label for="background-image">Fondo gif</label><input type="text" class="fon-gif" name="link" id="link" autocomplete="on" placeholder="Link de kn3" title="Colocar el link del gif subido a Kn3 por favor."><button type="button" class="btn v" id="cambiar-perfil" ><font color="#fff">Cambiar</font></button></div>');
  16. $('#design-tab-account').prepend(cuenta);
  17. var comunidad = $('<style type="text/css">.fon-gif {display: inline-block; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; width: 140px; height: 15px; border: 2px solid rgba(13,215,105,0.0980392); font: normal 14px/normal Arial, Helvetica, sans-serif; color: rgb(10, 104, 51); text-align: center; -o-text-overflow: clip; text-overflow: clip; background: rgba(13,215,105,0.1); -webkit-transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); -moz-transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); -o-transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); transition: all 500ms cubic-bezier(0.68, -0.75, 0.265, 1.75); } .fon-gif:hover {width: 150px; border: 2px solid rgba(0,0,255,0.19); -webkit-border-radius: 5px; border-radius: 5px; color: rgba(121,173,143,0.35); background: rgba(13,215,105,0.24); -webkit-transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; -moz-transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; -o-transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; transition: all 300ms cubic-bezier(0.68, -0.75, 0.265, 1.75) 10ms; } .fon-gif:focus {border: 2px solid rgba(13,215,105,0.498039); -webkit-border-radius: 10px; border-radius: 10px; color: rgba(10,104,51,0.2); background: none; -webkit-transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); -moz-transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); -o-transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); transition: all 300ms cubic-bezier(0.6, 0.04, 0.98, 0.335); }</style><div class="clearfix com-edit"><input type="text" name="link" class="fon-gif" id="link" autocomplete="on" placeholder="Link de kn3" title="Colocar el link del gif subido a Kn3 por favor."><button type="button" class="btn v" id="cambiar-comu" ><font color="#fff">Cambiar</font></button></div>');
  18. $('div.clearfix.com-edit.fdo').append(comunidad);
  19. /////////////// Ahora la funcion para el perfil
  20. $('#cambiar-perfil').on('click', function(){
  21. $("#cambiar-perfil").addClass('loading');
  22. var fondo = $('#link').val().trim(); // se obtine el fondo
  23. $.ajax({
  24. type : 'POST',
  25. dataType : 'json',
  26. url : '/ajax/user/background',
  27. data : {
  28. url : fondo.replace('.gif','%2E%67%69%66?/bg.jpg') // se reemplaza el fondo
  29. },
  30. complete: function(){
  31. location.reload(true);
  32. },
  33. error: function (){
  34. alert("Hubo un error, recargue la pagina e intente nuevamente.");
  35. }
  36. });
  37. });
  38. //////////// Cambiar el fondo a tu comunidad
  39. $('#cambiar-comu').on('click', function(){
  40. $("#cambiar-comu").addClass('loading');
  41. var fondo = $('#link').val().trim(); // se obtine el fondo
  42. $.ajax({
  43. type : 'POST',
  44. dataType : 'json',
  45. url : '/ajax/comunidad/background',
  46. data : {
  47. url : fondo.replace('.gif','%2E%67%69%66?/cbg.jpg'), // se reemplaza el fondo
  48. id: global_data.comid
  49. },
  50. complete: function(){
  51. location.reload(true);
  52. },
  53. error: function(){
  54. alert("Hubo un error, recargue la pagina e intente nuevamente.");
  55. }
  56. });
  57. });
  58. })(jQuery);
  59. /*
  60. Espero que les haya gustado. :)
  61. cualquier sugerencia comentar en el tema oficial
  62. de la comunidad:
  63. http://www.taringa.net/comunidades/-cazadores-/9551482/
  64. */