Skip to content

Commit 6feed92

Browse files
committed
Make JS IE friendly
replace startsWith and optional function arguments with IE friendly code
1 parent 8412103 commit 6feed92

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pagination.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function makePageLink(currentUrl, currentStart, start, linkText) {
1919
var tagStart = '<a href="';
2020
if (currentStart == start) {
2121
uri = "#";
22-
if (!linkText.toString().startsWith("&")) { // Don't modify arrows
22+
if (!linkText.toString().substring(0, 1) === "&") { // Don't modify arrows
2323
tagStart = '<a class="active" href="';
2424
}
2525
}

zotero.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ function showUrl(url) {
9898

9999

100100
// Passes search URL and callbacks to CORS function
101-
function searchZotero(query, publicGroupId, start=0) {
101+
function searchZotero(query, publicGroupId, start) {
102102
var base = "https://api.zotero.org/groups/";
103103
var params = "/items?v=3&include=bib&sort=date&itemType=-attachment&q=";
104104
var limit = "&limit=" + ZOTERO_CONFIG["limit"];
105+
if (start === undefined) start = "0";
105106
start = "&start=" + start;
106107
var url = base + publicGroupId + params + query + limit + start;
107108
showUrl(url);

0 commit comments

Comments
 (0)