Guzik

jsfoidfsdgs

  1. // ==UserScript==
  2. // @name Guzik
  3. // @namespace http://mongla.net
  4. // @version 1.3
  5. // @description jsfoidfsdgs
  6. // @include http://www.ufs.pt/forum/showthread.php*
  7. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. var css = "\n.wheatButton { vertical-align: top; display: inline-block; padding: 5px 6px 4px; background-color: #FFA502; color: black!important; text-decoration: none!important; border-radius: 4px; font-weight: bold; cursor: pointer; }\n}";
  12. if (typeof GM_addStyle != "undefined") {
  13. GM_addStyle(css);
  14. } else if (typeof PRO_addStyle != "undefined") {
  15. PRO_addStyle(css);
  16. } else if (typeof addStyle != "undefined") {
  17. addStyle(css);
  18. } else {
  19. var heads = document.getElementsByTagName("head");
  20. if (heads.length > 0) {
  21. var node = document.createElement("style");
  22. node.type = "text/css";
  23. node.appendChild(document.createTextNode(css));
  24. heads[0].appendChild(node);
  25. }
  26. }
  27. })();
  28.  
  29.  
  30. $(document).ready(function ()
  31. {
  32. $("<a>",
  33. {
  34. "class": "wheatButton",
  35. text: "Edytuj Pierwszy",
  36. "id": "PostTwo",
  37. value: "up",
  38. type: "button",
  39. style: "position: fixed; top: 10px; right: 85px;"
  40. }).appendTo("body");
  41. $("<a>",
  42. {
  43. "class": "wheatButton",
  44. text: "Sprawdzam",
  45. "id": "sprawdzam",
  46. value: "up",
  47. type: "button",
  48. style: "position: fixed; top: 40px; right: 85px;"
  49. }).appendTo("body");
  50. $("<a>",
  51. {
  52. "class": "wheatButton",
  53. text: "Zatwierdź",
  54. "id": "zatwierdz",
  55. value: "up",
  56. type: "button",
  57. style: "position: fixed; top: 70px; right: 85px;"
  58. }).appendTo("body");
  59. $("<a>",
  60. {
  61. "class": "wheatButton",
  62. text: "Niezatwierdzony",
  63. "id": "niet",
  64. value: "up",
  65. type: "button",
  66. style: "position: fixed; top: 100px; right: 85px;"
  67. }).appendTo("body");
  68. $("<a>",
  69. {
  70. "class": "wheatButton",
  71. text: "Usuń 2 Post",
  72. "id": "stamp",
  73. value: "up",
  74. type: "button",
  75. style: "position: fixed; top: 130px; right: 85px;"
  76. }).appendTo("body");
  77. $("<a>",
  78. {
  79. "class": "wheatButton",
  80. text: "Przenieś",
  81. "id": "teleport",
  82. value: "up",
  83. type: "button",
  84. style: "position: fixed; top: 160px; right: 85px;"
  85. }).appendTo("body");
  86. $("<a>",
  87. {
  88. "class": "wheatButton",
  89. text: "Dodaj Hide",
  90. "id": "addHide",
  91. value: "up",
  92. type: "button",
  93. style: "position: fixed; top: 190px; right: 85px;"
  94. }).appendTo("body");
  95.  
  96. $('#PostTwo').click(function() {
  97. testy();
  98. });
  99. $('#sprawdzam').click(function() {
  100. sprawdzam();
  101. }); $('#zatwierdz').click(function() {
  102. zatwierdz();
  103. }); $('#niet').click(function() {
  104. niet();
  105. }); $('#stamp').click(function() {
  106. stamp();
  107. });
  108. $('#teleport').click(function() {
  109. teleport();
  110. });
  111. $('#czer').click(function() {
  112. czer();
  113. });
  114. $('#addHide').click(function() {
  115. addHide();
  116. });
  117. function testy() {
  118. postie = $(".editpost").first().attr("href");
  119. window.location.href = postie;
  120. }
  121. function sprawdzam(){
  122. $('.cke_enable_context_menu').last().val('Pacze/moje cyferkicyferkicyferki ' + $("#posts li:first-child").first().attr("id"));
  123. $('#qr_submit').click()
  124. }
  125. function addHide(){
  126. $(".editpost").first().click()
  127. setTimeout(
  128. function()
  129. {
  130. $('.cke_enable_context_menu').first().val(
  131. function(i,val){
  132. return '[hide] ' + val;
  133. });
  134. $('.cke_enable_context_menu').first().val(
  135. function(i,val){
  136. return val + '[/hide]';
  137. });
  138. $("input[value='Zapisz']").first().click()
  139. }, 2000);
  140. }
  141. function czer(){
  142. $('.cke_enable_context_menu').last().val('[center][img]http://www.ufs.pt/grafika/niezatwierdzone.png[/img][/center]')
  143. $('#qr_submit').click()
  144. }
  145. function zatwierdz(){
  146. if($(".editpost").length==1) {
  147. sprawdzam();
  148. setTimeout(function() { zatwierdz(); }, 2000);
  149. } else {
  150. $(".editpost").last().click()
  151. setTimeout(
  152. function()
  153. {
  154. $('.cke_enable_context_menu').first().val('[center][img]http://www.ufs.pt/grafika/zatwierdzone.png[/img][/center]')
  155. $("input[value='Zapisz']").first().click()
  156. }, 2000);
  157. }
  158. }
  159. function niet(){
  160. if($(".editpost").length==1) {
  161. sprawdzam();
  162. setTimeout(function() { niet(); }, 2000);
  163. } else {
  164. $(".editpost").last().click()
  165. setTimeout(
  166. function()
  167. {
  168. $('.cke_enable_context_menu').first().val('[center][img]http://www.ufs.pt/grafika/niezatwierdzone.png[/img][/center]')
  169. $("input[value='Zapisz']").first().click()
  170. }, 2000);
  171. }
  172. }
  173. function stamp(){
  174. $(".editpost:eq(1)").last().click()
  175. setTimeout(
  176. function()
  177. {
  178. $("input[value='Usuń']").first().click()
  179. $("input[name='deletepost']").first().click()
  180. $("input[value='Usuń posta']").first().click()
  181. }, 2000);
  182. }
  183. function teleport(){
  184. $("a[class='popupctrl']").first().click()
  185. $("input[value='movethread']").first().click()
  186. $("input[value='Dalej']").first().click()
  187. }
  188.  
  189. })