Greasy Fork is available in English.

DeviantArt Friend List Helper

Allows better management of users in dA friend lists.

  1. // ==UserScript==
  2. // @id dAFriendListHelper
  3. // @name DeviantArt Friend List Helper
  4. // @version 1.1
  5. // @namespace http://www.puramaldad.com/dAFLH
  6. // @author Willy Galleta
  7. // @description Allows better management of users in dA friend lists.
  8. // @match *.deviantart.com/deviants/*
  9. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
  10. // @run-at document-end
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. // var $ = unsafeWindow.jQuery,holder,query,offset,fPage,pPage.lPage;
  15. function addClicks()
  16. {
  17. $("body").append('<style>table.zebra tr:hover{background-color: rgb(231,213,255)} .friend-selected{background-color:rgb(250,200,250) !important}</style>');
  18. var selectFriend = function() {
  19. var e;
  20. var checks = [$(),
  21. $("#friend_attr_friend"),
  22. $("#friend_attr_deviations"),
  23. $("#friend_attr_journals"),
  24. $("#friend_attr_forums"),
  25. $("#friend_attr_critiques"),
  26. $("#friend_attr_scr"+"aps")];
  27. $("#username").val($(this).find(".u").text());
  28. for(i in checks)
  29. {
  30. if($(this).find("td").eq(i).find(".checkbox").hasClass("checked"))
  31. {
  32. e = true;
  33. } else {
  34. e = false;
  35. }
  36. checks[i].attr("checked",e);
  37. };
  38. $(".friend").removeClass("friend-selected");
  39. $(this).addClass("friend-selected");
  40. }
  41. $(".friend").click(selectFriend);
  42. $("#add-deviant form").submit(function()
  43. {
  44. $.post($(this).attr("action"), $(this).serialize(), function() {alert("Actualizado.")});
  45. return false;
  46. });
  47. $("#deviantspager a").click(function()
  48. {
  49. $(".friends").unbind("click", selectFriend);
  50. setTimeout(checkFriends, 500);
  51. });
  52. }
  53. function checkFriends()
  54. {
  55. if($(".friend").length>1)
  56. {
  57. addClicks();
  58. } else {
  59. setTimeout(checkFriends, 200);
  60. }
  61. }
  62. $(function()
  63. {
  64. checkFriends();
  65. });