-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
46 lines (44 loc) · 2.17 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const customPath = document.getElementById("customPath");
const searchTerm = document.getElementById("searchTerm");
document.addEventListener('DOMContentLoaded', () => {
searchTerm.focus();
customPath.addEventListener('change', () => {
var searchPath = customPath.value;
if (searchPath === "all") {
var url = "https://primo-90su.hosted.exlibrisgroup.com/primo-explore/search?query=any,contains," + document.getElementById('searchTerm').value + "&tab=default_tab&search_scope=Everything&vid=90SU_VIEW&offset=0"
chrome.tabs.create({
url
});
}
if (searchPath === "b") {
var url = "https://primo-90su.hosted.exlibrisgroup.com/primo-explore/search?query=any,contains," + document.getElementById('searchTerm').value + "&tab=default_tab&search_scope=Everything&vid=90SU_VIEW&facet=rtype,include,books&offset=0"
chrome.tabs.create({
url
});
}
if (searchPath === "a") {
var url = "https://primo-90su.hosted.exlibrisgroup.com/primo-explore/search?query=any,contains," + document.getElementById('searchTerm').value + "&tab=default_tab&search_scope=Everything&vid=90SU_VIEW&facet=rtype,include,articles&offset=0"
chrome.tabs.create({
url
});
}
if (searchPath === "j") {
var url = "https://sfx-90su.hosted.exlibrisgroup.com/sabanci/journalsearch?param_pattern_value=" + document.getElementById('searchTerm').value + "¶m_textSearchType_value=startsWith"
chrome.tabs.create({
url
});
}
if (searchPath === "c") {
var url = "http:https://risc01.sabanciuniv.edu/search~S9/?searchtype=r&searcharg=" + document.getElementById('searchTerm').value;
chrome.tabs.create({
url
});
}
if (searchPath === "f") {
var url = "http:https://risc01.sabanciuniv.edu/search~S9/?searchtype=p&searcharg=" + document.getElementById('searchTerm').value;
chrome.tabs.create({
url
});
}
});
});