gavin19

Flair partial

Jun 9th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var cssType = event.target.getAttribute("id").toString();
  2.     var theID = cssType.split('-')[1];
  3.     var theTitle = SGSFlair.config.flairs[theID]['title'];
  4.     if (cssType.indexOf("SGSFlair-") != -1) {
  5.       cssType = cssType.replace("SGSFlair-", "");
  6.     } else {
  7.       return;
  8.     }
  9.     var theUser = SGSFlair.user;
  10.     var userRequested = SGSFlair.userElement;
  11.    
  12.     //alert(cssType + " " + SGSFlair.user + " " + SGSFlair.modHash);
  13.    
  14.     $(SGSFlair.loadingImage).css("display", "inline-block");
  15.     // SGSFlair.textbox.disabled = true;
  16.     $.ajax({
  17.       type: "POST",
  18.       url: "http://www.reddit.com/api/flair",
  19.       data: {
  20.         css_class: cssType,
  21.         id: "#4xc05",
  22.         text: theTitle,
  23.         name: SGSFlair.user,
  24.         r: SGSFlair.config.thisSub,
  25.         renderstyle: "html",
  26.         uh: SGSFlair.modHash
  27.       },
Add Comment
Please, Sign In to add comment