Skip a Listing of the Dates

on a list page of the urls on Internet Archive

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name            Skip a Listing of the Dates
// @name:ja         日付選択ページを飛ばす
// @namespace       https://greatest.deepsurf.us/users/19523
// @description     on a list page of the urls on Internet Archive
// @description:ja  インターネットアーカイブでURLのワイルドカード検索で出た一覧から選択すると直接そのページへアクセスできる
// @include         http://web.archive.org/web/*/*
// @include         https://web.archive.org/web/*/*
// @version         0.1.3
// @grant           none
// ==/UserScript==


  if (location.href.slice(-1) !== '*') {
    return;
  }

  var phrases = location.pathname.split('/');
  if (phrases[2].indexOf('*') < 0) {
    return;
  }

  var observer = new MutationObserver(function (mutations) {
    var aElements = document.querySelectorAll('#resultsUrl_wrapper td.url > a');
    for (var i = 0, a; a = aElements[i]; i++) {
      var names = a.pathname.split('/');
      names[2] = '99999999999999';
      a.pathname = names.join('/');
    }
  });

  observer.observe(document.getElementById('resultsUrl').getElementsByTagName('tbody')[0], { childList: true });