{
"translatorID": "b24ee183-58a6-443d-b8f9-c5cd5a3a0f73",
"label": "Paris Review",
"creator": "Avram Lyon",
"target": "^https?://www\\.theparisreview\\.org/",
"minVersion": "1.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2014-04-03 18:50:53"
}
/*
Paris Review Translator
Copyright (C) 2010 Avram Lyon, ajlyon@gmail.com
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 detectWeb(doc, url){
if (url.match(/\/(interviews|poetry|fiction|letters-essays)\/\d+\//)) {
return "magazineArticle";
} else if (url.match(/\/blog\/\d+\//)) {
return "blogPost";
} else if (url.match(/\/(blog|interviews|current-issue|letters-essays|poetry|fiction)($|\/)/)|| url.match(/\/search\?/) ){
return "multiple";
} else return false;
}
function doWeb(doc, url){
var articles = new Array();
if (detectWeb(doc, url) == "multiple") {
var items = {};
var aTags = doc.getElementsByTagName("a");
for(var i=0; i