Advertisement
AlexProg

Code profile user

Feb 17th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.     $('body').append(
  3.         '<style type="text/css">' +
  4.         '#epf, form:not([action="/post"]) .button2, input[type="submit"] {' +
  5.         'background-color: rgba(182, 182, 182, 0.7);' +
  6.         'background-image: none !important;' +
  7.         'border: 0 none;' +
  8.         'color: #212121;' +
  9.         'font-family: "Segoe UI Web Semibold","Segoe UI Web Regular","Segoe UI","Segoe UI Symbol","Helvetica Neue",Arial;' +
  10.         'font-size: 100%;' +
  11.         'font-weight: 400;' +
  12.         'height: 2.142em;' +
  13.         'min-width: 6em;' +
  14.         'padding: 3px 12px 5px;' +
  15.         '}' +
  16.         'form:not([action="/post"]) .button2:hover, input[type="submit"]:hover {' +
  17.         'background: none repeat scroll 0 0 rgba(205, 205, 205, 0.82);' +
  18.         '}' +
  19.         '#epf:active, .button2:active, input.button2:active, input[type="submit"]:active {' +
  20.         'background-color: #212121;' +
  21.         'color: #fff;' +
  22.         '}' +
  23.         '#epf {' +
  24.         '-moz-border-bottom-colors: none;' +
  25.         '-moz-border-left-colors: none;' +
  26.         '-moz-border-right-colors: none;' +
  27.         ' -moz-border-top-colors: none;' +
  28.         'background: none repeat scroll 0 0 #242c2e !important;' +
  29.         'border-color: #212121 !important;' +
  30.         'border-image: none;' +
  31.         'border-radius: 3px;' +
  32.         'border-style: solid;' +
  33.         'border-width: 1px 1px 0;' +
  34.         'box-shadow: 0 2px 0 0 #5c5c5c inset, 0 2px 3px rgba(0, 0, 0, 0.2);' +
  35.         'color: #fff;' +
  36.         'cursor: pointer;' +
  37.         'display: inline-block;' +
  38.         'font-family: Helvetica,Arial,sans-serif;' +
  39.         'font-size: 12px;' +
  40.         'font-style: normal;' +
  41.         'font-variant: normal;' +
  42.         'font-weight: 300;' +
  43.         'height: 30px;' +
  44.         'line-height: 30px;' +
  45.         'padding: 0 10px;' +
  46.         'text-align: center;' +
  47.         'text-shadow: 0 -1px 0 #191919;' +
  48.         'width: 125px;' +
  49.         '}' +
  50.         '.user-info {' +
  51.         'background: none repeat scroll 0 0 #fff;' +
  52.         'border: 12px solid gray;' +
  53.         'border-radius: 7px;' +
  54.         'max-width: 300px;' +
  55.         'padding: 7px;' +
  56.         'position: absolute;' +
  57.         'z-index: 99999;' +
  58.         'margin-left: 130px;' +
  59.         'margin-top: -200px;' +
  60.         '}' +
  61.         '.rank-personalizado2 {' +
  62.         'float: left;' +
  63.         'height: 100px;' +
  64.         'margin-left: -153px;' +
  65.         'margin-top: -100px;' +
  66.         'position: absolute;' +
  67.         'width: 100px;' +
  68.         'z-index: 999999 !important;' +
  69.         '}' +
  70.         '.rank-personalizado {' +
  71.         'float: left;' +
  72.         'height: 89px;' +
  73.         'margin-left: -233px;' +
  74.         'margin-top: -33px;' +
  75.         'position: absolute;' +
  76.         'width: 90px;' +
  77.         'z-index: 99999 !important;' +
  78.         '}' +
  79.         '.neve {' +
  80.         'height: 32px;' +
  81.         'margin-left: -110px;' +
  82.         ' margin-top: -31px;' +
  83.         'position: absolute;' +
  84.         'width: 96px;' +
  85.         'z-index: 9999 !important;' +
  86.         '}' +
  87.         '</style>'
  88.     );
  89.     $('.postdetails.poster-profile').each(function() { //adicionando uma class nas info dos users
  90.         $(this).html($(this).html().replace(/<span class="label/g, '<dd><div class="post_field"><span class="label'));
  91.     });
  92.     var element = $('.postdetails.poster-profile');
  93.  
  94.     element.each(function() {
  95.  
  96.         var self = $(this);
  97.  
  98.         self.append('<span id="epf" class="exibir-perfil">Exibir meu perfil</span>');
  99.         self.find('.exibir-perfil').click(function() {
  100.             self.find('.post_field').show();
  101.         });
  102.  
  103.     });
  104.  
  105.     $('.postdetails.poster-profile .post_field').addClass('user-info');
  106. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement