מדיה ויקי:Common.js/externalsmaker.js – הבדלי גרסאות

תוכן שנמחק תוכן שנוסף
אין תקציר עריכה
אין תקציר עריכה
שורה 639:
{ telem: "#themag" }
]
},
},
/*
{
hostname: 'www.nli.org.il',
שורה 649 ⟵ 650:
{ telem:'script[type="application/ld+json"]', func: function (str) { var j=JSON.parse(str); return window.prompt("כותרת הדף", j.name) } },
{ url:1, match:/newspapers\/\w+\/(\d+\/\d+\/\d+)\// },
{ url:1, match:/article\/(\d+)\// }, <------------------ TEMPLATE NOT YET SUPPRT NEW ID
]
},
*/
{
hostname: 'www.nli.org.il',
params[j]: = params[j]
{str: 'קישור כללי'},
{ prefix:'אתר=', telem:'#breadcrumbscell li:nth-child(2)' },
{ prefix:'כתובת=', url:1 },
{ prefix:'הכותב=', telem:'script[type="application/ld+json"]', func: function (str) { var j=JSON.parse(str); return window.prompt("שם מחבר", j.author!='N/A'?j.author:'') }, },
{ prefix:'כותרת=', telem:'script[type="application/ld+json"]', func: function (str) { var j=JSON.parse(str); return window.prompt("כותרת הדף", j.name) } },
{ prefix:'תאריך=', telem:'script[type="application/ld+json"]', func: function (str) { var j=JSON.parse(str); return j.datePublished }, date:['-',[2,1,0]] },
{ prefix:'עמודים=', var: ['initialDisplayPageArea', 'pageID'], match:/^\d+\.(\d+)$/},
]
},
שורה 1,178 ⟵ 1,192:
}
if (typeof params[j] == "string") {
params[j] = params[j]
.replace(/&nbsp;|\u202B-\u202d/gm, " "
.replace(/\s+/gm, ' '))
.replace(/=/g, "{{=}}")
.replace(/(\|\|?)/gm, function (x) { return "{{" + x.replace(/\|/g, "!") + "}}" });
try {
params[j] = jQuery.trim(decodeURIComponent(params[j])) //TODO:
} catch(e) {
console.error(e)
}
}
params[j] = params[j]
.replace(/&nbsp;|\u202B-\u202d/gm, " "
.replace(/\s+/gm, ' '))
.replace(/=/g, "{{=}}")
.replace(/(\|\|?)/gm, function (x) { return "{{" + x.replace(/\|/g, "!") + "}}" })
.replace(/(\|\|?)/gm, function (x) { return "{{" + x.replace(/\|/g, "!") + "}}" });
}
else if (jQuery.isArray(params[j])) {