אונטערשייד צווישן ווערסיעס פון "מעדיעוויקי:Common.js/externalsmaker.js"

אפדעיט
אין תקציר עריכה
צייכן: צוריקגעשטעלט
(אפדעיט)
 
(איין צווישנדיגע ווערסיע פונעם זעלבן באַניצער נישט געוויזן)
שורה 839: שורה 839:
},
},
{
{
hostname: 'www.nli.org.il', hrefmatch: /newspapers\/bamahane/, // it's own thing and not part of the larger nli
hostname: 'www.nli.org.il', hrefmatch: /newspapers\/bamahane\//, // it's own thing and not part of the larger nli
params: [
params: [
{ str: 'במחנה' },
{ str: 'במחנה' },
שורה 845: שורה 845:
{ str: '', func: function (str) { return window.prompt("כותרת הדף", str); } }, // $('.pageblockselected').attr('title')
{ str: '', func: function (str) { return window.prompt("כותרת הדף", str); } }, // $('.pageblockselected').attr('title')
{ url: 1, match: /newspapers\/bamahane\/(\d{4}\/\d{2}\/\d{2})\// },
{ url: 1, match: /newspapers\/bamahane\/(\d{4}\/\d{2}\/\d{2})\// },
{ url: 1, match: /page\/(\d+)/ }
]
},
{
hostname: 'www.nli.org.il', hrefmatch: /newspapers\/bamahanenahal\//, // it's own thing and not part of the larger nli
params: [
{ str: 'במחנה נחל' },
{ str: '', func: function (str) { return window.prompt("שם מחבר", str!='N/A'?str:''); } },
{ str: '', func: function (str) { return window.prompt("כותרת הדף", str); } }, // $('.pageblockselected').attr('title')
{ url: 1, match: /newspapers\/bamahanenahal\/(\d{4}\/\d{2}\/\d{2})\// },
{ url: 1, match: /page\/(\d+)/ }
{ url: 1, match: /page\/(\d+)/ }
]
]
שורה 1,165: שורה 1,175:
{ str: 'סרוגים' },
{ str: 'סרוגים' },
[
[
{ ldjson: { key: 'author' } },
{ telem: '.post_author', match: /(.+?)\d/ },
{ telem: '.post_author', match: /(.+?)\d/ },
{ attr: ["meta[name='author']", "content"] }
{ attr: ["meta[name='author']", "content"] }
שורה 1,171: שורה 1,182:
{ url: 1, match: /\.srugim\.co\.il\/(.*)$/ },
{ url: 1, match: /\.srugim\.co\.il\/(.*)$/ },
[
[
{ ldjson: { key: 'datePublished' } },
{ attr: ["meta[property='article:published_time']", "content"], date:['-',[2,1,0]] },
{ attr: ["meta[property='article:published_time']", "content"], date:['-',[2,1,0]] },
{ telem: '.post_details', date: '.' }
{ telem: '.post_details', date: '.' }
שורה 1,435: שורה 1,447:
{ url: 1, match: /il\/(.+?)\// },
{ url: 1, match: /il\/(.+?)\// },
{ telem: 'div.date > span' }
{ telem: 'div.date > span' }
]
},
{
hostname: "yuvalerel.com",
params: [
{ str: 'יובל אראל'},
{ telem: 'a.author-name' },
{ telem: 'h1.post-title ' },
{ url: 1, match: /com\/(.*)/ }
]
]
},
},
שורה 1,754: שורה 1,757:
params[j] = undefined;
params[j] = undefined;
}
}
} else if (typeof curParam.json != "undefined") {
// Find the script element and get its text
var jsonElement = jQuery('html').find(curParam.json[0]);
if (jsonElement.length) {
try {
var jsonObj = JSON.parse(jsonElement.text());
// Navigate the path (e.g., "work.authors.0.displayName")
var path = curParam.json[1].split('.');
params[j] = jsonObj;
for (var pi = 0; pi < path.length; pi++) {
params[j] = params[j][path[pi]];
if (params[j] === undefined || params[j] === null) break;
}
} catch (e) {
console.error("JSON parse error", e);
params[j] = '';
}
}
else if (typeof curParam.urlparam != "undefined") {
else if (typeof curParam.urlparam != "undefined") {
params[j] = getParameterByName(curParam.urlparam) || "";
params[j] = getParameterByName(curParam.urlparam) || "";