Steam Skipper

当前为 2018-12-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @version 0.0.1
  3. // @description:zh-cn 跳过steam队列中无法浏览的项目
  4. // @name Steam Skipper
  5. // @namespace Violentmonkey Scripts
  6. // @match https://store.steampowered.com/*
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. function do_skip(){
  11. var should_skip = confirm("您要跳过这个不能浏览的项目吗?");
  12. var url = window.location.href;
  13. var splited = url.split("/");
  14. var app_id = splited[splited.length - 2];
  15. jQuery.post("/app/7", { sessionid: g_sessionID, appid_to_clear_from_queue: app_id });
  16. window.location.href = "https://store.steampowered.com/explore/";
  17. }
  18.  
  19. function check_element() {
  20. var title = document.title;
  21. if (title !== "站点错误") {
  22. return
  23. }
  24. var element = jQuery(".error");
  25. if (element.text().include("不允许")) {
  26. do_skip();
  27. }
  28. }
  29.  
  30. function main(){
  31. check_element();
  32. }
  33.  
  34. main();