archive.org - Streamable-only games repositories

Detects and redirects to the source repositories of streamable-only games from archive.org collection

  1. // ==UserScript==
  2. // @name archive.org - Streamable-only games repositories
  3. // @namespace https://archive.org/details/stream_only?and[]=mediatype%3A%22software%22
  4. // @description Detects and redirects to the source repositories of streamable-only games from archive.org collection
  5. // @icon http://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Internet_Archive_logo_and_wordmark.png/240px-Internet_Archive_logo_and_wordmark.png
  6. // @author ner0
  7. // @copyright 2021, ner0 (https://openuserjs.org/users/ner0)
  8. // @license MIT
  9. // @version 0.1
  10. // @supportURL https://openuserjs.org/scripts/ner0/archive.org_-_Streamable-only_games_repositories/issues
  11. // @grant none
  12. // @require https://code.jquery.com/jquery-1.10.2.min.js
  13. //
  14. // @include *://archive.org/details/*
  15. // ==/UserScript==
  16.  
  17. if (window.location.href.indexOf(document.domain + "/details/") > -1) {
  18. var links = document.getElementsByTagName("a");
  19. for (var i=0; i<links.length; i++) {
  20. var link = "" + links[i];
  21. if (link.indexOf("stream") != -1) {
  22. var scripts = document.querySelectorAll("script");
  23. for (var i = 0; i < scripts.length; i++) {
  24. var emuLoader = "" + scripts[i].text;
  25. if (emuLoader.indexOf("AJS.emulate_setup") != -1) {
  26. emuLoader = emuLoader.substring(emuLoader.indexOf("\/"));
  27. emuLoader = emuLoader.replace("\\", "");
  28. emuLoader = emuLoader.substring(0, emuLoader.indexOf("?"));
  29.  
  30. var response = "";
  31. $.ajax({
  32. type: "GET",
  33. url: "https://" + document.domain + emuLoader,
  34. async: false,
  35. success: function (text) {
  36. response = text;
  37. response = response.substring(response.indexOf("https"));
  38. response = response.substring(0, response.indexOf(")"));
  39. /*
  40. console.log("Download repository: " + response);
  41. window.open(response, "_blank");
  42. */
  43. if (confirm("Browse this game's repository?")) {
  44. window.location.href = response;
  45. }
  46. }
  47. });
  48. break;
  49. }
  50. }
  51. break;
  52. }
  53. }
  54. }

QingJ © 2025

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