Skip to content

Commit

Permalink
Update zsc.js
Browse files Browse the repository at this point in the history
using a small range of year instead of an exact number
  • Loading branch information
nico-zck committed Apr 1, 2020
1 parent 275f70a commit 9974ecc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions chrome/content/zsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,11 @@ zsc.generateItemUrl = function(item) {
}
}

// let year = item.getField('year');
// if (year) {
// url += '&as_ylo=' + year + '&as_yhi=' + year;
// }
let year = parseInt(item.getField('year'));
if (year) {
// set a small range of year instead of an exact number
url += '&as_ylo=' + (year - 2) + '&as_yhi=' + (year + 2);
}

return encodeURI(url);
};
Expand Down

0 comments on commit 9974ecc

Please sign in to comment.