MCPcopy Index your code
hub / github.com/cipher387/quickcacheandarchivesearch / buttonOpen

Function buttonOpen

script.js:10–65  ·  view source on GitHub ↗
(buttonValue)

Source from the content-addressed store, hash-verified

8 return !!pattern.test(str);
9 }
10 function buttonOpen(buttonValue)
11 {
12
13 userURL=document.getElementById("url").value;
14
15 if(validURL(userURL)==false)
16 {
17 alert("Enter a valid URL, please");
18
19 }
20 else
21 {
22
23 const links = [];
24 links["GoogleCache"]="https://google.com/search?q=";
25 links["YandexCache"]="https://yandex.ru/search/?text=";
26 links["BingCache"]="https://www.bing.com/search?q=";
27 links["WebArchive"]="https://web.archive.org/web/";
28 links["ArchiveIS"]="http://archive.is/newest/";
29 links["WebCitation"]="https://www.webcitation.org/query?url=";
30 links["WikiWix"]="http://archive.wikiwix.com/cache/index2.php?url=";
31 links["Exalead"]="https://www.exalead.com/search/web/results/?q=";
32 links["Gigablast"]="https://www.gigablast.com/search?q=url:";
33 links["Sogou"]="https://www.sogou.com/web?query=";
34 links["365"]="https://www.so.com/s?ie=utf-8&fr=none&src=home_www&q=";
35 links["Baidu"]="https://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&tn=baidu&wd=";
36 links["Naver"]="https://search.naver.com/search.naver?where=webkr&query=";
37 links["Yahoo"]="https://search.yahoo.com/search?ei=UTF-8&p=";
38 links["Megalodon"]="https://megalodon.jp/?url=";
39 links["Mailru"]="https://go.mail.ru/search?q=";
40 links["UKWA"]="https://www.webarchive.org.uk/en/ukwa/search?text=";
41 links["Arquivopt"]="https://arquivo.pt/page/search?hitsPerPage=10&query=";
42 links["Locarchive"]="https://webarchive.loc.gov/all/19960101000000-20200606235959*/";
43 links["Stanfordarchive"]="https://swap.stanford.edu/*/";
44 links["Versafn"]="https://vefsafn.is/?page=wayback-results&site=";
45 links["Archiveit"] = "https://archive-it.org/explore?q=";
46 links["Hawnskhr"] = "https://haw.nsk.hr/wayback/*/";
47 links["Arhivnuk"] = "http://arhiv.nuk.uni-lj.si/?q=";
48 links["Nationalukarchive"] = "https://webarchive.nationalarchives.gov.uk/search/result/?q=";
49 links["Singaporearchive"] = "https://eresources.nlb.gov.sg/webarchives/search-result/";
50 links["Trovearchive"] = "https://trove.nla.gov.au/search/category/websites?keyword=";
51 links["Unchrarchive"] = "https://webarchive.archive.unhcr.org/search/results?q=";
52 links["Estonianarchive"] = "https://veebiarhiiv.digar.ee/a/*/";
53 links["Pronigovarchive"] = "https://webarchive.proni.gov.uk/#!/search?query=";
54 links["Unescoarchive"] = "https://webarchive.unesco.org/#!/search?query=";
55 links["Endofterm"] = "http://eotarchive.cdlib.org/search?keyword=";
56 links["Czechwebarchive"] = "https://wayback.webarchiv.cz/wayback/*/";
57 links["FinnishWebArchive"] = "https://verkkoarkisto.kansalliskirjasto.fi/va/index.php/search?view=frontpage&material_type=website_word&query=";
58 links["EuExithWebArchive"] = "https://webarchive.nationalarchives.gov.uk/eu-exit/results/?title=";
59 links["AUEBWebArchive"] = "http://archive.aueb.gr/?query=";
60 links["CataloniaWebArchive"] = "https://wayback.padicat.cat/wayback/*/";
61 links["GhostArchive"] = "http://ghostarchive.org/search?term=";
62 window.open(links[buttonValue]+userURL);
63
64 }
65}
66
67

Callers

nothing calls this directly

Calls 1

validURLFunction · 0.85

Tested by

no test coverage detected