Search tool

Search tool for Steamgifts.

  1. // ==UserScript==
  2. // @name Search tool
  3. // @description Search tool for Steamgifts.
  4. // @version 0.4.1
  5. // @author otro_user_gil
  6. // @exclude http://www.steamgifts.com/giveaways/new
  7. // @exclude http://*.steamgifts.com/giveaways/new
  8. // @exclude http://steamgifts.com/giveaways/new
  9. // @exclude http://www.steamgifts.com/giveaways/created
  10. // @exclude http://*.steamgifts.com/giveaways/created
  11. // @exclude http://steamgifts.com/giveaways/created
  12. // @exclude http://www.steamgifts.com/giveaways/entered
  13. // @exclude http://*.steamgifts.com/giveaways/entered
  14. // @exclude http://steamgifts.com/giveaways/entered
  15. // @exclude http://www.steamgifts.com/giveaways/won
  16. // @exclude http://*.steamgifts.com/giveaways/won
  17. // @exclude http://steamgifts.com/giveaways/won
  18. // @include http://www.steamgifts.com/
  19. // @include https://steamgifts.com/
  20. // @include http://*.steamgifts.com/
  21. // @include https://*.steamgifts.com/
  22. // @include http://www.steamgifts.com/giveaway/*
  23. // @include https://steamgifts.com/giveaway/*
  24. // @include http://*.steamgifts.com/giveaway/*
  25. // @include https://*.steamgifts.com/giveaway/*
  26. // @include http://www.steamgifts.com/giveaways/*
  27. // @include https://steamgifts.com/giveaways/*
  28. // @include http://*.steamgifts.com/giveaways/*
  29. // @include https://*.steamgifts.com/giveaways/*
  30. // @require http://code.jquery.com/jquery-2.1.4.min.js
  31. // @grant none
  32. // @namespace https://gf.qytechs.cn/users/15121
  33. // ==/UserScript==
  34.  
  35. $("<hr><div style=\"position: relative;\"><span>Level Min: </span><select id=\"level_min\" style=\"width: 90px;\"><option>None</option><option>0</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option></select> <span> Level Max: </span><select id=\"level_max\" style=\"width: 90px;\"><option>None</option><option>0</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option></select><br><br><span> Min Entries: </span><input type=\"number\" style=\"width: 60px;\" id=\"min_entries\" min=\"0\"><span> Max Entries: </span><input type=\"number\" style=\"width: 60px;\" min=\"0\" id=\"max_entries\"><br><br><center><span>Wishlist: </span><br> <input type=\"checkbox\" title=\"Wishlist\" id=\"wishlist\"><br><span style=\"margin: 0; text-align: center;\">Group: </span><br><input title=\"Group\" type=\"checkbox\" id=\"group\"><br><span style=\"margin: 0; text-align: center;\">New: </span><br><input title=\"New\" type=\"checkbox\" id=\"new\"></center><br><input type=\"button\" style=\"cursor: pointer; width: 150px;\" value=\"Search Giveaway \" id=\"giveawaysearch\"></div><hr>").insertAfter(".sidebar__mpu");
  36. $("#giveawaysearch").click(function(){
  37. var url;
  38. var search_text;
  39. var min_entries;
  40. var max_entries;
  41. var min_level;
  42. var max_level;
  43. var wishlist;
  44. var group;
  45. var recent;
  46. function ga() {
  47. search_text = document.getElementsByName("search-query")[0].value;
  48. if (search_text == "Search...") {
  49. search_text = "";
  50. }
  51. min_entries = parseInt(document.getElementById("min_entries").value);
  52. max_entries = parseInt(document.getElementById("max_entries").value);
  53. min_level = document.getElementById("level_min").value;
  54. max_level = document.getElementById("level_max").value;
  55. wishlist = document.getElementById("wishlist");
  56. group = document.getElementById("group");
  57. recent = document.getElementById("new");
  58. if (min_entries > max_entries) {
  59. alert("Min Entries Cannot be higher than Max Entries.");
  60. } else if (min_level != "None" && max_level != "None" && min_level > max_level) {
  61. alert("Min Level Cannot be higher than Max Level");
  62. } else if (group.checked && wishlist.checked || group.checked && recent.checked || wishlist.checked && recent.checked || group.checked && wishlist.checked && recent.checked ) {
  63. alert("Multiple buttons Cannot be selected at the same time.");
  64. } else {
  65. if (search_text === "") {
  66. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  67. if (!isNaN(min_entries)&& isNaN(max_entries)) {
  68. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries;
  69. location.href = url;
  70. }
  71. if (isNaN(min_entries)&& !isNaN(max_entries)) {
  72. url = "http://www.steamgifts.com/giveaways/search?entry_max=" + max_entries;
  73. location.href = url;
  74. }
  75. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  76. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries + "&entry_max=" + max_entries;
  77. location.href = url;
  78. }
  79. } else {
  80. if (min_level == "None" && max_level == "None") {
  81. url = "http://www.steamgifts.com/giveaways/search?";
  82. location.href = url;
  83. }
  84. if (max_level == "None" && min_level != "None") {
  85. url = "http://www.steamgifts.com/giveaways/search?level_min=" + min_level;
  86. location.href = url;
  87. }
  88. if (max_level != "None" && min_level == "None") {
  89. url = "http://www.steamgifts.com/giveaways/search?level_max=" + max_level;
  90. location.href = url;
  91. }
  92. if (max_level != "None" && min_level != "None") {
  93. url = "http://www.steamgifts.com/giveaways/search?level_min=" + min_level + "&level_max=" + max_level;
  94. location.href = url;
  95. }
  96. }
  97. if (!isNaN(min_entries) && min_level != "None") {
  98. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries + "&level_min=" + min_level;
  99. location.href = url;
  100. }
  101. if (!isNaN(min_entries) && max_level != "None") {
  102. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries + "&level_max=" + max_level;
  103. location.href = url;
  104. }
  105. if (!isNaN(max_entries) && min_level != "None") {
  106. url = "http://www.steamgifts.com/giveaways/search?entry_max=" + max_entries + "&level_min=" + min_level;
  107. location.href = url;
  108. }
  109. if (!isNaN(max_entries) && max_level != "None") {
  110. url = "http://www.steamgifts.com/giveaways/search?entry_max=" + max_entries + "&level_max=" + max_level;
  111. location.href = url;
  112. }
  113. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  114. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level;
  115. location.href = url;
  116. }
  117. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  118. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level;
  119. location.href = url;
  120. }
  121. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  122. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  123. location.href = url;
  124. }
  125. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  126. url = "http://www.steamgifts.com/giveaways/search?entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  127. location.href = url;
  128. }
  129. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  130. url = "http://www.steamgifts.com/giveaways/search?entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  131. location.href = url;
  132. }
  133. } else if (search_text !== "") {
  134. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  135. if (!isNaN(min_entries) && isNaN(max_entries)) {
  136. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries;
  137. location.href = url;
  138. }
  139. if (isNaN(min_entries) && !isNaN(max_entries)) {
  140. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries;
  141. location.href = url;
  142. }
  143. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  144. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries;
  145. location.href = url;
  146. }
  147. } else {
  148. if (min_level == "None" && max_level == "None") {
  149. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text);
  150. location.href = url;
  151. }
  152. if (max_level == "None" && min_level != "None") {
  153. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level;
  154. location.href = url;
  155. }
  156. if (max_level != "None" && min_level == "None") {
  157. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_max=" + max_level;
  158. location.href = url;
  159. }
  160. if (max_level != "None" && min_level != "None") {
  161. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level + "&level_max=" + max_level;
  162. location.href = url;
  163. }
  164. }
  165. if (!isNaN(min_entries) && min_level != "None") {
  166. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level;
  167. location.href = url;
  168. }
  169. if (!isNaN(min_entries) && max_level != "None") {
  170. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_max=" + max_level;
  171. location.href = url;
  172. }
  173. if (!isNaN(max_entries) && min_level != "None") {
  174. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_min=" + min_level;
  175. location.href = url;
  176. }
  177. if (!isNaN(max_entries) && max_level != "None") {
  178. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_max=" + max_level;
  179. location.href = url;
  180. }
  181. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  182. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level;
  183. location.href = url;
  184. }
  185. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  186. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level;
  187. location.href = url;
  188. }
  189. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  190. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  191. location.href = url;
  192. }
  193. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  194. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  195. location.href = url;
  196. }
  197. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  198. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  199. location.href = url;
  200. }
  201. }
  202. if (wishlist.checked) {
  203. if (search_text === "") {
  204. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  205. if (!isNaN(min_entries) && isNaN(max_entries)) {
  206. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries;
  207. location.href = url;
  208. }
  209. if (isNaN(min_entries) && !isNaN(max_entries)) {
  210. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_max=" + max_entries;
  211. location.href = url;
  212. }
  213. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  214. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries + "&entry_max=" + max_entries;
  215. location.href = url;
  216. }
  217. } else {
  218. if (min_level == "None" && max_level == "None") {
  219. url = "http://www.steamgifts.com/giveaways/search?type=wishlist";
  220. location.href = url;
  221. }
  222. if (max_level == "None" && min_level != "None") {
  223. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&level_min=" + min_level;
  224. location.href = url;
  225. }
  226. if (max_level != "None" && min_level == "None") {
  227. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&level_max=" + max_level;
  228. location.href = url;
  229. }
  230. if (max_level != "None" && min_level != "None") {
  231. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&level_min=" + min_level + "&level_max=" + max_level;
  232. location.href = url;
  233. }
  234. }
  235. if (!isNaN(min_entries) && min_level != "None") {
  236. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries + "&level_min=" + min_level;
  237. location.href = url;
  238. }
  239. if (!isNaN(min_entries) && max_level != "None") {
  240. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries + "&level_max=" + max_level;
  241. location.href = url;
  242. }
  243. if (!isNaN(max_entries) && min_level != "None") {
  244. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_max=" + max_entries + "&level_min=" + min_level;
  245. location.href = url;
  246. }
  247. if (!isNaN(max_entries) && max_level != "None") {
  248. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + max_entries + "&level_max=" + max_level;
  249. location.href = url;
  250. }
  251. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  252. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level;
  253. location.href = url;
  254. }
  255. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  256. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level;
  257. location.href = url;
  258. }
  259. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  260. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  261. location.href = url;
  262. }
  263. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  264. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  265. location.href = url;
  266. }
  267. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  268. url = "http://www.steamgifts.com/giveaways/search?type=wishlist&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  269. location.href = url;
  270. }
  271. } else if (search_text !== "") {
  272. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  273. if (!isNaN(min_entries) && isNaN(max_entries)) {
  274. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&type=wishlist";
  275. location.href = url;
  276. }
  277. if (isNaN(min_entries) && !isNaN(max_entries)) {
  278. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries + "&type=wishlist";
  279. location.href = url;
  280. }
  281. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  282. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&type=wishlist";
  283. location.href = url;
  284. }
  285. } else {
  286. if (min_level == "None" && max_level == "None") {
  287. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&type=wishlist";
  288. location.href = url;
  289. }
  290. if (max_level == "None" && min_level != "None") {
  291. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level + "&type=wishlist";
  292. location.href = url;
  293. }
  294. if (max_level != "None" && min_level == "None") {
  295. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_max=" + max_level + "&type=wishlist";
  296. location.href = url;
  297. }
  298. if (max_level != "None" && min_level != "None") {
  299. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level + "&level_max=" + max_level + "&type=wishlist";
  300. location.href = url;
  301. }
  302. }
  303. if (!isNaN(min_entries) && min_level != "None") {
  304. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level + "&type=wishlist";
  305. location.href = url;
  306. }
  307. if (!isNaN(min_entries) && max_level != "None") {
  308. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_max=" + max_level + "&type=wishlist";
  309. location.href = url;
  310. }
  311. if (!isNaN(max_entries) && min_level != "None") {
  312. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_min=" + min_level + "&type=wishlist";
  313. location.href = url;
  314. }
  315. if (!isNaN(max_entries) && max_level != "None") {
  316. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_max=" + max_level + "&type=wishlist";
  317. location.href = url;
  318. }
  319. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  320. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&type=wishlist";
  321. location.href = url;
  322. }
  323. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  324. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level + "&type=wishlist";
  325. location.href = url;
  326. }
  327. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  328. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=wishlist";
  329. location.href = url;
  330. }
  331. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  332. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=wishlist";
  333. location.href = url;
  334. }
  335. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  336. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=wishlist";
  337. location.href = url;
  338. }
  339. }
  340. }
  341. if (group.checked) {
  342. if (search_text === "") {
  343. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  344. if (!isNaN(min_entries) && isNaN(max_entries)) {
  345. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries;
  346. location.href = url;
  347. }
  348. if (isNaN(min_entries) && !isNaN(max_entries)) {
  349. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_max=" + max_entries;
  350. location.href = url;
  351. }
  352. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  353. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries + "&entry_max=" + max_entries;
  354. location.href = url;
  355. }
  356. } else {
  357. if (min_level == "None" && max_level == "None") {
  358. url = "http://www.steamgifts.com/giveaways/search?type=group";
  359. location.href = url;
  360. }
  361. if (max_level == "None" && min_level != "None") {
  362. url = "http://www.steamgifts.com/giveaways/search?type=group&level_min=" + min_level;
  363. location.href = url;
  364. }
  365. if (max_level != "None" && min_level == "None") {
  366. url = "http://www.steamgifts.com/giveaways/search?type=group&level_max=" + max_level;
  367. location.href = url;
  368. }
  369. if (max_level != "None" && min_level != "None") {
  370. url = "http://www.steamgifts.com/giveaways/search?type=group&level_min=" + min_level + "&level_max=" + max_level;
  371. location.href = url;
  372. }
  373. }
  374. if (!isNaN(min_entries) && min_level != "None") {
  375. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries + "&level_min=" + min_level;
  376. location.href = url;
  377. }
  378. if (!isNaN(min_entries) && max_level != "None") {
  379. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries + "&level_max=" + max_level;
  380. location.href = url;
  381. }
  382. if (!isNaN(max_entries) && min_level != "None") {
  383. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_max=" + max_entries + "&level_min=" + min_level;
  384. location.href = url;
  385. }
  386. if (!isNaN(max_entries) && max_level != "None") {
  387. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + max_entries + "&level_max=" + max_level;
  388. location.href = url;
  389. }
  390. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  391. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level;
  392. location.href = url;
  393. }
  394. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  395. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level;
  396. location.href = url;
  397. }
  398. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  399. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  400. location.href = url;
  401. }
  402. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  403. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  404. location.href = url;
  405. }
  406. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  407. url = "http://www.steamgifts.com/giveaways/search?type=group&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  408. location.href = url;
  409. }
  410. } else if (search_text != "") {
  411. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  412. if (!isNaN(min_entries) && isNaN(max_entries)) {
  413. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&type=group";
  414. location.href = url;
  415. }
  416. if (isNaN(min_entries) && !isNaN(max_entries)) {
  417. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries + "&type=group";
  418. location.href = url;
  419. }
  420. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  421. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&type=group";
  422. location.href = url;
  423. }
  424. } else {
  425. if (min_level == "None" && max_level == "None") {
  426. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text);
  427. location.href = url;
  428. }
  429. if (max_level == "None" && min_level != "None") {
  430. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level + "&type=group";
  431. location.href = url;
  432. }
  433. if (max_level != "None" && min_level == "None") {
  434. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_max=" + max_level + "&type=group";
  435. location.href = url;
  436. }
  437. if (max_level != "None" && min_level != "None") {
  438. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level + "&level_max=" + max_level + "&type=group";
  439. location.href = url;
  440. }
  441. }
  442. if (!isNaN(min_entries) && min_level != "None") {
  443. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level + "&type=group";
  444. location.href = url;
  445. }
  446. if (!isNaN(min_entries) && max_level != "None") {
  447. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_max=" + max_level + "&type=group";
  448. location.href = url;
  449. }
  450. if (!isNaN(max_entries) && min_level != "None") {
  451. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_min=" + min_level + "&type=group";
  452. location.href = url;
  453. }
  454. if (!isNaN(max_entries) && max_level != "None") {
  455. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_max=" + max_level + "&type=group";
  456. location.href = url;
  457. }
  458. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  459. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&type=group";
  460. location.href = url;
  461. }
  462. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  463. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level + "&type=group";
  464. location.href = url;
  465. }
  466. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  467. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=group";
  468. location.href = url;
  469. }
  470. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  471. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=group";
  472. location.href = url;
  473. }
  474. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  475. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=group";
  476. location.href = url;
  477. }
  478. }
  479. }//fin group
  480. if (recent.checked) {
  481. if (search_text == "") {
  482. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  483. if (!isNaN(min_entries) && isNaN(max_entries)) {
  484. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries;
  485. location.href = url;
  486. }
  487. if (isNaN(min_entries) && !isNaN(max_entries)) {
  488. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_max=" + max_entries;
  489. location.href = url;
  490. }
  491. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  492. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries + "&entry_max=" + max_entries;
  493. location.href = url;
  494. }
  495. } else {
  496. if (min_level == "None" && max_level == "None") {
  497. url = "http://www.steamgifts.com/giveaways/search?type=new";
  498. location.href = url;
  499. }
  500. if (max_level == "None" && min_level != "None") {
  501. url = "http://www.steamgifts.com/giveaways/search?type=new&level_min=" + min_level;
  502. location.href = url;
  503. }
  504. if (max_level != "None" && min_level == "None") {
  505. url = "http://www.steamgifts.com/giveaways/search?type=new&level_max=" + max_level;
  506. location.href = url;
  507. }
  508. if (max_level != "None" && min_level != "None") {
  509. url = "http://www.steamgifts.com/giveaways/search?type=new&level_min=" + min_level + "&level_max=" + max_level;
  510. location.href = url;
  511. }
  512. }
  513. if (!isNaN(min_entries) && min_level != "None") {
  514. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries + "&level_min=" + min_level;
  515. location.href = url;
  516. }
  517. if (!isNaN(min_entries) && max_level != "None") {
  518. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries + "&level_max=" + max_level;
  519. location.href = url;
  520. }
  521. if (!isNaN(max_entries) && min_level != "None") {
  522. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_max=" + max_entries + "&level_min=" + min_level;
  523. location.href = url;
  524. }
  525. if (!isNaN(max_entries) && max_level != "None") {
  526. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + max_entries + "&level_max=" + max_level;
  527. location.href = url;
  528. }
  529. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  530. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level;
  531. location.href = url;
  532. }
  533. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  534. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level;
  535. location.href = url;
  536. }
  537. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  538. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  539. location.href = url;
  540. }
  541. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  542. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  543. location.href = url;
  544. }
  545. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  546. url = "http://www.steamgifts.com/giveaways/search?type=new&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level;
  547. location.href = url;
  548. }
  549. } else if (search_text != "") {
  550. if (!isNaN(min_entries) || !isNaN(max_entries)) {
  551. if (!isNaN(min_entries) && isNaN(max_entries)) {
  552. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&type=new";
  553. location.href = url;
  554. }
  555. if (isNaN(min_entries) && !isNaN(max_entries)) {
  556. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries + "&type=new";
  557. location.href = url;
  558. }
  559. if (!isNaN(min_entries) && !isNaN(max_entries)) {
  560. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&type=new";
  561. location.href = url;
  562. }
  563. } else {
  564. if (min_level == "None" && max_level == "None") {
  565. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text);
  566. location.href = url;
  567. }
  568. if (max_level == "None" && min_level != "None") {
  569. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level + "&type=new";
  570. location.href = url;
  571. }
  572. if (max_level != "None" && min_level == "None") {
  573. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_max=" + max_level + "&type=new";
  574. location.href = url;
  575. }
  576. if (max_level != "None" && min_level != "None") {
  577. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&level_min=" + min_level + "&level_max=" + max_level + "&type=new";
  578. location.href = url;
  579. }
  580. }
  581. if (!isNaN(min_entries) && min_level != "None") {
  582. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level + "&type=new";
  583. location.href = url;
  584. }
  585. if (!isNaN(min_entries) && max_level != "None") {
  586. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_max=" + max_level + "&type=new";
  587. location.href = url;
  588. }
  589. if (!isNaN(max_entries) && min_level != "None") {
  590. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_min=" + min_level + "&type=new";
  591. location.href = url;
  592. }
  593. if (!isNaN(max_entries) && max_level != "None") {
  594. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + max_entries + "&level_max=" + max_level + "&type=new";
  595. location.href = url;
  596. }
  597. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None") {
  598. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&type=new";
  599. location.href = url;
  600. }
  601. if (!isNaN(max_entries) && !isNaN(min_entries) && max_level != "None") {
  602. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_max=" + max_level + "&type=new";
  603. location.href = url;
  604. }
  605. if (!isNaN(max_entries) && !isNaN(min_entries) && min_level != "None" && max_level != "None") {
  606. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=new";
  607. location.href = url;
  608. }
  609. if (!isNaN(min_entries) && max_level != "None" && min_level != "None") {
  610. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_min=" + min_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=new";
  611. location.href = url;
  612. }
  613. if (!isNaN(max_entries) && max_level != "None" && min_level != "None") {
  614. url = "http://www.steamgifts.com/giveaways/search?q=" + escape(search_text) + "&entry_max=" + max_entries + "&level_min=" + min_level + "&level_max=" + max_level + "&type=new";
  615. location.href = url;
  616. }
  617. }
  618. }
  619. }
  620. }
  621. ga();
  622. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址