{
"translatorID": "303bdfc5-11b8-4107-bca1-63ca97701a0f",
"label": "ASCE",
"creator": "Sebastian Karcher",
"target": "^https?://(www\\.)?ascelibrary\\.org/",
"minVersion": "2.1.9",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2012-06-24 14:22:53"
}
/*
ASCE Translator
Copyright (C) 2012 Sebastian Karcher
Based on Taylor and Francis Translator
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
function getTitles(doc) {
return ZU.xpath(doc, '//table[@class="articleEntry"]//td[@valign="top"]/a[1]');
}
function detectWeb(doc, url) {
if (url.match(/\/doi\/abs\/10\.|\/doi\/full\/10\./)) {
return "journalArticle";
} else if(url.match(/\/action\/doSearch\?|\/toc\//))
{
return "multiple";
}
}
function doWeb(doc, url) {
if (detectWeb(doc, url) == "multiple") {
var items = new Object();
var titles = getTitles(doc);
var doi;
for(var i=0, n=titles.length; i