Skip a Listing of the Dates

on a list page of the urls on Internet Archive

当前为 2019-06-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Skip a Listing of the Dates
  3. // @name:ja 日付選択ページを飛ばす
  4. // @namespace https://gf.qytechs.cn/users/19523
  5. // @description on a list page of the urls on Internet Archive
  6. // @description:ja インターネットアーカイブでURLのワイルドカード検索で出た一覧から選択すると直接そのページへアクセスできる
  7. // @include http://web.archive.org/web/*/*
  8. // @include https://web.archive.org/web/*/*
  9. // @version 0.1.2
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13.  
  14. document.addEventListener('DOMContentLoaded', function () {
  15. if (location.href.slice(-1) !== '*') {
  16. return;
  17. }
  18.  
  19. var phrases = location.pathname.split('/');
  20. if (phrases[2].indexOf('*') < 0) {
  21. return;
  22. }
  23.  
  24. var observer = new MutationObserver(function (mutations) {
  25. var aElements = document.querySelectorAll('#resultsUrl_wrapper td.url > a');
  26. for (var i = 0, a; a = aElements[i]; i++) {
  27. var names = a.pathname.split('/');
  28. names[2] = '99999999999999';
  29. a.pathname = names.join('/');
  30. }
  31. });
  32.  
  33. observer.observe(document.getElementById('resultsUrl').getElementsByTagName('tbody')[0], { childList: true });
  34. });

QingJ © 2025

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