אונטערשייד צווישן ווערסיעס פון "מעדיעוויקי:Common.js/externalsmaker.js"
קפיצה לניווט
קפיצה לחיפוש
מוטי (שמועס | ביישטייערונגען) (עדכון מהמכלול (כל רגע, היבורובוקס בטא)) |
(אפדעיט) |
||
(49 מיטלסטע ווערסיעס פון 3 באַניצער נישט געוויזן.) | |||
שורה 5: | שורה 5: | ||
function dateFormat(dateArr) { | function dateFormat(dateArr) { | ||
if (dateArr instanceof Array) { | if (dateArr instanceof Array) { | ||
var m = [" | var m = ["יאנואר", "פעברואר", "מערץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "סעפטעמבער", "אקטאבער", "נאוועמבער", "דעצעמבער"]; | ||
if (dateArr.length != 3) | if (dateArr.length != 3) | ||
שורה 19: | שורה 19: | ||
dateArr[0] = dateArr[0].substring(1, dateArr[0].length); | dateArr[0] = dateArr[0].substring(1, dateArr[0].length); | ||
dateArr = dateArr[ | dateArr = dateArr[1] + " " + dateArr[0] + ", " + dateArr[2]; | ||
} | } | ||
return jQuery.trim(dateArr); | return jQuery.trim(dateArr); | ||
שורה 43: | שורה 43: | ||
.replace(/ |\u202B-\u202d/gm, " " | .replace(/ |\u202B-\u202d/gm, " " | ||
.replace(/\s+/gm, ' ')) | .replace(/\s+/gm, ' ')) | ||
.replace( | .replace(/&[mn]dash;/g, '-') | ||
.replace('"', '"') | .replace('"', '"') | ||
.replace(' ', ' ') | |||
.replace('״', '"') | |||
.replace('׳', "'") | |||
.replace(/(\n|\r)/g, ' ') | |||
.replace(/=/g, "{{=}}") | .replace(/=/g, "{{=}}") | ||
.replace(/''/g, '"') | .replace(/''/g, '"') | ||
.replace(/(\|\|?)/gm, function (x) { return "{{" + x.replace(/\|/g, "!") + "}}"; }) | .replace(/((?<!עיתונות)\|\|?)/gm, function (x) { return "{{" + x.replace(/\|/g, "!") + "}}"; }) | ||
.replace(/[\u200B\u200E\u200F\u2028\u202A\u202B\u202C\u202D\u202E]/g, '') | .replace(/[\u200B\u200E\u200F\u2028\u202A\u202B\u202C\u202D\u202E]/g, '') // remove invisible Unicode control characters | ||
.replace(/ {2,}/g, ' '); | |||
} | } | ||
var VE = ' | function getWikiLink() { | ||
TODAY = ' | var result = '', | ||
YESTERDAY = ' | oldid = getParameterByName('oldid') || getParameterByName('diff'); | ||
if (window.location.host == 'yi.hamichlol.org.il' && oldid) { | |||
var oldComment = ''; | |||
oldComment = window.prompt("קעפּל פאַר די לינק. קען בלייבן ליידיג.", oldComment); | |||
result = '{{הבדל בין גרסאות|' + getParameterByName('title') + '|' + oldid + '||' + (oldComment ? oldComment : 'הבדל בין גרסאות') + '}}'; | |||
} else { | |||
var nms = { | |||
'yi.hamichlol.org.il': '', | |||
'www.hamichlol.org.il': 'ע:', | |||
'he.wikiquote.org': 'q:', | |||
'he.wikisource.org': 's:', | |||
'en.wiktionary.org': 'wikt:' | |||
}, | |||
wikinamespace = document.querySelector('.mw-page-title-namespace'), | |||
wikiname = document.querySelector('.mw-page-title-main'), | |||
wikiarticle = wikiname ? wikinamespace ? wikinamespace.textContent + ':' + wikiname.textContent : wikiname.textContent : null, | |||
wikitype = nms[window.location.host]; | |||
if (wikitype != undefined && wikiname) { | |||
result = '[[' + wikitype + wikiarticle + (wikitype ? '|' + wikiname.textContent : '') + ']]'; | |||
} | |||
} | |||
if (result) { | |||
if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", result) != null) { | |||
$('<input>').val(result).appendTo('body').select();document.execCommand('copy'); | |||
} | |||
return true; | |||
} | |||
return false; | |||
} | |||
if (window.location.host.indexOf('he.wik') == 0) { | |||
if (getWikiLink()) { | |||
return true; | |||
} | |||
} | |||
var VE = ', ', | |||
TODAY = 'היינט', | |||
YESTERDAY = 'נעכטן'; | |||
var data = [ | var data = [ | ||
שורה 92: | שורה 138: | ||
[ | [ | ||
{ telem: '.art_header_title' }, | { telem: '.art_header_title' }, | ||
{ attr: ["meta[property='og:title']", "content"] }, | { attr: ["meta[property='og:title']", "content"], remove: [/ - אוכל - ynet.*/] }, | ||
{ elem: 'head>title', match: /(?:ynet\s*-?)?([^\-]*)/ }, | { elem: 'head>title', match: /(?:ynet\s*-?)?([^\-]*)/ }, | ||
{ telem: 'h1' } | { telem: 'h1' }, | ||
{ elem: 'font.leshonit' } | |||
], | ], | ||
[ | [ | ||
{ url: 1, match: /L-(.*?),/ }, | { url: 1, match: /L-(.*?),/ }, | ||
{ | { url: 1, match: /co\.il\/(.*)/, remove: ['#autoplay'] } ], | ||
[ | [ | ||
{ url: 1, match: /co\.il\/((?:ency)\/.*?html?)/, prefix: "תאריך=", func: function(s) { return s ? 'ללא' : ''; }}, | |||
{ elem: 'td:has(h1:first) .text12g:last', date: '.' }, | { elem: 'td:has(h1:first) .text12g:last', date: '.' }, | ||
{ elem: ".text12g + .text12g", date: '.' }, | { elem: ".text12g + .text12g", date: '.' }, | ||
שורה 107: | שורה 153: | ||
{ elem: ".ArticleHeaderComponent .date", date: '.'}, | { elem: ".ArticleHeaderComponent .date", date: '.'}, | ||
{ elem: ".authoranddate .date", date: '.'}, | { elem: ".authoranddate .date", date: '.'}, | ||
{ elem: ".authoranddate .date", stringDate: true, func: function(s) { return s.indexOf('אתמול') > -1 ? YESTERDAY : TODAY; } // contains "אתמול" for yesterday, nothing for today | { elem: ".authoranddate .date", stringDate: true, func: function(s) { return !s || s.indexOf('אתמול') > -1 ? YESTERDAY : TODAY; } }, // contains "אתמול" for yesterday, nothing for today | ||
} | { elem: ".date", date: '.' } | ||
] | ] | ||
] | ] | ||
שורה 116: | שורה 162: | ||
params: [ | params: [ | ||
{ str: 'mynet3' }, | { str: 'mynet3' }, | ||
{ | { attr: ["meta[property='channel-name']", "content"] , remove: ['MYNET ', 'mynet ', 'מיינט '], func:function(s) { return s=='עפולה ועמק'?'העמק':s; } }, | ||
{ telem: 'div.authors' }, | { telem: 'div.authors' }, | ||
{ telem: 'h1.mainTitle' }, | { telem: 'h1.mainTitle' }, | ||
שורה 124: | שורה 170: | ||
}, | }, | ||
{ | { | ||
hostname: | hostname: /^\w+\.walla\.co\.il$/, | ||
params: [ | params: [ | ||
{ str: ' | { str: 'וואלה' }, | ||
[ | [ | ||
{ telem: | { telem: 'div.writers-names', remove: [/מערכת וואלה[א-ת ]+/] }, | ||
{ telem: | { telem: 'div.author' }, | ||
{ telem: '.info .author:first, .provider', match: /^([^\|]*)/ }, | |||
{ telem: 'div.wp-0-b:first span:first', match: /מאת:(.*),/ }, | |||
{ telem: '.author > div', match: /^([^\|]*)/, remove: [/מערכת וואלה[א-ת ]+/] } | |||
], | ], | ||
{ attr: ["meta[property='og:title']", "content"], remove: [ / - וואלה!?.*/ ] }, | |||
[ | |||
{ url: 1, match: /item\/(\d+)/ }, | |||
{ url: 1, match: /w=\/\d*\/(\d+)/ }, | |||
{ url: 1, match: /break\/(\d+)/ } | |||
{ attr: ["meta[property='og:title']", "content"], remove: [ / - וואלה!.*/ ] }, | |||
[ | |||
{ url: 1, match: /item\/(\d+)/ }, | |||
{ url: 1, match: /w=\/\d*\/(\d+)/ }, | |||
{ url: 1, match: /break\/(\d+)/ } | |||
], | ], | ||
[ | [ | ||
שורה 172: | שורה 195: | ||
}, | }, | ||
{ | { | ||
hostname: "www.haaretz.co.il", | hostname: "www.haaretz\\.(co\\.il|com)", | ||
params: [ | params: [ | ||
{ str: 'הארץ' }, | { str: 'הארץ' }, | ||
שורה 179: | שורה 202: | ||
{ telements: ["header address", VE] }, | { telements: ["header address", VE] }, | ||
{ telem: 'address > a' }, | { telem: 'address > a' }, | ||
{ attr: ["meta[name='author']", "content"] } | { attr: ["meta[name='author']", "content"] }, | ||
{ telem: 'main > div > section > div > div > a' }, | |||
{ telem: 'address' } ], | |||
[ | |||
{ telem: 'header h1' }, | |||
{ attr: ['meta[property="og:title"]', 'content'] } | |||
], | ], | ||
{ url: 1, match: /([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/, addParam: 'gift' }, | |||
{ url: 1, match: /([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/ }, | |||
[ | [ | ||
{ telem: "header time", date: '.' }, | { telem: "header time", date: '.' }, | ||
{ telem: 'time', date: '.' }, | { telem: 'time', date: '.' }, | ||
{ telem: 'time', remove: [ /\d\d\:\d\d\, / ], removeDatePadding: true } | { telem: 'time', remove: [/\d\d\:\d\d\, /, /\d{1,2}:\d\d [apmAPM]{2} [a-zA-Z]{3}/], removeDatePadding: true } | ||
] | ] | ||
] | ] | ||
}, | }, | ||
שורה 216: | שורה 234: | ||
[ | [ | ||
{ telem: '.story_autor_name' }, | { telem: '.story_autor_name' }, | ||
{ telem: '#progBrodcaster'} | { telem: '#progBrodcaster'}, | ||
{ telem: '.name'} | |||
], | ], | ||
[ | [ | ||
{ telem: '.story_title' }, | { telem: '.story_title' }, | ||
{ telem: '#progName'} | { telem: '#progName'}, | ||
{ attr: ["meta[property='og:title']", "content"] } | |||
], | ], | ||
[ | [ | ||
{ url: 1, match: /org\.il\/(.*p-\d{4,}.*)/ }, | |||
{ url: 1, match: /(\d+)/ } | |||
], [ | |||
{ telem: '.story_autor_date' }, | { telem: '.story_autor_date' }, | ||
{ telem: '.player_time', date: '.' } | { telem: '.player_time', date: '.' }, | ||
{ attr: ["div[class='date date-local']", "data-date-utc"], date: '.' }, | |||
{ attr: ["*[class='date-local']", "data-date-utc"], date: '.' } | |||
], | ], | ||
{ url: 1, match: /org\.il\/(.+?)\// } | { url: 1, match: /org\.il\/(.+?)\// } | ||
] | |||
}, | |||
{ | |||
hostname: "archive.kan.org.il", | |||
params: [ | |||
{ str: 'כאן ארכיון' }, | |||
{ attr: ["meta[property='og:title']", "content"], remove: ['כאן ארכיון |'] }, | |||
{ url: 1, match: /(\d+)/ }, | |||
{ telem: 'span.itemPageDate', remove: ['תאריך שידור:'], date: '.' } | |||
] | ] | ||
}, | }, | ||
שורה 254: | שורה 287: | ||
hostname: "(13news.co.il|13tv.co.il)", | hostname: "(13news.co.il|13tv.co.il)", | ||
params: [ | params: [ | ||
{ str: ' | { str: 'חדשות 13' }, | ||
{ ldjson: { key: 'author' } }, | { ldjson: { key: 'author' } }, | ||
[ | [ | ||
שורה 296: | שורה 329: | ||
{ telem: '.article-date-gregorian', date: '.' }, | { telem: '.article-date-gregorian', date: '.' }, | ||
{ telem: '.article-date-gregorian-date', date: '.' } | { telem: '.article-date-gregorian-date', date: '.' } | ||
] | ], | ||
{ url: 1, match: /.*(flashes).*/ } | |||
] | ] | ||
}, | }, | ||
שורה 330: | שורה 364: | ||
params: [ | params: [ | ||
{ str: 'בחדרי חרדים' }, | { str: 'בחדרי חרדים' }, | ||
{ | { ldjson: { key:'author' } }, | ||
{ | { attr: ["meta[property='og:title']", "content"], remove:[' - בחדרי חרדים'] }, | ||
[ | [ | ||
{ url: 1, match: /news\/(\d+)/ }, | { url: 1, match: /news\/(\d+)/ }, | ||
{ var: 'userid' } | { var: 'userid' } | ||
], | ], | ||
{ | { ldjson: { key:'datePublished' } } | ||
] | ] | ||
}, | }, | ||
שורה 343: | שורה 377: | ||
params: [ | params: [ | ||
{ str: 'עכשיו 14' }, | { str: 'עכשיו 14' }, | ||
{ telem: '.author-zone', remove: [ | { telem: '.author-zone', remove: [/(:?חדשות|עכשיו) 14.*/] }, | ||
{ telem: '.post-title' }, | { telem: '.post-title' }, | ||
{ url: 1, match: /il\/(.+?)\// }, | { url: 1, match: /il\/(.+?)\// }, | ||
שורה 468: | שורה 502: | ||
{ str: 'ישראל היום' }, | { str: 'ישראל היום' }, | ||
[ | [ | ||
{ telem: ".normal14 .normal, .content li.taxonomy-term-reference-0, .views-field-name .field-content" }, | { telem: ".normal14 .normal, .content li.taxonomy-term-reference-0, .views-field-name .field-content", remove: [/(:?כתבי|מערכת) ישראל היום/] }, | ||
{ ldjson: { key:'author' } } | { ldjson: { key:'author'}, remove: [/(:?כתבי|מערכת) ישראל היום/] } | ||
], | ], | ||
[ | [ | ||
שורה 518: | שורה 552: | ||
], | ], | ||
[ { var: ['articlePage', 'name'] }, | [ { var: ['articlePage', 'name'] }, | ||
{ telem: "header > h1" }, | |||
{ telem: "header > div > h1" }, | |||
{ attr: ['meta[property="og:title"]', 'content'] }, | { attr: ['meta[property="og:title"]', 'content'] }, | ||
{ telem: "h1.h-mb--xxtight, h1.mainTitle" }, | { telem: "h1.h-mb--xxtight, h1.mainTitle" }, | ||
שורה 526: | שורה 562: | ||
{ attr: ["meta[property='article:published']", "content"], date:['-',[2,1,0]] }, | { attr: ["meta[property='article:published']", "content"], date:['-',[2,1,0]] }, | ||
{ telem: ".author-bar li:eq(1), .h3_date, div.art__info time", date: '.' }, | { telem: ".author-bar li:eq(1), .h3_date, div.art__info time", date: '.' }, | ||
{ telem: ".inner_bar", date:'/'} | { telem: ".inner_bar", date:'/'}, | ||
{ telem: 'time', remove: [ /\d\d\:\d\d\, /, /.*• / ], removeDatePadding: true } | |||
], | ], | ||
{ url: 1, match: /\/\/(.*?).themarker/i, defvalue: "www" } | { url: 1, match: /\/\/(.*?).themarker/i, defvalue: "www" } | ||
שורה 537: | שורה 574: | ||
[ | [ | ||
{ telem: ".shahor.art-author" }, | { telem: ".shahor.art-author" }, | ||
{ telem: ".calcalistArticleHeader_footer .authors" } | { telem: ".calcalistArticleHeader_footer .authors" }, | ||
{ telem: "span.authorArticle" } | |||
], | ], | ||
{ telem: "h1" }, | { telem: "h1" }, | ||
שורה 546: | שורה 585: | ||
[ | [ | ||
{ telem: ".art-publish-date.afor > .l-date:last", date: '.' }, | { telem: ".art-publish-date.afor > .l-date:last", date: '.' }, | ||
{ telem: ".calcalistArticleHeader_footer .date", date: '.'} | { telem: ".calcalistArticleHeader_footer .date", date: '.'}, | ||
{ telem: "span.art-publish-date", date: '.'} | |||
] | ] | ||
] | |||
}, | |||
{ | |||
hostname: "newmedia.calcalist.co.il", | |||
params: [ | |||
{ str: 'מוסף כלכליסט' }, | |||
{ telem: ".credit" }, | |||
[ | |||
{ telem: "div.head-container > h1.head-2" }, | |||
{ attr: ['meta[property="og:title"]', 'content'], remove: [' | מוסף כלכליסט'] } | |||
], | |||
{ url: 1, match: /\.il\/magazine-(.*?)\.html/ } | |||
] | ] | ||
}, | }, | ||
שורה 555: | שורה 608: | ||
{ str: 'NFC' }, | { str: 'NFC' }, | ||
{ telem: "#ctl00_ContentMain_UcArticle1_lnkWriterName, #ctl00_ContentMain_UcArticle1_lblTopWriterName", remove: ["מחלקה ראשונה"] }, | { telem: "#ctl00_ContentMain_UcArticle1_lnkWriterName, #ctl00_ContentMain_UcArticle1_lblTopWriterName", remove: ["מחלקה ראשונה"] }, | ||
{ | { attr: ['meta[property="og:title"]', 'content'] }, | ||
{ url: 1, match: /ve\/(.*?)\.html/ }, | { url: 1, match: /ve\/(.*?)\.html/ }, | ||
{ telem: "#ctl00_ContentMain_UcArticle1_lblCreateDate", date: '/' } | { telem: "#ctl00_ContentMain_UcArticle1_lblCreateDate", date: '/' } | ||
שורה 571: | שורה 624: | ||
{ telem: "#fullRecordView th:contains(בתוך):first + td", match: /(\d+\-\d+)/ }, | { telem: "#fullRecordView th:contains(בתוך):first + td", match: /(\d+\-\d+)/ }, | ||
{ telem: "#fullRecordView th:contains(מס' מערכת):first + td", prefix: "רמבי=" } | { telem: "#fullRecordView th:contains(מס' מערכת):first + td", prefix: "רמבי=" } | ||
] | ] | ||
}, | }, | ||
שורה 596: | שורה 639: | ||
params: [ | params: [ | ||
{ str: 'ספורט 5' }, | { str: 'ספורט 5' }, | ||
{ | { ldjson: { key: 'author' }, remove: ["מערכת אתר ערוץ הספורט"] }, | ||
{ telem: "h1.article-main, h1#divTopTitle" }, | { telem: "h1.article-main, h1#divTopTitle" }, | ||
[ | [ | ||
שורה 628: | שורה 671: | ||
{ telem: ".article-primary p strong:eq(0)", match: /(.+)\|/ }, | { telem: ".article-primary p strong:eq(0)", match: /(.+)\|/ }, | ||
{ telem: "h1" }, | { telem: "h1" }, | ||
[ | [ | ||
{ attr: ["body", "data-uid"] }, | |||
{ url: 'decodeURI', match: /idf\.il\/(.*)$/ } | |||
], [ | |||
{ telem: ".article-primary p strong:eq(0)", date: '.' }, | { telem: ".article-primary p strong:eq(0)", date: '.' }, | ||
{ attr: ['meta[property="article:published_time"]', 'content'], match: /(\d+\s+.*?\s+\d{4})/ }, | { attr: ['meta[property="article:published_time"]', 'content'], match: /(\d+\s+.*?\s+\d{4})/ }, | ||
שורה 642: | שורה 687: | ||
{ attr: ["meta[name='author']", "content"] }, | { attr: ["meta[name='author']", "content"] }, | ||
{ telem: 'h1.MuiTypography-h1' }, | { telem: 'h1.MuiTypography-h1' }, | ||
{ url: 1, match: /il\/ | [ | ||
{ url: 1, match: /il\/.*?\/(\d*)/ }, | |||
{ url: 1, match: /il\/(.*)/ } | |||
], | |||
{ attr: ["meta[name='article:published_time']", "content"], date:['-', '210'] }, | { attr: ["meta[name='article:published_time']", "content"], date:['-', '210'] }, | ||
] | ] | ||
שורה 693: | שורה 741: | ||
{ url: 1, match: /hebrewbooks\.org\/(\d+)$/i } | { url: 1, match: /hebrewbooks\.org\/(\d+)$/i } | ||
], | ], | ||
{ | { telem: "#cpMstr_lblHebPlace:first", prefix: 'מקום הוצאה=' }, | ||
{ | { telem: "#cpMstr_lblHebDate:first", prefix: 'שנת הוצאה=' } | ||
] | ] | ||
}, | }, | ||
שורה 707: | שורה 755: | ||
{ url: 1, match: /hebrewbooks\.org\/(\d+)$/i } | { url: 1, match: /hebrewbooks\.org\/(\d+)$/i } | ||
], | ], | ||
{ | { urlparam: 'pgnum', prefix: 'page=' } | ||
{ | ] | ||
}, | |||
{ | |||
hostname: "www.izkor.gov.il", | |||
params: [ | |||
{ str: 'יזכור' }, | |||
{ url: 1, match: /gov\.il\/(.*)/, func: function (val) { return val.replace(/%20/, '%2520'); } }, | |||
{ url: 1, match: /gov\.il\/(.*?)\// } | |||
] | ] | ||
}, | }, | ||
שורה 718: | שורה 773: | ||
{ telem: "title", remove: "HBreader - " }, | { telem: "title", remove: "HBreader - " }, | ||
{ urlparam: 'sfid' }, | { urlparam: 'sfid' }, | ||
{prefix: ' | {prefix: 'page=', url: 1, match:/p\=(\d+)/i, remove: "contents not available "}, | ||
] | ] | ||
}, | }, | ||
{ | { | ||
hostname: " | hostname: "library.alhatorah.org", | ||
params: [ | params: [ | ||
{ str: 'נזכור את כולם' }, | { str: 'על התורה' }, | ||
{ }, | |||
{ telem: "span.SP-title-text" }, | |||
{ urlparam: '?r1' }, | |||
] | |||
}, | |||
{ | |||
hostname: "www.kolhalashon.com", hrefmatch: /RavInfoD/, | |||
params: [ | |||
{ str : 'קול הלשון'}, | |||
{ urlparam: 'RavID', prefix: '3=' } | |||
] | |||
}, | |||
{ | |||
hostname: "www.kolhalashon.com", hrefmatch: /PlayShiur/, | |||
params: [ | |||
{ str: 'קול הלשון'}, | |||
{ elem: '#ctl00_TopInternalPage_c_RavName', perfix: '|' }, | |||
{ elem: '#ctl00_TopInternalPage_c_ShiurTitle', perfix: '|' }, | |||
{ urlparam: 'FileName', perfix: '|'} | |||
] | |||
}, | |||
{ | |||
hostname: "www.izkor.gov.il", hrefmatch: /HalalKorot/i, | |||
params: [ | |||
{ str: 'נזכור את כולם' }, | |||
{ urlparam: "id" }, | { urlparam: "id" }, | ||
{ attr: ['#ctl00_ctl00_MainContent_MainContent_HiddenFieldFullName', 'value'] }, | { attr: ['#ctl00_ctl00_MainContent_MainContent_HiddenFieldFullName', 'value'] }, | ||
שורה 761: | שורה 841: | ||
'ahj': 'החרות ירושלים', | 'ahj': 'החרות ירושלים', | ||
'ahr': 'על המשמר', | 'ahr': 'על המשמר', | ||
'ajns': 'עיתונות|ajns', | |||
'ashnav': 'אשנב', | 'ashnav': 'אשנב', | ||
'baderech': 'עיתונות|baderech', | |||
'bamar': 'במערכה', | 'bamar': 'במערכה', | ||
'dav': 'דבר', | 'dav': 'דבר', | ||
'dhy': 'דואר היום', | 'dhy': 'דואר היום', | ||
'dmt': 'מאמענט', | 'dmt': 'מאמענט', | ||
'dnajlb': 'עיתונות|dnajlb', | |||
'emda': 'עמדה', | 'emda': 'עמדה', | ||
'eretzh': 'עיתונות|eretzh', | |||
'etger': 'עיתונות|etger', | |||
'frw': 'פארווערטס', | 'frw': 'פארווערטס', | ||
'haa': 'המאסף', | 'haa': 'המאסף', | ||
'haam': 'העם עיתון לאומי', | 'haam': 'העם עיתון לאומי', | ||
'hadashot': 'חדשות', | 'hadashot': 'חדשות', | ||
'hadorkrakow': 'עיתונות|hadorkrakow', | |||
'hadt': 'האחדות', | 'hadt': 'האחדות', | ||
'haibri': 'העברי', | 'haibri': 'העברי', | ||
שורה 778: | שורה 864: | ||
'has': 'השומר הצעיר ורשה', | 'has': 'השומר הצעיר ורשה', | ||
'haschiloah': 'השילוח1', | 'haschiloah': 'השילוח1', | ||
'haumaisr': 'האומה1', | |||
'hayal': 'לחייל', | 'hayal': 'לחייל', | ||
'hayomisr': 'עיתונות|hayomisr', | |||
'hayomw': 'היום וורשה', | 'hayomw': 'היום וורשה', | ||
'hazit': 'החזית', | 'hazit': 'החזית', | ||
'hbkr': 'הבקר', | 'hbkr': 'הבקר', | ||
'hcl': 'הכרמל', | 'hcl': 'הכרמל', | ||
'heatid': 'עיתונות|heatid', | |||
'hebrew': 'שרהזאהן', | 'hebrew': 'שרהזאהן', | ||
'hed': 'הד המזרח', | 'hed': 'הד המזרח', | ||
'hegeh': 'עיתונות|hegeh', | |||
'hhr': 'הפועל הצעיר', | 'hhr': 'הפועל הצעיר', | ||
'hlb': 'הלבנון', | 'hlb': 'הלבנון', | ||
שורה 799: | שורה 889: | ||
'hzf': 'הצפירה', | 'hzf': 'הצפירה', | ||
'hzfn': 'הצפון', | 'hzfn': 'הצפון', | ||
'hzfwar': 'עיתונות|hzfwar', | |||
'hzh': 'הצופה', | 'hzh': 'הצופה', | ||
'hzn': 'הזמן', | 'hzn': 'הזמן', | ||
שורה 814: | שורה 905: | ||
'ltb': 'ליטערארישע בלעטער', | 'ltb': 'ליטערארישע בלעטער', | ||
'mad': 'מחזיקי הדת', | 'mad': 'מחזיקי הדת', | ||
'mahanayim': 'מחניים', | |||
'mar': 'מעריב', | 'mar': 'מעריב', | ||
'mgd': 'המגיד', | 'mgd': 'המגיד', | ||
שורה 823: | שורה 915: | ||
'sulm': 'סלם', | 'sulm': 'סלם', | ||
'yarden': 'הירדן', | 'yarden': 'הירדן', | ||
'yomyom': 'יוםיום', | |||
'ytlv': 'ידיעות תל אביב', | 'ytlv': 'ידיעות תל אביב', | ||
'zim': 'עיתונות|zim', | |||
'zmanim': 'זמנים' | 'zmanim': 'זמנים' | ||
}[s.toLowerCase()]; } } | }[s.toLowerCase()]; } } | ||
שורה 831: | שורה 925: | ||
{ var: 'canonical_url', match: /newspapers\/\w+\/(\d+\/\d+\/\d+)\//, remove: '///'}, | { var: 'canonical_url', match: /newspapers\/\w+\/(\d+\/\d+\/\d+)\//, remove: '///'}, | ||
{ var: 'canonical_url', match: /article\/(\d+\.?\d*)(\/|$)/ } | { var: 'canonical_url', match: /article\/(\d+\.?\d*)(\/|$)/ } | ||
] | |||
}, | |||
{ | |||
hostname: "blog.nli.org.il", | |||
params: [ | |||
{ str: 'הספרנים' }, | |||
{ var: ['nliLayersActiveItem', 'data_order'], func: function(itemid) { return document.querySelector('.article-items > article:nth-of-type(' + itemid + ') .entry-meta span:nth-of-type(1)').textContent; } }, | |||
{ var: ['nliLayersActiveItem', 'data_order'], func: function(itemid) { return document.querySelector('.article-items > article:nth-of-type(' + itemid + ') .entry-title').textContent; } }, | |||
{ var: ['nliLayersActiveItem', 'data_url'], remove: [ /^\//, /\/$/ ] }, | |||
{ var: ['nliLayersActiveItem', 'data_order'], func: function(itemid) { return document.querySelector('.article-items > article:nth-of-type(' + itemid + ') .entry-meta span:nth-of-type(2)').textContent; }, date: '.' } | |||
] | ] | ||
}, | }, | ||
שורה 837: | שורה 941: | ||
params: [ | params: [ | ||
{ str: 'אנשים ומחשבים' }, | { str: 'אנשים ומחשבים' }, | ||
{ | { attr: ["meta[name='author']", "content"] }, | ||
[ | [ | ||
{ telem: ".post_header > h2:nth-child(2)" }, | { telem: ".post_header > h2:nth-child(2)" }, | ||
שורה 927: | שורה 1,031: | ||
}, | }, | ||
{ | { | ||
hostname: " | hostname: "ch10.co.il", | ||
params: [ | params: [ | ||
{ str: 'חרדים10' }, | { str: 'חרדים10' }, | ||
{ telem: '.author' }, | { telem: '.author', remove: ['חרדים 10'] }, | ||
{ telem: '.main-post h1 a' }, | { telem: '.main-post h1 a' }, | ||
{ url: 1, match: /news\/(\d+)/ }, | { url: 1, match: /news\/(\d+)/ }, | ||
שורה 946: | שורה 1,050: | ||
}, | }, | ||
{ | { | ||
hostname: / | hostname: /www\.maariv\.co\.il/, | ||
params: [ | params: [ | ||
{ str: 'מעריב אונליין' }, | { str: 'מעריב אונליין' }, | ||
[ | [ | ||
{ ldjson: { key: 'author' } }, | |||
{ telem: 'span.article-reporter a', remove: [ 'מעריב אונליין'] }, | { telem: 'span.article-reporter a', remove: [ 'מעריב אונליין'] }, | ||
{ telem: 'a[rel=Author]' }, | { telem: 'a[rel=Author]' }, | ||
{ telem: '.article-date-report-wrap', match: /^.*\|(.*)$/m }, | { telem: '.article-date-report-wrap', match: /^.*\|(.*)$/m }, | ||
{ telem: 'span.article-reporter', remove: [ 'מעריב אונליין'] } | { telem: 'span.article-reporter', remove: [ 'מעריב אונליין'] } | ||
], | ], | ||
[ | [ | ||
{ | { attr: ['meta[property="og:title"]', 'content'] }, | ||
{ telem: ' | { telem: '.article-title' } | ||
], | ], | ||
{ url: 1, match: /co\.il\/(.*)/ }, | { url: 1, match: /co\.il\/(.*)/ }, | ||
שורה 964: | שורה 1,068: | ||
{ telem: '.article-date-time, .article-he-date', date: '/' }, | { telem: '.article-date-time, .article-he-date', date: '/' }, | ||
{ telem: '.article-date-report-wrap', date: '/' }, | { telem: '.article-date-report-wrap', date: '/' }, | ||
{ telem: '.article-publish-date', date: '/' } | { telem: '.article-publish-date', date: '/' } | ||
] | ] | ||
] | ] | ||
שורה 979: | שורה 1,082: | ||
] | ] | ||
}, | }, | ||
{ | { // site changed their CSP and no longer supported // TODO: remove after 2024-08-31 if not fixed | ||
hostname: "davidson.weizmann.ac.il", hrefmatch: /online/, | hostname: "davidson.weizmann.ac.il", hrefmatch: /online/, | ||
params: [ | params: [ | ||
שורה 1,019: | שורה 1,109: | ||
params: [ | params: [ | ||
{ str: 'אתר הגבורה' }, | { str: 'אתר הגבורה' }, | ||
{ attr: ['input[name=hdaid]', 'value'] }, | |||
{ attr: ['input[name=hdaid]', 'value'] } | { telem: 'h1' } | ||
] | ] | ||
}, | }, | ||
שורה 1,056: | שורה 1,146: | ||
var parts = $('title').text().replace(' - אוצר החכמה','').split('/'); // new pages (april 2022) | var parts = $('title').text().replace(' - אוצר החכמה','').split('/'); // new pages (april 2022) | ||
if (parts.length == 1) { | if (parts.length == 1) { | ||
parts = document.querySelector('.tab-title').textContent.split('/'); // old pages (april 2022) | parts = document.querySelector('div.item-tab-con.active .tab-title').textContent.split('/'); // old pages (april 2022) | ||
} | } | ||
window.detail_data = { | window.detail_data = { | ||
שורה 1,084: | שורה 1,174: | ||
{ var: ['detail_data', 'YEAR'] } | { var: ['detail_data', 'YEAR'] } | ||
], | ], | ||
[ | [ | ||
{ attr: ["ab", "value"], match: /^([^ ]*) /, prefix: ' | { attr: ["ab", "value"], match: /^([^ ]*) /, prefix: 'page=' }, | ||
{ elem: ["#ab", "val"], prefix: ' | { elem: ["#ab", "val"], prefix: 'page=', match: /^(\d+) / }, | ||
{ urlparam: 'pagenum', prefix: ' | { urlparam: 'pagenum', prefix: 'page=' }, | ||
{ attr: ['.nav-active', 'position'], prefix: ' | { attr: ['.nav-active', 'position'], prefix: 'page='} | ||
] | ] | ||
] | ] | ||
שורה 1,096: | שורה 1,185: | ||
hostname: "www.davar1.co.il", | hostname: "www.davar1.co.il", | ||
params: [ | params: [ | ||
{ str: 'דבר | { str: 'דבר העובדים' }, | ||
[ | [ | ||
{ attr: ['section', 'data-author_name'], remove: [ 'דבר ראשון' ] }, | { attr: ['section', 'data-author_name'], remove: [ 'דבר ראשון', 'דבר העובדים' ] }, | ||
{ attr: ['article', 'data-author_name'], remove: [ 'דבר ראשון' ] } | { attr: ['article', 'data-author_name'], remove: [ 'דבר ראשון', 'דבר העובדים' ] } | ||
], | ], | ||
[ | [ | ||
שורה 1,105: | שורה 1,194: | ||
{ telem: '.g-article-headline'} | { telem: '.g-article-headline'} | ||
], | ], | ||
{ url: 1, match: /www\.davar1\.co\.il\/(\d+)/ }, | { url: 1, match: /www\.davar1\.co\.il(?:\/.*)?\/(\d+)/ }, | ||
[ | [ | ||
{ attr: ['meta[itemprop="dateCreated"]', 'content'], date: '.' }, | { attr: ['meta[itemprop="dateCreated"]', 'content'], date: '.' }, | ||
שורה 1,117: | שורה 1,206: | ||
{ str: "יוטיוב" }, | { str: "יוטיוב" }, | ||
{ urlparam: "v" }, | { urlparam: "v" }, | ||
{ telem: " | { telem: "player-microformat-renderer", func: function (str) { return JSON.parse(str).name; }, prefix: "שם=" }, | ||
{ telem: " | { telem: "player-microformat-renderer", func: function (str) { var dur = JSON.parse(str).duration.slice(2, -1), time = new Date(dur * 1000).toISOString(); return dur < 3600 ? time.substr(14, 5) : time.substr(11, 8); }, prefix: "לענג=" }, | ||
{ telem: " | { telem: "player-microformat-renderer", func: function (str) { return JSON.parse(str).author; }, prefix: "ערוץ=" } | ||
] | ] | ||
}, | }, | ||
שורה 1,252: | שורה 1,341: | ||
{ telem: "h1.elementor-heading-title" }, | { telem: "h1.elementor-heading-title" }, | ||
{ url: 1, match: /\/(\d+)\// }, | { url: 1, match: /\/(\d+)\// }, | ||
{ | { attr: ['meta[property="article:published_time"]', 'content'], date: ['-', '210'] } | ||
] | ] | ||
}, | }, | ||
שורה 1,359: | שורה 1,448: | ||
params: [ | params: [ | ||
{ str: 'שיחה מקומית'}, | { str: 'שיחה מקומית'}, | ||
{ telem: 'article#main > header > div.post_details > a' }, | { telem: 'article#main > header > div.post_details > a' , remove: ['שיחה מקומית'] }, | ||
{ telem: 'article#main > header > h1.post_title' }, | { telem: 'article#main > header > h1.post_title' }, | ||
{ url: 1, match: /il\/(.*)\// }, | { url: 1, match: /il\/(.*)\// }, | ||
שורה 1,393: | שורה 1,482: | ||
{ str: 'כל זכות'}, | { str: 'כל זכות'}, | ||
{ attr: ["meta[property='og:title']", "content"] } | { attr: ["meta[property='og:title']", "content"] } | ||
] | |||
}, | |||
{ | |||
hostname: "guidestar.org.il", hrefmatch: /organization/, | |||
params: [ | |||
{ str: 'גיידסטאר'}, | |||
{ url: 1, match: /il\/organization\/(\d+)/ }, | |||
{ attr: ["meta[property='og:title']", "content"], remove: [' | גיידסטאר - אתר התאגידים של ישראל | משרד המשפטים' ] } | |||
] | ] | ||
}, | }, | ||
שורה 1,428: | שורה 1,525: | ||
}, | }, | ||
{ | { | ||
hostname: " | hostname: "www.tidhar.tourolib.org", | ||
params: [ | params: [ | ||
{ str: ' | { str: 'תדהר'}, | ||
{ | { url: 1, match: /tidhar\/view\/(\d+)\/.+/ }, | ||
{ url: 1, match: /tidhar\/view\/\d+\/(\d+)/ } | |||
{ | |||
] | ] | ||
}, | }, | ||
{ | { | ||
hostname: " | hostname: "academia.edu", | ||
params: [ | params: [ | ||
{ str: ' | { str: 'אקדמיה' }, | ||
{ url: 1, match: / | { attr: ["meta[name='citation_author']", "content"] }, | ||
{ | { attr: ["meta[property='og:title']", "content"] }, | ||
{ url: 1, match: /academia.edu\/(\d+)/ }, | |||
{ attr: ["meta[name='citation_journal_title']", "content"] }, | |||
{ attr: ["meta[name='citation_publication_date']", "content"] } | |||
] | ] | ||
} | } | ||
שורה 1,467: | שורה 1,565: | ||
} else if (typeof curParam.ldjson != "undefined") { | } else if (typeof curParam.ldjson != "undefined") { | ||
var ldjson = null; | var ldjson = null; | ||
var ldjsons = $('script[type="application/ld+json"]').map(function(i,e) { return JSON.parse($(e).text()); }); | var ldjsons = $('script[type="application/ld+json"]').map(function(i,e) { try { return JSON.parse($(e).text().replace(/[\t\n\r]/g, ' ')); } catch (e) { return false; } }); | ||
if (typeof curParam.ldjson.n != "undefined") { | if (typeof curParam.ldjson.n != "undefined") { | ||
ldjson = ldjsons[curParam.ldjson.n]; | ldjson = ldjsons[curParam.ldjson.n]; | ||
שורה 1,569: | שורה 1,667: | ||
break; | break; | ||
} | } | ||
} | |||
} | |||
if (typeof curParam.addParam != "undefined") { | |||
addedParam = getParameterByName(curParam.addParam); | |||
if (addedParam) { | |||
params[j] += ('?' + curParam.addParam + '=' + addedParam); | |||
} | } | ||
} | } | ||
שורה 1,649: | שורה 1,753: | ||
if (window.addWikiNote) result = '{{הערה|' + result + '}}'; | if (window.addWikiNote) result = '{{הערה|' + result + '}}'; | ||
if (prompt(" | if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", result) != null) { | ||
$('<input>').val(result).appendTo('body').select();document.execCommand('copy'); | var temp_raw = $("<input>"); | ||
$("body").append(temp_raw); | |||
temp_raw.val(result); | |||
temp_raw.select(); | |||
document.execCommand("copy"); | |||
temp_raw.remove(); | |||
//$('<input>').val(result).appendTo('body').select();document.execCommand('copy'); | |||
} | } | ||
window.popup_template_canceled = false; | window.popup_template_canceled = false; | ||
שורה 1,677: | שורה 1,787: | ||
date = new Date(ldojson.publisher.datePublished); | date = new Date(ldojson.publisher.datePublished); | ||
} | } | ||
var general = { | var general = { | ||
' | 'שרייבער': $.map($(ldojson.author), function(a) { return a.name; }).join(VE), | ||
' | 'קעפל': ldojson.name || ldojson.headline, | ||
' | 'זייטל': (ldojson.publisher||ldojson_website[0]).name, | ||
' | 'דאטום': date != "Invalid Date" ? dateFormat([''+date.getDate(), ''+(date.getMonth()+1), ''+date.getFullYear()]) : '', | ||
' | 'אדרעס': location.href | ||
}; | }; | ||
console.log('data', general); | |||
var gresult = '{{קישור כללי|'+$.map(general, function(v,k) { | var gresult = '{{קישור כללי|'+$.map(general, function(v,k) { | ||
return k + '=' + cleanText(jQuery.trim(decodeURIComponent($('<a />').html(v).text()))); | return k + '=' + cleanText(jQuery.trim(decodeURIComponent($('<a />').html(v).text()))); | ||
}).join('|') + '}}'; | }).join('|') + '}}'; | ||
if (prompt(" | if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", gresult) != null) { | ||
$('<input>').val(gresult).appendTo('body').select();document.execCommand('copy'); | $('<input>').val(gresult).appendTo('body').select();document.execCommand('copy'); | ||
} | } | ||
שורה 1,699: | שורה 1,810: | ||
} | } | ||
alert(" | alert("דער זייטל אדער בלאט איז נישט געשטיצט דורכ'ן בוקמארקלעט."); | ||
if (window.old$) { window.$ = window.old$; } | if (window.old$) { window.$ = window.old$; } | ||
} | } |
יעצטיגע רעוויזיע זינט 05:50, 30 אויגוסט 2024
/* This code doesn't run in wikipedia but in other sites as bookmarklet */
function wikiit(event, force_popup) {
window.$ = window.jQuery;
function dateFormat(dateArr) {
if (dateArr instanceof Array) {
var m = ["יאנואר", "פעברואר", "מערץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "סעפטעמבער", "אקטאבער", "נאוועמבער", "דעצעמבער"];
if (dateArr.length != 3)
return '';
dateArr[1] = m[Number(dateArr[1]) - 1];
if (Number(dateArr[2]) <= 50)
dateArr[2] = 20 + dateArr[2];
else if (Number(dateArr[2]) >= 50 && Number(dateArr[2]) < 100)
dateArr[2] = 19 + dateArr[2];
if (dateArr[0].charAt(0) == '0')
dateArr[0] = dateArr[0].substring(1, dateArr[0].length);
dateArr = dateArr[1] + " " + dateArr[0] + ", " + dateArr[2];
}
return jQuery.trim(dateArr);
}
function engDateParse(engDate) {
var m = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
engDate = engDate.match(/(\w+) (\d+), (\d+)/);
return [engDate[2], (m.indexOf(engDate[1]) + 1), engDate[3]];
}
function match(str, expr) { str = str ? str.match(expr) : str; return (str && str.length > 1) ? str[1] : ''; }
function getParameterByName(name) {
/* http://james.padolsey.com/javascript/bujs-1-getparameterbyname/ */
var match = RegExp('[?&]' + name + '=([^&]*)')
.exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/gi, ' '));
}
function cleanText(text) {
return text
.replace(/ |\u202B-\u202d/gm, " "
.replace(/\s+/gm, ' '))
.replace(/&[mn]dash;/g, '-')
.replace('"', '"')
.replace(' ', ' ')
.replace('״', '"')
.replace('׳', "'")
.replace(/(\n|\r)/g, ' ')
.replace(/=/g, "{{=}}")
.replace(/''/g, '"')
.replace(/((?<!עיתונות)\|\|?)/gm, function (x) { return "{{" + x.replace(/\|/g, "!") + "}}"; })
.replace(/[\u200B\u200E\u200F\u2028\u202A\u202B\u202C\u202D\u202E]/g, '') // remove invisible Unicode control characters
.replace(/ {2,}/g, ' ');
}
function getWikiLink() {
var result = '',
oldid = getParameterByName('oldid') || getParameterByName('diff');
if (window.location.host == 'yi.hamichlol.org.il' && oldid) {
var oldComment = '';
oldComment = window.prompt("קעפּל פאַר די לינק. קען בלייבן ליידיג.", oldComment);
result = '{{הבדל בין גרסאות|' + getParameterByName('title') + '|' + oldid + '||' + (oldComment ? oldComment : 'הבדל בין גרסאות') + '}}';
} else {
var nms = {
'yi.hamichlol.org.il': '',
'www.hamichlol.org.il': 'ע:',
'he.wikiquote.org': 'q:',
'he.wikisource.org': 's:',
'en.wiktionary.org': 'wikt:'
},
wikinamespace = document.querySelector('.mw-page-title-namespace'),
wikiname = document.querySelector('.mw-page-title-main'),
wikiarticle = wikiname ? wikinamespace ? wikinamespace.textContent + ':' + wikiname.textContent : wikiname.textContent : null,
wikitype = nms[window.location.host];
if (wikitype != undefined && wikiname) {
result = '[[' + wikitype + wikiarticle + (wikitype ? '|' + wikiname.textContent : '') + ']]';
}
}
if (result) {
if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", result) != null) {
$('<input>').val(result).appendTo('body').select();document.execCommand('copy');
}
return true;
}
return false;
}
if (window.location.host.indexOf('he.wik') == 0) {
if (getWikiLink()) {
return true;
}
}
var VE = ', ',
TODAY = 'היינט',
YESTERDAY = 'נעכטן';
var data = [
{
hostname: "www.kore.co.il",
params: [
{ str: 'כל רגע' },
{ telem: 'article p.extraInfo span:nth-child(1)' },
{ telem: 'article h1' },
{ url: 1, match: /viewArticle\/(\d+)/ },
{ telem: 'article p.extraInfo span.pull-left' , match:/(.*)\|/}
]
},
{
hostname: /yediot(h)?(.ynet)?\.co\.il/,
params: [
{ str: "ידיעות אחרונות" },
{ telem: ".ya-author-additional" },
{ telem: ".ahya-title" },
{ var: "dcContentID" },
{ telem: ".ahya-date", date: '.' }
]
},
{
hostname: /www\.ynet\.co\.il/, minimum: 4,
params: [
{ str: 'ynet' },
[
{ elements: ['.authorHtmlCss', VE] },
{ telem: 'td:has(h1:first) .text14:first', match: /^(.{0,100})$/ },
{ elem: 'font.text14 span p:last', match: /^\((.*?)\)$/ },
{ telem: "style+span a[href^='http://www.ynet.co.il/tags/']" }, // for ynet bug
{ telem: ".text16w", match: /\/(.*?)$/ },
{ telem: ".text16w" },
{ telem: ".art_header_footer_author span", remove: ['ynet'] },
{ attr: ["meta[property='vr:author']", 'content'], remove: ['מערכת ONE'] }
],
[
{ telem: '.art_header_title' },
{ attr: ["meta[property='og:title']", "content"], remove: [/ - אוכל - ynet.*/] },
{ elem: 'head>title', match: /(?:ynet\s*-?)?([^\-]*)/ },
{ telem: 'h1' },
{ elem: 'font.leshonit' }
],
[
{ url: 1, match: /L-(.*?),/ },
{ url: 1, match: /co\.il\/(.*)/, remove: ['#autoplay'] } ],
[
{ url: 1, match: /co\.il\/((?:ency)\/.*?html?)/, prefix: "תאריך=", func: function(s) { return s ? 'ללא' : ''; }},
{ elem: 'td:has(h1:first) .text12g:last', date: '.' },
{ elem: ".text12g + .text12g", date: '.' },
{ elem: ".art_header_footer_author:last", date: '.' },
{ elem: ".ArticleHeaderComponent .date", date: '.'},
{ elem: ".authoranddate .date", date: '.'},
{ elem: ".authoranddate .date", stringDate: true, func: function(s) { return !s || s.indexOf('אתמול') > -1 ? YESTERDAY : TODAY; } }, // contains "אתמול" for yesterday, nothing for today
{ elem: ".date", date: '.' }
]
]
},
{
hostname: /(www|jerusalem|krayot|kibbutz|rishon|hadera|netania|netanya|herzliya|holon|petahtikva|batyam|roshhaayin|kfarsaba|hodhasharon|rehovot|raanana|afula|emek|haifa|beersheva)\.mynet\.co\.il$/i,
params: [
{ str: 'mynet3' },
{ attr: ["meta[property='channel-name']", "content"] , remove: ['MYNET ', 'mynet ', 'מיינט '], func:function(s) { return s=='עפולה ועמק'?'העמק':s; } },
{ telem: 'div.authors' },
{ telem: 'h1.mainTitle' },
{ url: 1, match: /article\/(.*)$/ },
{ telem: 'div.date:last', date: '.' }
]
},
{
hostname: /^\w+\.walla\.co\.il$/,
params: [
{ str: 'וואלה' },
[
{ telem: 'div.writers-names', remove: [/מערכת וואלה[א-ת ]+/] },
{ telem: 'div.author' },
{ telem: '.info .author:first, .provider', match: /^([^\|]*)/ },
{ telem: 'div.wp-0-b:first span:first', match: /מאת:(.*),/ },
{ telem: '.author > div', match: /^([^\|]*)/, remove: [/מערכת וואלה[א-ת ]+/] }
],
{ attr: ["meta[property='og:title']", "content"], remove: [ / - וואלה!?.*/ ] },
[
{ url: 1, match: /item\/(\d+)/ },
{ url: 1, match: /w=\/\d*\/(\d+)/ },
{ url: 1, match: /break\/(\d+)/ }
],
[
{ ldjson: { key: 'datePublished' } },
{ telem: '.info .date:first', match: /, (\d+ ב.*? \d+),/ },
{ elem: ["h1", "parent", "children", "eq,2"], match: /,(.*),/, shouldnt: "online_presence" },
{ telem: ".w2.txt-w:last", match: /, (\d+ ב.*? \d+),/ }
]
]
},
{
hostname: "www.haaretz\\.(co\\.il|com)",
params: [
{ str: 'הארץ' },
[
{ var: ['articlePage', 'dimension1'] },
{ telements: ["header address", VE] },
{ telem: 'address > a' },
{ attr: ["meta[name='author']", "content"] },
{ telem: 'main > div > section > div > div > a' },
{ telem: 'address' } ],
[
{ telem: 'header h1' },
{ attr: ['meta[property="og:title"]', 'content'] }
],
{ url: 1, match: /([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})/, addParam: 'gift' },
[
{ telem: "header time", date: '.' },
{ telem: 'time', date: '.' },
{ telem: 'time', remove: [/\d\d\:\d\d\, /, /\d{1,2}:\d\d [apmAPM]{2} [a-zA-Z]{3}/], removeDatePadding: true }
]
]
},
{
hostname: "www.ice.co.il",
params: [
{ str: 'אייס' },
{ telem: '#article-container div.credit span:first a', remove: ['מערכת ice'] },
{ telem: '#article-container div.col-lg-12 h1' },
{ url: 1, match: /article\/(\d+)/ },
{ telem: '#article-container div.credit time span:first', date: '/' }
]
},
{
hostname: "www.kan.org.il",
params: [
{ str: 'כאן' },
[
{ telem: '.story_autor_name' },
{ telem: '#progBrodcaster'},
{ telem: '.name'}
],
[
{ telem: '.story_title' },
{ telem: '#progName'},
{ attr: ["meta[property='og:title']", "content"] }
],
[
{ url: 1, match: /org\.il\/(.*p-\d{4,}.*)/ },
{ url: 1, match: /(\d+)/ }
], [
{ telem: '.story_autor_date' },
{ telem: '.player_time', date: '.' },
{ attr: ["div[class='date date-local']", "data-date-utc"], date: '.' },
{ attr: ["*[class='date-local']", "data-date-utc"], date: '.' }
],
{ url: 1, match: /org\.il\/(.+?)\// }
]
},
{
hostname: "archive.kan.org.il",
params: [
{ str: 'כאן ארכיון' },
{ attr: ["meta[property='og:title']", "content"], remove: ['כאן ארכיון |'] },
{ url: 1, match: /(\d+)/ },
{ telem: 'span.itemPageDate', remove: ['תאריך שידור:'], date: '.' }
]
},
{
hostname: "13news.co.il", hrefmatch: /10news\//i,
params: [
{ str: 'ערוץ עשר' },
{ telem: 'li:contains("כתבים: ") + li' },
{ telem: 'h1' },
{ url: 1, match: /\/(\d+)$/ },
{ telem: 'li:contains("פורסם ב: ") + li', date: '/' },
{ url: 1, match: /\/([^\/]*?)\/\d+$/, defvalue: 'news' }
]
},
{
hostname: "13news.co.il", hrefmatch: /ntr\-/i,
params: [
{ str: 'נענע10' },
{ telem: '#author-and-date > ul', remove: ['חדשות nana10']},
{ telem: '#article-title' },
{ url: 1, match: /il\/.*\/ntr-(\d+)/ },
{ telem: '.time-updated', date: '.' }
]
},
{
hostname: "(13news.co.il|13tv.co.il)",
params: [
{ str: 'חדשות 13' },
{ ldjson: { key: 'author' } },
[
{ telem: 'h1#article-title' },
{ telem: 'h1' }
],
[
{ url: 1, match: /il\/(.*?)\/$/ },
{ attr:['meta[property="og:url"]', 'content'], match:/il\/(.*?)\/$/}
],
[
{ ldjson: { key: 'datePublished' } },
{ telem: 'li:contains("פורסם ב: ") + li', date: '/' }
],
[
{ url: 1, match: /\/([^\/]*?)\/\d+$/, defvalue: 'news' }
]
]
},
{
hostname: "mida.org.il",
params: [
{ str: 'מידה' },
{ telem: '.author', prefix: "כותב=" },
{ telem: '.entry-title', prefix: "כותרת=" },
{ elem: 'body', prefix: "מספר כתבה=", match: /post-(\d+)/ },
{ telem: '.published', prefix: "תאריך=", date: '/' }
]
},
{
hostname: "www.inn.co.il",
params: [
{ str: 'ערוץ7' },
[
{ telem: '.article-credit--author', remove: ['ערוץ 7'] },
{ telem: '.article-info--author', remove: ['ערוץ 7'] }
],
{ telem: 'h1.article-title' },
{ url: 1, match: /^.*\/(.*)$/ },
[
{ telem: '.article-date-gregorian', date: '.' },
{ telem: '.article-date-gregorian-date', date: '.' }
],
{ url: 1, match: /.*(flashes).*/ }
]
},
{
hostname: "www.globes.co.il",
params: [
{ str: 'גלובס' },
[
{ attr: ["meta[property='article:author']", "content"] },
{ ldjson: { key:'author' } }
],
{ elem: '#F_Title, .mainArticletitle' },
{ url: 1, match: /=(\d+)/ },
[
{ elem: '.articleInfo .timestamp, #coteret_Modified, #F_Modified_on, .g_Article_DateTime', date: '/' },
{ attr: ["meta[name='article_created']", "content"], date: '/' },
{ telem: '.articleInfo .timestamp', date: '.'}
]
]
},
{
hostname: "www.the7eye.org.il",
params: [
{ str: 'העין השביעית' },
{ telem: "article a[rel='tag'], article a[href*='/writer/']" },
{ telem: "h1.headline" },
{ url: 1, match: /\/www\.the7eye\.org\.il\/(\d+)/ },
{ telem: "article span.date", date: '.' }
]
},
{
hostname: "www.bhol.co.il",
params: [
{ str: 'בחדרי חרדים' },
{ ldjson: { key:'author' } },
{ attr: ["meta[property='og:title']", "content"], remove:[' - בחדרי חרדים'] },
[
{ url: 1, match: /news\/(\d+)/ },
{ var: 'userid' }
],
{ ldjson: { key:'datePublished' } }
]
},
{
hostname: "www.now14.co.il",
params: [
{ str: 'עכשיו 14' },
{ telem: '.author-zone', remove: [/(:?חדשות|עכשיו) 14.*/] },
{ telem: '.post-title' },
{ url: 1, match: /il\/(.+?)\// },
{ telem: '.date-zone', date: '/' }
]
},
{
hostname: "iaf.org.il",
params: [
{ str: 'אתר חיל האוויר' },
[
{ telem: '#ctl00_headerCPH_uc_newStyleHeader_divOuther' },
{ telem: '.credits_line > .line' }
],
[
{ telem: '#ctl00_ContentPlaceHolder1_general_h2Title' },
{ telem: '.inner_bit_page_text_holder > h2' },
{ attr: ["meta[name='og:title']", "content"] }
],
{ url: 1, match: /(\d+-\d+)-/ },
[
{ telem: '#ctl00_headerCPH_uc_newStyleHeader_publishDate', date: '.' },
{ telem: '.curr_issue_title > ._date', date: '/' }
]
]
},
{
hostname: "actv.haifa.ac.il",
params: [
{ str: 'הערוץ האקדמי' },
{ elements: ["#ctl00_ContentPlaceHolder_Content_Repeater_Humans_ctl00_HyperLink_Human_Name", VE] },
{ elem: '#ctl00_ContentPlaceHolder_Content_Label_Title' },
{ urlparam: 'it' },
{ elem: "#ctl00_ContentPlaceHolder_Content_Label_DateBroadcast", remove: ["תאריך הקלטה:"], date: '/' }
]
},
{
hostname: "www.mouse.co.il", //only "CM.articles" have a template!
params: [
{ str: 'עכבר העיר' },
{ telem: "address.u-d--i > span:nth-child(1)", remove: [", עכבר העיר אונליין", ', עכבר העיר'] },
{ telem: ".katava-box.box h1, h1" },
{ url: 1, match: /(\d+\.\d+)$/ },
[
{ elem: "p.katava-info:first", match: /^\W+ (\d+ \W+ \d+)/ },
{ elem: "p.katava-infoVer2:first", match: /^יום \W+ (\d+ \W+ \d+)/ }
]
]
},
{
hostname: "www.makorrishon.co.il", condition: function () { return ($("h1:first").length > 0 && location.pathname.startsWith('/nrg/')); }, minimum: 7,
params: [
{ str: 'nrg' },
[
{ elem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a", match:/<!-- ARTICLE_WRITER_START -->(.*)<!-- ARTICLE_WRITER_END -->/ },
{ telem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a" }
],
[
{ var: 'titleName'},
{ elem: 'h1', match: [/<!-- ARTICLE_TITLE_START --> (.*?)<!-- ARTICLE_TITLE_END -->/, /(.*?) \|/] }
],
[
{ url: 1, match: /(\d+\/\d+)\.html/ },
{ url: 1, match: /\/(\d+)\/$/ }
],
[
{ elem: "#articleCBar span:first, .articleBar h4:first", date: '/' },
{ telem: ".jeg_meta_date", date: '-' },
{ elem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a", match:/<!-- ARTICLE_DATE_START -->(.*)<!-- ARTICLE_DATE_END -->/, date: '/'}
],
[
{ url: 1, match: /online\/(.*?)\/ART/ },
{ url: 1, match: /il\/(.*?)\/\d+\/$/ }
],
{ url: 1, match: /ART(\d+)/ }
]
},
{
hostname: "www.makorrishon.co.il", condition: function () { return !location.pathname.startsWith('/nrg/'); }, minimum: 3,
params: [
{ str: 'מקור ראשון' },
{ telem: "#articleCBar span:first, .cdat.small.bold, .articleBar h4:first, .jeg_meta_author a" },
{ telem: "h1:first" },
{ url:1, match: /makorrishon\.co\.il\/(.*?)\/?$/ },
[
{ telem: ".jeg_meta_date", date: '-' },
{ attr: ["meta[property='article:published_time']", "content"], date:['-',[2,1,0]] },
{ telem: ".jeg_meta_date", date:['/',[1,0,2]] }
]
]
},
{
hostname: "www.nrg.co.il", condition: function () { return ($("h1:first").length == 0); }, minimum: 7,
params: [
{ str: 'nrg' },
[
{ telem: "font.newsVitzCredit", remove: ["NRG מעריב"] },
{ elem: "td.newsVitzCredit", match: /^(.*?)<br>/, remove: ["NRG מעריב"] },
{ telem: "font.newsVitzBody:first", match: /^(.*)/, remove: ["NRG מעריב"] }
],
{ telem: "#titleS1" },
{ url: 1, match: /(\d+\/\d+)\.html/ },
[
{ telem: "font.newsVitzCredit:last, .opinionMainVitzBody", date: '/' },
{ telements: ["td.newsVitzCredit", ""], date: '/' }
],
{ url: 1, match: /online\/(.*?)\/ART/ },
{ url: 1, match: /ART(\d+)/ }
]
},
{
hostname: "www.one.co.il",
params: [
{ str: 'one' },
{ elem: ".article-credit > a", match: /^.*$/gm, remove: ["מאת מערכת ONE", "מאת ", "מערכת ONE", "</a>"] },
{ telem: "h1, #_ctl0_Main_ucFullArticle_lblCaption, #_ctl0_Main_ucFullArticle_lbColCaption" },
{ url: 1, match: [/Article\/\d\d\-\d\d\/\d,\d+,\d+,\d+\/(\d+)/i, /Article\/(\d+)/i, /id=(\d+)/] },
{ elem: ".article-credit > time", date: '/' }
]
},
{
hostname: "www.israelhayom.co.il",
params: [
{ str: 'ישראל היום' },
[
{ telem: ".normal14 .normal, .content li.taxonomy-term-reference-0, .views-field-name .field-content", remove: [/(:?כתבי|מערכת) ישראל היום/] },
{ ldjson: { key:'author'}, remove: [/(:?כתבי|מערכת) ישראל היום/] }
],
[
{ attr: ['meta[property="og:title"]', 'content'], remove:[' | ישראל היום'] },
{ telem: ".pane-title" }
],
{ url: 1, match: /israelhayom.co.il\/(.*)$/ },
[
{ ldjson: { raw: ['publisher', 'datePublished'] }, date:['-', '210'] },
{ elem: '.single-post-meta-dates > time', date: '/' },
{ elem: '.time', date: '.' }
]
]
},
{
hostname: "www.mako.co.il",
params: [
{ str: 'mako' },
[
{ elements: ['.writerData *:visible:first a', VE], shouldnt: /\d+\/\d+\/\d+/ },
{ telem: 'span.katav', match: /^(.*?),?\s?$/ },
{ attr:['span[itemprop=author]', 'content'] }
],
[
{ telem: '.panel-pane.pane-node-content .pane-title'},
{ telem: ".article.clearer h1" },
{ telem: "h1" }
],
{ url: 1, match: /Article-(.*?).htm/ },
{ url: 1, match: /www\.mako\.co\.il\/(.*?)\/Article/ },
[
{ elem: ".writerData *:last", date: '/' },
{ elem: "span.displayDate", date: '/' },
{ attr: ["meta[property='article:published_time']", "content"], date:['-',[2,1,0]] }
]
]
},
{
hostname: /^\w+\.themarker\.com$/i,
params: [
{ str: 'TheMarker' },
[
{ telements: [".prsnlArticleEnvelope .autorBarAnchor, .prsnlArticleEnvelope .autorBarWriters", VE], remove: ["מאת:"] },
{ attr: ['meta[name="author"]', "content"] },
{ telem: "a.author-bar li:eq(2), .h3_author", remove: ["מאת:"] },
{ telem: "div.art__info address" },
{ var: ["_sf_async_config","authors"] }
],
[ { var: ['articlePage', 'name'] },
{ telem: "header > h1" },
{ telem: "header > div > h1" },
{ attr: ['meta[property="og:title"]', 'content'] },
{ telem: "h1.h-mb--xxtight, h1.mainTitle" },
{ telem: "h2" }
],
{ url: 1, match: /^.*\/(.+?)\/?$/ },
[
{ attr: ["meta[property='article:published']", "content"], date:['-',[2,1,0]] },
{ telem: ".author-bar li:eq(1), .h3_date, div.art__info time", date: '.' },
{ telem: ".inner_bar", date:'/'},
{ telem: 'time', remove: [ /\d\d\:\d\d\, /, /.*• / ], removeDatePadding: true }
],
{ url: 1, match: /\/\/(.*?).themarker/i, defvalue: "www" }
]
},
{
hostname: "www.calcalist.co.il", minimum: 5,
params: [
{ str: 'כלכליסט' },
[
{ telem: ".shahor.art-author" },
{ telem: ".calcalistArticleHeader_footer .authors" },
{ telem: "span.authorArticle" }
],
{ telem: "h1" },
[
{ url: 1, match: /L\-(\d+)/ }, { attr: ["link[rel='alternate']", "href"], match: /guid=(\d+)/},
{ url: 1, match: /calcalist\.co\.il\/(.*?\/article\/.*)/i }
],
[
{ telem: ".art-publish-date.afor > .l-date:last", date: '.' },
{ telem: ".calcalistArticleHeader_footer .date", date: '.'},
{ telem: "span.art-publish-date", date: '.'}
]
]
},
{
hostname: "newmedia.calcalist.co.il",
params: [
{ str: 'מוסף כלכליסט' },
{ telem: ".credit" },
[
{ telem: "div.head-container > h1.head-2" },
{ attr: ['meta[property="og:title"]', 'content'], remove: [' | מוסף כלכליסט'] }
],
{ url: 1, match: /\.il\/magazine-(.*?)\.html/ }
]
},
{
hostname: "www.news1.co.il",
params: [
{ str: 'NFC' },
{ telem: "#ctl00_ContentMain_UcArticle1_lnkWriterName, #ctl00_ContentMain_UcArticle1_lblTopWriterName", remove: ["מחלקה ראשונה"] },
{ attr: ['meta[property="og:title"]', 'content'] },
{ url: 1, match: /ve\/(.*?)\.html/ },
{ telem: "#ctl00_ContentMain_UcArticle1_lblCreateDate", date: '/' }
]
},
{ //even this is not exactly "External Link Template"
hostname: "aleph.nli.org.il",
params: [
{ str: 'צ-מאמר' },
{ telem: "#fullRecordView th:contains(מחבר):first + td", func: function (str) { var strs = str.match(/^(.*?), (.*?)$/); return (strs.length == 3) ? (strs[2] + " " + strs[1]) : str; } },
{ telem: "#fullRecordView th:contains(כותר):first + td", match: /^(.*?)\.?[\s\u202c]*$/ },
{ telem: "#fullRecordView th:contains(בתוך):first + td", match: /^(.*?) \(/ },
{ str: '' },
{ telem: "#fullRecordView th:contains(בתוך):first + td", match: /\((.*?)\)/, func: function (yh) { return yh.substring(0, yh.length - 1) + '"' + yh.substr(yh.length - 1); } },
{ telem: "#fullRecordView th:contains(בתוך):first + td", match: /(\d+\-\d+)/ },
{ telem: "#fullRecordView th:contains(מס' מערכת):first + td", prefix: "רמבי=" }
]
},
{
hostname: "www.yeshiva.org.il", hrefmatch: /\/midrash\/shiur\.asp\?id=\d+/i,
params: [
{ str: 'אתר ישיבה1' },
{ telem: ".trav", remove: ["הרב"] },
{ telem: "h1" },
{ urlparam: "id" }
]
},
{
hostname: "www.sport5.co.il",
params: [
{ str: 'ספורט 5' },
{ ldjson: { key: 'author' }, remove: ["מערכת אתר ערוץ הספורט"] },
{ telem: "h1.article-main, h1#divTopTitle" },
[
{ url: 1, match: /Article\.\d+\.(\d+)\.html/ },
{ url: 1, match: /docID=(\d+)/i }
],
[
{ url: 1, match: /Article\.(\d+)\.\d+\.html/ },
{ url: 1, match: /FolderID=(\d+)/i }
],
[
{ telem: "#lblDate2", date: '/' },
{ telem: ".hint", date: '.' }
]
]
},
{
hostname: "britishpathe.com",
hrefmatch: /britishpathe\.com/i,
params: [
{ str: 'British Pathe' },
{ telem: "#record-container>h1", remove: ["video newsreel film"] },
{ urlparam: 'id' },
{ telem: "#researcher-stats td:eq(0)", date: '/' }
]
},
{
hostname: "www.idf.il",
params: [
{ str: 'אתר צה"ל' },
{ telem: ".article-primary p strong:eq(0)", match: /(.+)\|/ },
{ telem: "h1" },
[
{ attr: ["body", "data-uid"] },
{ url: 'decodeURI', match: /idf\.il\/(.*)$/ }
], [
{ telem: ".article-primary p strong:eq(0)", date: '.' },
{ attr: ['meta[property="article:published_time"]', 'content'], match: /(\d+\s+.*?\s+\d{4})/ },
{ telem: ".rating-article > .rating-item", date: '.' }
]
]
},
{
hostname: "www.kikar.co.il",
params: [
{ str: 'כיכר השבת' },
{ attr: ["meta[name='author']", "content"] },
{ telem: 'h1.MuiTypography-h1' },
[
{ url: 1, match: /il\/.*?\/(\d*)/ },
{ url: 1, match: /il\/(.*)/ }
],
{ attr: ["meta[name='article:published_time']", "content"], date:['-', '210'] },
]
},
{
hostname: "www.kipa.co.il",
params: [
{ str: 'כיפה' },
{ telem: "author", remove: ["מערכת כיפה", ", כיפה"] },
{ telem: "h1" },
{ url: 1, match: /co\.il\/(.+)/ },
{ telem: "p.scheme-author > span", date: '/' }
]
},
{
hostname: "www.hebpsy.net",
params: [
{ str: 'פסיכולוגיה עברית' },
{ attr: ["meta[name='auhtor']", "content"] },
{ telem: "h2.head" },
{ urlparam: 'id' },
{ telem: ".body_textarea:first > div:last", func: function (str) { var arr = str.match(/(\d+)..([א-ת]+)..(\d+)/); return arr[1].replace(/^0+/, '') + " ב" + arr[2] + " " + arr[3]; } } //it's not space but other character
]
},
{
hostname: "www.hayadan.org.il",
params: [
{ str: 'הידען' },
{ telem: "a[rel='author'], span.author, li[itemprop='author']", remove: ["מאת "] },
{ telem: "h1.entry-title, h1.single-title, div.title-primary, span.breadcrumb_last" },
{ url: 1, match: /https?:\/\/www.hayadan\.org\.il\/(.*?)$/i },
[
{ telem: "span.meta-date, span.date" },
{ telem: ".entry-header .published" },
{
attr: ['meta[property="article:published_time"]', 'content'],
func: function(s) { return dateFormat(new Date(s).toLocaleDateString('he').split('.')); }, // just for after 22:00 articles as https://www.hayadan.org.il/colluns-astronauts-are-not-celebs-2307093
}
]
]
},
{
hostname: "hebrewbooks.org", hrefmatch: /org\/\d/,
params: [
{ str: 'היברובוקס' },
{ telem: "span.authorname" },
{ telem: "span.sefername" },
[
{ urlparam: 'req' },
{ url: 1, match: /hebrewbooks\.org\/(\d+)$/i }
],
{ telem: "#cpMstr_lblHebPlace:first", prefix: 'מקום הוצאה=' },
{ telem: "#cpMstr_lblHebDate:first", prefix: 'שנת הוצאה=' }
]
},
{
hostname: "hebrewbooks.org", hrefmatch: /pgnum/,
params: [
{ str: 'היברובוקס' },
{ telem: "span.authorname" },
{ telem: "span.sefername", remove: "-----" },
[
{ urlparam: 'req' },
{ url: 1, match: /hebrewbooks\.org\/(\d+)$/i }
],
{ urlparam: 'pgnum', prefix: 'page=' }
]
},
{
hostname: "www.izkor.gov.il",
params: [
{ str: 'יזכור' },
{ url: 1, match: /gov\.il\/(.*)/, func: function (val) { return val.replace(/%20/, '%2520'); } },
{ url: 1, match: /gov\.il\/(.*?)\// }
]
},
{
hostname: "hebrewbooks.org", hrefmatch: /p/,
params: [
{ str: 'היברובוקס' },
{ telem: "span" },
{ telem: "title", remove: "HBreader - " },
{ urlparam: 'sfid' },
{prefix: 'page=', url: 1, match:/p\=(\d+)/i, remove: "contents not available "},
]
},
{
hostname: "library.alhatorah.org",
params: [
{ str: 'על התורה' },
{ },
{ telem: "span.SP-title-text" },
{ urlparam: '?r1' },
]
},
{
hostname: "www.kolhalashon.com", hrefmatch: /RavInfoD/,
params: [
{ str : 'קול הלשון'},
{ urlparam: 'RavID', prefix: '3=' }
]
},
{
hostname: "www.kolhalashon.com", hrefmatch: /PlayShiur/,
params: [
{ str: 'קול הלשון'},
{ elem: '#ctl00_TopInternalPage_c_RavName', perfix: '|' },
{ elem: '#ctl00_TopInternalPage_c_ShiurTitle', perfix: '|' },
{ urlparam: 'FileName', perfix: '|'}
]
},
{
hostname: "www.izkor.gov.il", hrefmatch: /HalalKorot/i,
params: [
{ str: 'נזכור את כולם' },
{ urlparam: "id" },
{ attr: ['#ctl00_ctl00_MainContent_MainContent_HiddenFieldFullName', 'value'] },
{ prefix: 'מלא=', str: 'כן' }
]
},
{
hostname: "tchelet.org.il",
params: [
{ str: 'תכלת' },
{ telem: "h2 + a.author" },
{ telem: "h2" },
{ urlparam: "id" },
{ telem: "#themag" }
]
},
{
hostname: 'www.nli.org.il',
params: [
[
{
//just to reload ld+json
func:function() {
$('script[type="application/ld+json"]').remove();
if (location.pathname == "/he/newspapers/") {
window.canonical_url = $('link[rel="canonical"]').attr('href');
} else {
window.canonical_url = location.pathname;
}
var new_ldjson = $($.ajax({ url: window.canonical_url, async:false }).responseText).filter('script[type="application/ld+json"]');
console.log(new_ldjson);
$('head').prepend(new_ldjson);
}
},
{ var:'canonical_url', match:/newspapers\/(.*?)\//, func:function(s) { return {
'ahj': 'החרות ירושלים',
'ahr': 'על המשמר',
'ajns': 'עיתונות|ajns',
'ashnav': 'אשנב',
'baderech': 'עיתונות|baderech',
'bamar': 'במערכה',
'dav': 'דבר',
'dhy': 'דואר היום',
'dmt': 'מאמענט',
'dnajlb': 'עיתונות|dnajlb',
'emda': 'עמדה',
'eretzh': 'עיתונות|eretzh',
'etger': 'עיתונות|etger',
'frw': 'פארווערטס',
'haa': 'המאסף',
'haam': 'העם עיתון לאומי',
'hadashot': 'חדשות',
'hadorkrakow': 'עיתונות|hadorkrakow',
'hadt': 'האחדות',
'haibri': 'העברי',
'ham': 'העם',
'haolam': 'העולם',
'haretz': 'הארץ1',
'has': 'השומר הצעיר ורשה',
'haschiloah': 'השילוח1',
'haumaisr': 'האומה1',
'hayal': 'לחייל',
'hayomisr': 'עיתונות|hayomisr',
'hayomw': 'היום וורשה',
'hazit': 'החזית',
'hbkr': 'הבקר',
'hcl': 'הכרמל',
'heatid': 'עיתונות|heatid',
'hebrew': 'שרהזאהן',
'hed': 'הד המזרח',
'hegeh': 'עיתונות|hegeh',
'hhr': 'הפועל הצעיר',
'hlb': 'הלבנון',
'hma': 'קואינקה',
'hmd': 'המודיע',
'hmf': 'המשקיף',
'hmi': 'המזרחי',
'hmz': 'המליץ',
'hrt': 'חרות',
'hsk': 'השקפה',
'hym': 'היום',
'hyt': 'היינט',
'hzan': 'חזית העם',
'hzf': 'הצפירה',
'hzfn': 'הצפון',
'hzfwar': 'עיתונות|hzfwar',
'hzh': 'הצופה',
'hzn': 'הזמן',
'hzt': 'חבצלת',
'hzv': 'הצבי',
'iva': 'עברי אנכי',
'khm': 'קול העם',
'kmd': 'קול מחזיקי הדת',
'kmv': 'קול מבשר',
'kolhair': 'כל העיר1',
'kotert': 'כותרת ראשית',
'ktuvim': 'כתובים',
'lbf': 'לעבנס-פראגן',
'lmrv': 'למרחב',
'ltb': 'ליטערארישע בלעטער',
'mad': 'מחזיקי הדת',
'mahanayim': 'מחניים',
'mar': 'מעריב',
'mgd': 'המגיד',
'mrh': 'מוריה',
'mzp': 'המצפה',
'omer': 'אמר',
'pisgoh': 'הפסגה',
'shar': 'שערים',
'sulm': 'סלם',
'yarden': 'הירדן',
'yomyom': 'יוםיום',
'ytlv': 'ידיעות תל אביב',
'zim': 'עיתונות|zim',
'zmanim': 'זמנים'
}[s.toLowerCase()]; } }
],
{ ldjson:{ raw: 'author' }, func: function (str) { return window.prompt("שם מחבר", str!='N/A'?str:''); } },
{ ldjson:{ raw: 'name' }, func: function (str) { return window.prompt("כותרת הדף", str); } }, // $('.pageblockselected').attr('title')
{ var: 'canonical_url', match: /newspapers\/\w+\/(\d+\/\d+\/\d+)\//, remove: '///'},
{ var: 'canonical_url', match: /article\/(\d+\.?\d*)(\/|$)/ }
]
},
{
hostname: "blog.nli.org.il",
params: [
{ str: 'הספרנים' },
{ var: ['nliLayersActiveItem', 'data_order'], func: function(itemid) { return document.querySelector('.article-items > article:nth-of-type(' + itemid + ') .entry-meta span:nth-of-type(1)').textContent; } },
{ var: ['nliLayersActiveItem', 'data_order'], func: function(itemid) { return document.querySelector('.article-items > article:nth-of-type(' + itemid + ') .entry-title').textContent; } },
{ var: ['nliLayersActiveItem', 'data_url'], remove: [ /^\//, /\/$/ ] },
{ var: ['nliLayersActiveItem', 'data_order'], func: function(itemid) { return document.querySelector('.article-items > article:nth-of-type(' + itemid + ') .entry-meta span:nth-of-type(2)').textContent; }, date: '.' }
]
},
{
hostname: "www.pc.co.il",
params: [
{ str: 'אנשים ומחשבים' },
{ attr: ["meta[name='author']", "content"] },
[
{ telem: ".post_header > h2:nth-child(2)" },
{ telem: "h1.title-post" }
],
[
{ urlparam: 'p' },
{ url: 1, match: /\/(\d+)\/$/ }
],
{ telem: "span.date", match: /(\d+ ב[א-ת]+ \d+)/ }
]
},
{
hostname: "shironet.mako.co.il", hrefmatch: /type=lyrics/,
params: [
{ str: 'שירונט שיר' },
{ urlparam: 'wrkid' },
{ urlparam: 'prfid' },
{ telem: '.artist_song_name_txt' },
{ urlparam: 'lang', defvalue: '1' }
]
},
{
hostname: "shironet.mako.co.il", hrefmatch: /type=works/,
params: [
{ str: 'שירונט' },
{ urlparam: 'prfid', prefix: 'מספר=' },
{ telem: 'h1', prefix: 'שם=' }
]
},
{
hostname: 'www.sciam.co.il', hrefmatch: /%/,
params: [
{ str: 'סיינטיפיק אמריקן' },
{ telem: '.author-name' },
{ telem: '.entry-title' },
{ url: 1, match: /il\/(.+?)\// },
{ telem: '.entry-date', date: '.' }
]
},
{
hostname: "ratings.fide.com",
params: [
{ str: 'כרטיס פיד"ה' },
{ urlparam: 'event', prefix: '' }
]
},
{
hostname: "www.db.yadvashem.org",
params: [
{ str: 'מזהה חסיד אומות העולם' },
{ url: 1, match: /&itemId\=(\d+)/ }
]
},
{
hostname: "www.yadvashem.org",
params: [
{ str: 'מזהה חסיד אומות העולם' },
{ url: 1, match: /stories\/([a-z]+)/ },
{ prefix: 'עברית=', str: 'כן' }
]
},
{
hostname: "www.boxofficemojo.com",
params: [
{ str: 'מוג\'ו' },
{ urlparam: 'id', match: /(.*?)\.htm/ }
]
},
{
hostname: /article.yedioth?.co.il/,
params: [
{ str: 'ידיעות אחרונות' },
{ telem: '#lblAuthor' },
{ telem: '#lblTitle' },
{ urlparam: 'articleid' },
{ telem: '#lblDatePublished', date: '.' }
]
},
{
hostname: "www.0404.co.il",
params: [
{ str: '0404א' },
{ telem: '.post_admin', remove: ['חדשות 0404'] },
{ telem: '.stitle' },
{ urlparam: 'p' },
{ telem: '.post_date', date: '/' }
]
},
{
hostname: "ch10.co.il",
params: [
{ str: 'חרדים10' },
{ telem: '.author', remove: ['חרדים 10'] },
{ telem: '.main-post h1 a' },
{ url: 1, match: /news\/(\d+)/ },
{ telem: '.date', date: '.' }
]
},
{
hostname: 'www.iaa-archives.org.il',
params: [
{ str: 'רשות העתיקות' },
{ str: '{{ס:' + "שם הדף בלי הסוגריים}}" },
{ url: 1, match: /loc_id\=(\d+)/ },
{ url: 1, match: /\?id\=(\d+)/ }
]
},
{
hostname: /www\.maariv\.co\.il/,
params: [
{ str: 'מעריב אונליין' },
[
{ ldjson: { key: 'author' } },
{ telem: 'span.article-reporter a', remove: [ 'מעריב אונליין'] },
{ telem: 'a[rel=Author]' },
{ telem: '.article-date-report-wrap', match: /^.*\|(.*)$/m },
{ telem: 'span.article-reporter', remove: [ 'מעריב אונליין'] }
],
[
{ attr: ['meta[property="og:title"]', 'content'] },
{ telem: '.article-title' }
],
{ url: 1, match: /co\.il\/(.*)/ },
[
{ telem: '.article-date-time, .article-he-date', date: '/' },
{ telem: '.article-date-report-wrap', date: '/' },
{ telem: '.article-publish-date', date: '/' }
]
]
},
{
hostname: /sport1\.maariv\.co\.il/,
params: [
{ str: 'ספורט1' },
{ telem: '.authors:first-child', remove: ['מערכת ספורט 1'] },
{ telem: 'h1.entry-title' },
{ url: 1, match: /co\.il\/(.*)\// },
{ telem: '.entry-date', date: '.' }
]
},
{ // site changed their CSP and no longer supported // TODO: remove after 2024-08-31 if not fixed
hostname: "davidson.weizmann.ac.il", hrefmatch: /online/,
params: [
{ str: 'דוידסון' },
{ telem: 'span.name' },
{ attr: ['meta[property="og:title"]', 'content'] },
{ url: 1, match: /davidson\.weizmann\.ac\.il\/online\/(.*)$/ },
{ attr: ["meta[property='article:published_time']", "content"], date:['-',[2,1,0]] }
]
},
{
hostname: "alaxon.co.il",
params: [
{ str: 'אלכסון' },
{ telem: '.author' },
{ telem: 'h1' },
{ url: 1, match: /alaxon\.co\.il\/(.*)$/ },
[
{ attr: ["meta[property='article:published_time']", "content"], date:['-',[2,1,0]] },
{ telem: '.date', date: '.' }
]
]
},
{
hostname: "www.gvura.org",
params: [
{ str: 'אתר הגבורה' },
{ attr: ['input[name=hdaid]', 'value'] },
{ telem: 'h1' }
]
},
{
hostname: "www.srugim.co.il",
params: [
{ str: 'סרוגים' },
{ telem: '.post_author', match: /(.+?)\d/, remove: [', חדשות סרוגים', 'חדשות סרוגים'] },
{ telem: 'h1' },
{ url: 1, match: /\.srugim\.co\.il\/(.*)$/ },
{ telem: '.post_details', date: '.' }
]
},
{
hostname: 'otzar.org',
params: [
{ str: 'אוצר החכמה' },
[
{ urlparam: 'book', func: function (bookid) {
if (!bookid) try{ bookid = $('#book-iframe').attr('src').match(/book=(\d+)/)[1]; } catch(e) {}
if (bookid && location.hostname == 'tablet.otzar.org') {
window.detail_data =
JSON.parse($.post({ url: '//tablet.otzar.org/he/php/detailBook.php', async: false,
data:'{"ParamQuery":"{\\"NUMBOOK\\":\\"'+bookid+'\\",\\"USERDATAID\\":0}","sqlFile":"selectSubOfBook"}' }
).responseText).arr[0];
} else if (window.booknameS && window.authorS) {
bookid = bookid || window.bookid;
window.detail_data = {
AUTHOR: window.authorS,
FULLNAME: window.booknameS,
bookid: bookid
};
} else {
bookid = bookid || window.bookid;
var parts = $('title').text().replace(' - אוצר החכמה','').split('/'); // new pages (april 2022)
if (parts.length == 1) {
parts = document.querySelector('div.item-tab-con.active .tab-title').textContent.split('/'); // old pages (april 2022)
}
window.detail_data = {
AUTHOR: parts[1],
FULLNAME: parts[0],
YEAR: parts[2],
PrintedP_AND_YEAR: parts[0].split('-')[1],
bookid: bookid
};
}
} },
{ var: ['detail_data', 'AUTHOR'] }
],
{ var: ['detail_data','FULLNAME'] },
[
{ var: ['detail_data','bookid'] },
{ url: 1, match: /(?:book|b)\/(\d*)\// }
],
[
{ var: ['detail_data', 'PrintedP_AND_YEAR'] },
{ func: function () {
return [
window.detail_data['PrintedP'].match(/[\u0590-\u05FF ]+/)[0],
window.detail_data['YEAR']
].join(' ');
} },
{ var: ['detail_data', 'YEAR'] }
],
[
{ attr: ["ab", "value"], match: /^([^ ]*) /, prefix: 'page=' },
{ elem: ["#ab", "val"], prefix: 'page=', match: /^(\d+) / },
{ urlparam: 'pagenum', prefix: 'page=' },
{ attr: ['.nav-active', 'position'], prefix: 'page='}
]
]
},
{
hostname: "www.davar1.co.il",
params: [
{ str: 'דבר העובדים' },
[
{ attr: ['section', 'data-author_name'], remove: [ 'דבר ראשון', 'דבר העובדים' ] },
{ attr: ['article', 'data-author_name'], remove: [ 'דבר ראשון', 'דבר העובדים' ] }
],
[
{ telem: '.headline' },
{ telem: '.g-article-headline'}
],
{ url: 1, match: /www\.davar1\.co\.il(?:\/.*)?\/(\d+)/ },
[
{ attr: ['meta[itemprop="dateCreated"]', 'content'], date: '.' },
{ telem: '.g-article-date', date: '.' }
]
]
},
{
hostname: "www.youtube.com", hrefmatch: /youtube\.com\/watch\?v=.*/i,
params: [
{ str: "יוטיוב" },
{ urlparam: "v" },
{ telem: "player-microformat-renderer", func: function (str) { return JSON.parse(str).name; }, prefix: "שם=" },
{ telem: "player-microformat-renderer", func: function (str) { var dur = JSON.parse(str).duration.slice(2, -1), time = new Date(dur * 1000).toISOString(); return dur < 3600 ? time.substr(14, 5) : time.substr(11, 8); }, prefix: "לענג=" },
{ telem: "player-microformat-renderer", func: function (str) { return JSON.parse(str).author; }, prefix: "ערוץ=" }
]
},
{
hostname: "www.forbes.co.il",
params: [
{ str: "פורבס" },
{ telem: "#divforprint td.date", match:/.*\|(.*)$/ },
{ telem: "h1.newsTitle"},
{ url:1, match:/\?(.*)$/, prefix:'3=' },
{ telem: "#divforprint td.date", date:'/' , prefix:'4='}
]
},
{
hostname: "supremedecisions.court.gov.il",
params: [
[
{ func:function() {
var f = function(body_j, head_j) {
window.body_j = body_j; // just for debug
window.head_j = head_j; // just for debug
window.all_text = body_j.text();
if (!window.all_text)
return;
window.parsed_data = {
OTTER:
body_j.find('td:contains("העותר:"):first + td:first').first().text() ||
body_j.find('td:contains("העותרת:"):first + td:first').first().text() ||
body_j.find('td:contains("המערער:"):first + td:first').first().text() ||
body_j.find('td:contains("המערערת:"):first + td:first').first().text() ||
body_j.find('td:contains("המבקש:"):first + td:first').first().text()||
body_j.find('td:contains("המבקשת:"):first + td:first').first().text(),
MESHIV:
body_j.find('td:contains("המשיב:"):first + td:first').first().text() ||
body_j.find('td:contains("המשיבה:"):first + td:first').first().text(),
OTTERS:
head_j.find('meta[name="side_nm"]').map(function(m) {
return head_j.find('meta[name="side_ty"]:eq('+m+')').attr('content') == "תביעה" ? [
$(this).attr('content')
] : [];
}).toArray(),
};
if (window.parsed_data.OTTERS && !window.parsed_data.OTTER) {
window.parsed_data.OTTER = (window.parsed_data.OTTERS.length > 1) ?
(window.parsed_data.OTTERS[0].trim() + ' ואחרים') :
(window.parsed_data.OTTERS[0]);
}
};
if (!window.all_text) {
f($('body'), $('head'));
}
if (!window.all_text) {
var xhr = new XMLHttpRequest();
xhr.open('GET', location.href.replace('type=4','type=2'), true);
xhr.responseType = 'arraybuffer';
xhr.onload = function(e) {
if (this.status == 200) {
console.log('this.response', this.response, this);
var text;
if (new Uint8Array(this.response).indexOf(0) < 0) {
text = new TextDecoder("windows-1255").decode(this.response);
} else {
text = new TextDecoder("UTF-16LE").decode(this.response);
}
var head_as_div = '<div id="head>'+text.replace(/^[\s\S]*<head.*?>|<\/head>[\s\S]*$/ig, '')+'</div>';
var body_as_div = '<div id="body>'+text.replace(/^[\s\S]*<body.*?>|<\/body>[\s\S]*$/ig, '')+'</div>';
f($(body_as_div), $(head_as_div));
if (window.all_text)
wikiit(undefined, 1);
} else {
window.all_text = 'Error! ' + this.status;
}
};
window.popup_template_canceled = true;
xhr.send();
}
} },
{ str: "פס\"ד עליון" }
],
{ prefix:'קישור=', urlparam: 'fileName'},
{ prefix:'סוג=', var: 'all_text', match: /([^\s]+?)[\s]+\d+\/\d+/m},
[
{ prefix:'עותר=', var:['parsed_data', 'OTTER'] },
{ prefix:'עותר=', var: 'all_text', match: /המבקש(?:ים|ות)\:\s*1\.([\s\S]]+?)2\./m, func:function(s) { return s && (s.trim()+' ואחרים'); } },
{ prefix:'עותר=', var: 'all_text', match: /העותר(?:ים|ות)\:\s*1\.([\s\S]+?)2\./m, func:function(s) { return s && (s.trim()+' ואחרים'); } },
{ prefix:'עותר=', var: 'all_text', match: /המערער(?:ים|ות)\:\s*1\.([\s\S]+?)2\./m, func:function(s) { return s && (s.trim()+' ואחרים'); } }
],
[
{ prefix:'משיב=', var:['parsed_data', 'MESHIV'] },
{ prefix:'משיב=', var: 'all_text', match: /המשיב(?:ים|ות)[\s\S]*?1\.([\s\S]+?)2\./m, func:function(s) { return s && (s.trim()+' ואחרים'); } }
],
[
{ prefix:'ניתן ב=', var: 'all_text', match: /ניתן\s+היום,.*?\((.*?)\)/m, date:'.'}, // https://supremedecisions.court.gov.il/Home/Download?path=HebrewVerdicts\11/850/019/o24&fileName=11019850.o24&type=4
{ prefix:'ניתן ב=', var: 'all_text', match: /ניתנה\s+היום,.*?\((.*?)\)/m, date:'.'} // https://supremedecisions.court.gov.il/Home/Download?path=HebrewVerdicts\16/240/062/02c&fileName=16062240.02c&type=4
]
]
},
{
hostname: "www.colbonews.co.il",
params: [
{ str: 'כלבו'},
{ telem: '#post_author', remove: ['מאת:'] },
{ url: 1, match: /www\.colbonews\.co\.il\/(.*)\/$/ },
{ telem: '#post_h1' },
{ telem: '#post_time', date:'.' }
]
},
{
hostname: "space.gov.il",
params :[
{ str: "סלה" },
{ telem: "hrf" },
{ telem: "h1" },
{ url: 1, match:/(\d+)$/ },
{ telem: "span.date-display-single", date:'.' }
]
},
{
hostname: "lib.cet.ac.il",
params:[
{ str: "מטח" },
{ telem: ".TitleText", match: /מחבר.*?\:([\S\s]*)$/ },
{ telem: "title" },
{ urlparam: "item" }
]
},
{
hostname: "jdn.co.il",
params:[
{ str: "JDN"},
{ telem: "span.elementor-post-info__item--type-author", remove: ['מערכת JDN'] },
{ telem: "h1.elementor-heading-title" },
{ url: 1, match: /\/(\d+)\// },
{ attr: ['meta[property="article:published_time"]', 'content'], date: ['-', '210'] }
]
},
{
hostname: "google\.co.*", hrefmatch:/google.*?\/maps/,
params: [
{ str: "coord" },
[ //order does matter
{ telem: ".widget-reveal-card-open .link-like.widget-reveal-card-lat-lng", match: /(-?[\d\.]+), / },
{ url: 1, match: /([\d\.]+)!..[\d\.]+$/ },
{ url: 1, match: /@(-?[\d\.]+),/ }
],
[ //order does matter
{ telem: ".widget-reveal-card-open .link-like.widget-reveal-card-lat-lng", match: /-?[\d\.]+, (-?[\d\.]+)/ },
{ url: 1, match: /[\d\.]+!..([\d\.]+)$/ },
{ url: 1, match: /@-?[\d\.]+,(-?[\d\.]+),/ }
]
]
},
{
hostname: "timeout.co.il",
params: [
{ str: 'Time Out ישראל'},
{ telem: 'div.byline > a', remove: ['מערכת טיים אאוט'] },
{ telem: 'h1.headline' },
{ url: 1, match: /il\/(.+?)\// },
{ telem: 'div.date > span' }
]
},
{
hostname: "yuvalerel.com",
params: [
{ str: 'יובל אראל'},
{ telem: 'a.author-name', remove: ['יובל אראל'] },
{ telem: 'h1.post-title ' },
{ url: 1, match: /com\/(.*)/ }
]
},
{
hostname: "geektime.co.il",
params: [
{ str: 'גיקטיים'},
[
{ telem: 'p.post-meta > a', remove: ['מערכת גיקטיים', 'כתב אורח'] },
{ telem: 'section.post-content > p > strong', remove: ['מאת ', 'מאת: '] },
{ telem: '.author', remove: ['מאת ', 'מאת: '] }
],
[
{ telem: 'article.post-entry > h1' },
{ telem: '.head-title' }
],
{ url: 1, match: /il\/(.*)\// },
[
{ telem: 'p.post-meta', date: '.' },
{ telem: '.date', date: '.' }
],
]
},
{
hostname: "eureka.org.il",
params: [
{ str: 'אאוריקה'},
{ telem: 'div.head-text > h2' },
{ url: 1, match: /il\/item\/(\d*)\// }
]
},
{
hostname: "ha-makom.co.il",
params: [
{ str: 'המקום'},
{ telem: 'div.jeg_meta_author > a' },
{ telem: 'div.entry-header > h1' },
{ url: 1, match: /il\/(.*)/ },
{ telem: 'div.jeg_meta_date > a', date: '.' }
]
},
{
hostname: "benyehuda.org",
params: [
{ str: 'פרויקט בן-יהודה'},
{ url: 1, match: /org\/\w+\/(\d+)/, prefix: "זיהוי=" },
[
{ telem: 'div.author-page-top-name', prefix: 'שם=' },
{ telem: 'div.work-title > div.headline-2-v02', prefix: 'שם=' }
],
{ telem: 'div.work-title > div.headline-1-v02', prefix: 'שם היצירה=', remove: ['[', ']'] }
]
},
{
hostname: "archives.gov.il",
params: [
{ str: 'ארכיון המדינה'},
[
{ telem: 'h2#chapter-title > span:nth-child(2)' },
{ telem: 'h2#chapter-title' },
{ telem: 'div.inner > h2' },
{ telem: 'div#item-data > h1' },
{ telem: 'div#page-centered-header-title > h1 '}
],
{ url: 1, match: /il\/(.*)/ }
]
},
{
hostname: "mekomit.co.il",
params: [
{ str: 'שיחה מקומית'},
{ telem: 'article#main > header > div.post_details > a' , remove: ['שיחה מקומית'] },
{ telem: 'article#main > header > h1.post_title' },
{ url: 1, match: /il\/(.*)\// },
{ telem: 'article#main > header > div.post_details > time', date: '.' }
]
},
{
hostname: "onegshabbat.blogspot.com",
params: [
{ str: 'עונג שבת'},
[
{ telem: 'div.post-body > div > span', remove: ['מאת', 'כתב וצילם', 'כתב'] },
{ telem: 'div.post-body > div > b', remove: ['מאת', 'כתב וצילם', 'כתב'] },
{ telem: 'div.post-body > div > strong', remove: ['מאת', 'כתב וצילם', 'כתב'] }
],
{ telem: 'h3.post-title' },
{ url: 1, match: /com\/(\d{4}\/\d{2})\// },
{ url: 1, match: /blog-post_(\d+).html/ },
{ telem: 'h2.date-header', remove: [ /.*, / ] }
]
},
{
hostname: "anumuseum.org.il",
params: [
{ str: 'אנו – מוזיאון העם היהודי'},
{ url: 1, match: /il\/.*\/\w(\d+)\/.*/ },
{ telem: 'title', remove: [' | מאגרי מידע - אנו מוזיאון העם היהודי' ] }
]
},
{
hostname: "kolzchut.org.il",
params: [
{ str: 'כל זכות'},
{ attr: ["meta[property='og:title']", "content"] }
]
},
{
hostname: "guidestar.org.il", hrefmatch: /organization/,
params: [
{ str: 'גיידסטאר'},
{ url: 1, match: /il\/organization\/(\d+)/ },
{ attr: ["meta[property='og:title']", "content"], remove: [' | גיידסטאר - אתר התאגידים של ישראל | משרד המשפטים' ] }
]
},
{
hostname: "www.inss.org.il",
params: [
{ str: 'INSS'},
{ telements: ['.authors_in_post_item .author span', VE] },
[
{ telem: '.banner_post_item_title, .banner_post_item h1' },
{ telem: 'h2.title_46' }
],
{ url: 1, match: /www\.inss\.org\.il\/he\/publication\/([^\/]+)/ },
{ telem: '.cataloging_references' }
]
},
{
hostname: "jfc.org.il", hrefmatch: /news_journal/,
params: [
{ str: 'יומן חדשות'},
{ telem: 'h1.content_title' },
{ url: 1, match: /il\/news_journal\/([\d-]+\/[\d-]+)/ },
{ telem: '.content_subtitle' }
]
},
{
hostname: "cbr.com",
params: [
{ str: 'CBR'},
{ attr: ["meta[property='article:author']", "content"] },
{ attr: ["meta[property='og:title']", "content"] },
{ url: 1, match: /com\/(.*)\// },
{ telem: '.date > time', remove: ['Published ']}
]
},
{
hostname: "www.tidhar.tourolib.org",
params: [
{ str: 'תדהר'},
{ url: 1, match: /tidhar\/view\/(\d+)\/.+/ },
{ url: 1, match: /tidhar\/view\/\d+\/(\d+)/ }
]
},
{
hostname: "academia.edu",
params: [
{ str: 'אקדמיה' },
{ attr: ["meta[name='citation_author']", "content"] },
{ attr: ["meta[property='og:title']", "content"] },
{ url: 1, match: /academia.edu\/(\d+)/ },
{ attr: ["meta[name='citation_journal_title']", "content"] },
{ attr: ["meta[name='citation_publication_date']", "content"] }
]
}
];
for (var i = 0; i < data.length; i++) {
if (
location.hostname.match(data[i].hostname) &&
(!data[i].hrefmatch || location.href.match(data[i].hrefmatch)) &&
(!data[i].condition || data[i].condition())
) {
var params = [];
for (var j = 0; j < data[i].params.length; j++) {
if (!(data[i].params[j] instanceof Array)) {
data[i].params[j] = [data[i].params[j]];
}
for (var k=0; k < data[i].params[j].length; k++) {
try {
var curParam = data[i].params[j][k];
params[j] = '';
if (typeof curParam.str != "undefined") {
params[j] = curParam.str;
} else if (typeof curParam.ldjson != "undefined") {
var ldjson = null;
var ldjsons = $('script[type="application/ld+json"]').map(function(i,e) { try { return JSON.parse($(e).text().replace(/[\t\n\r]/g, ' ')); } catch (e) { return false; } });
if (typeof curParam.ldjson.n != "undefined") {
ldjson = ldjsons[curParam.ldjson.n];
} else {
var filteredLdjson = ldjsons.filter(function(i,e) { return (curParam.ldjson.type?[curParam.ldjson.type]:['NewsArticle','Article']).includes(e['@type']); });
if (filteredLdjson.length == 1) {
ldjson = filteredLdjson[0];
} else {
console.error("more/less than single ldjson", filteredLdjson);
return;
}
}
if (curParam.ldjson.key == "datePublished") {
params[j] = ldjson.datePublished;
if (!curParam.date) {
curParam.date = ['-', '210'];
}
} else if (curParam.ldjson.key == "author") {
params[j] =
$.map($(ldjson.author), function(a) { return a.name; } )
.join(VE);
} else if (typeof curParam.ldjson.raw != "undefined") {
if (!(curParam.ldjson.raw instanceof Array)) {
curParam.ldjson.raw = [curParam.ldjson.raw];
}
params[j] = ldjson;
for (var t=0; t < curParam.ldjson.raw.length; t++) {
console.log('curParam.ldjson.raw[t]', curParam.ldjson.raw[t]);
params[j] = params[j][curParam.ldjson.raw[t]];
}
}
} else if (typeof curParam.url != "undefined") {
params[j] = location.href;
if (curParam.url == 'decodeURIComponent')
params[j] = decodeURIComponent(params[j]);
else if (curParam.url == 'decodeURI')
params[j] = decodeURI(params[j]);
} else if (typeof curParam.attr != "undefined") {
params[j] = jQuery('html').find(curParam.attr[0]).attr(curParam.attr[1]);
} else if (typeof curParam.var != "undefined") {
if (!(curParam.var instanceof Array))
curParam.var = [curParam.var];
params[j] = window;
for (var vi=0; vi < curParam.var.length; vi++) {
params[j] = params[j][curParam.var[vi]];
if (!params[j])
break;
}
if (params[j] == window)
params[j] = undefined;
}
else if (typeof curParam.urlparam != "undefined") {
params[j] = getParameterByName(curParam.urlparam) || "";
} else if (typeof curParam.elem != "undefined") {
if (curParam.elem instanceof Array) {
params[j] = jQuery('html').find(curParam.elem[0]);
for (var elemIdx = 1; elemIdx < curParam.elem.length; elemIdx++) {
var func = curParam.elem[elemIdx].split(',');
params[j] = (func.length > 1) ? params[j][func[0]](func[1]) : params[j] = params[j][func[0]]();
}
if (typeof (params[j]) != "string")
params[j] = params[j].html();
}
else
params[j] = jQuery('html').find(curParam.elem).html();
}
else if (typeof curParam.first_text_node != "undefined") {
params[j] = jQuery('html').find(curParam.first_text_node).contents().filter(function () { return this.nodeType === 3; }).text();
} else if (typeof curParam.elements != "undefined" || (typeof curParam.telements != "undefined")) {
var sep;
if (typeof curParam.elements != "undefined") {
params[j] = jQuery('html').find(curParam.elements[0]).map(function (el) { return $(this).html(); }).toArray();
sep = curParam.elements[1];
}
if (typeof curParam.telements != "undefined") {
params[j] = jQuery('html').find(curParam.telements[0]).map(function (el) { return $(this).text(); }).toArray();
sep = curParam.telements[1];
}
if (sep != VE) { // hack for VE
params[j] = params[j].join(sep);
} else {
if (params[j].length > 2) {
params[j] = [params[j].slice(0,-1).join(', '), params[j].slice(-1)].join(sep);
} else {
params[j] = params[j].join(sep);
}
}
}
else if (typeof curParam.telem != "undefined") {
params[j] = jQuery('html').find(curParam.telem).first().text().trim();
}
if (typeof curParam.match != "undefined") {
if (!(curParam.match instanceof Array))
params[j] = match(params[j], curParam.match);
else for (var patIdx = 0; patIdx < curParam.match.length; patIdx++) {
var temp = match(params[j], curParam.match[patIdx]);
if (temp != '') {
params[j] = temp;
break;
}
}
}
if (typeof curParam.addParam != "undefined") {
addedParam = getParameterByName(curParam.addParam);
if (addedParam) {
params[j] += ('?' + curParam.addParam + '=' + addedParam);
}
}
if (typeof curParam.remove != "undefined")
for (var removeIdx = 0; removeIdx < curParam.remove.length; removeIdx++)
params[j] = params[j].replace(curParam.remove[removeIdx], "");
if (typeof curParam.func != "undefined") {
if (!(curParam.func instanceof Array))
curParam.func = [curParam.func];
for (var funcIdx = 0; funcIdx < curParam.func.length; funcIdx++) {
params[j] = curParam.func[funcIdx](params[j]);
}
}
if (typeof curParam.date != "undefined") {
if (!(curParam.date instanceof Array))
curParam.date = [curParam.date, [0,1,2]];
var gep = curParam.date[0].replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
params[j] = match(params[j], RegExp(('(\\d+' + gep + '\\d+' + gep + '\\d+)')));
if (params[j]) {
params[j] = params[j].split(curParam.date[0]);
params[j] = [params[j][curParam.date[1][0]], params[j][curParam.date[1][1]], params[j][curParam.date[1][2]]];
params[j] = dateFormat(params[j]);
}
}
if (typeof curParam.stringDate != "undefined") {
if (params[j]) {
var today = new Date(),
dd = (today.getDate() - (params[j] == YESTERDAY ? 1 : 0)).toString(),
mm = (today.getMonth() + 1).toString(),
yy = today.getFullYear().toString().slice(-2);
params[j] = dateFormat([dd, mm, yy]);
}
}
if (typeof curParam.removeDatePadding != "undefined") {
if (params[j]) {
var day = params[j].split(' ')[0];
if (day && day[0] === '0') params[j] = params[j].replace(day, day[1]);
}
}
if (typeof params[j] == "string") {
try {
params[j] = jQuery.trim(decodeURIComponent(params[j]));
} catch (e) {
console.error(e);
}
params[j] = cleanText(params[j]);
} else if (jQuery.isArray(params[j])) {
params[j] = jQuery.trim(params[j].join("|"));
}
if (params[j] && typeof curParam.prefix != "undefined")
params[j] = curParam.prefix + params[j];
if (typeof curParam.defvalue != "undefined" && params[j] == curParam.defvalue)
params[j] = '';
if (typeof curParam.shouldnt != "undefined" && typeof params[j] == "string" && params[j].match(curParam.shouldnt))
params[j] = '';
if ((params[j] != '') && (params[j] != undefined)) {
console.log('found', j, params[j]);
break;
}
console.log('not found', j, curParam);
}
catch (e) {
console.error(e);
}
}
}
var minimum = (typeof data[i].minimum != "undefined") ? (data[i].minimum) : (0);
while (params[params.length - 1] == "" && params.length > minimum) //remove all last empty params
params.pop();
if (window.popup_template_canceled && !force_popup) {
console.log('popup_template_canceled');
} else {
var result = '{{' + params.join('|') + '}}';
if (window.addWikiNote) result = '{{הערה|' + result + '}}';
if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", result) != null) {
var temp_raw = $("<input>");
$("body").append(temp_raw);
temp_raw.val(result);
temp_raw.select();
document.execCommand("copy");
temp_raw.remove();
//$('<input>').val(result).appendTo('body').select();document.execCommand('copy');
}
window.popup_template_canceled = false;
if (window.old$) { window.$ = window.old$; }
}
return;
}
}
try {
var ldojson = $('script[type="application/ld+json"]').map(function(i,e) { return JSON.parse($(e).text()); }).filter(function(i,e) { return ['NewsArticle', 'Article', 'article'].includes(e['@type']); });
var ldojson_website = [ { } ];
if (ldojson.length == 0) {
ldojson = $('script[type="application/ld+json"]').map(function(i,e) { return JSON.parse($(e).text()); }).filter(function(i,e) { return e['@graph']; });
if (ldojson.length == 1) {
ldojson_website = ldojson[0]['@graph'].filter(function(i,e) { return ['WebSite'].includes(i['@type']); });
ldojson = ldojson[0]['@graph'].filter(function(i,e) { return ['WebPage'].includes(i['@type']); });
}
}
console.log('ldojson:', ldojson);
if (ldojson.length == 1) {
ldojson = ldojson[0];
var date = new Date(ldojson.datePublished);
if (isNaN(date)) {
date = new Date(ldojson.publisher.datePublished);
}
var general = {
'שרייבער': $.map($(ldojson.author), function(a) { return a.name; }).join(VE),
'קעפל': ldojson.name || ldojson.headline,
'זייטל': (ldojson.publisher||ldojson_website[0]).name,
'דאטום': date != "Invalid Date" ? dateFormat([''+date.getDate(), ''+(date.getMonth()+1), ''+date.getFullYear()]) : '',
'אדרעס': location.href
};
console.log('data', general);
var gresult = '{{קישור כללי|'+$.map(general, function(v,k) {
return k + '=' + cleanText(jQuery.trim(decodeURIComponent($('<a />').html(v).text())));
}).join('|') + '}}';
if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", gresult) != null) {
$('<input>').val(gresult).appendTo('body').select();document.execCommand('copy');
}
if (window.old$) { window.$ = window.old$; }
return;
}
} catch (e) {
console.error('failed to create general link', e);
}
alert("דער זייטל אדער בלאט איז נישט געשטיצט דורכ'ן בוקמארקלעט.");
if (window.old$) { window.$ = window.old$; }
}
(function () {
if (typeof (jQuery) == "undefined") {
if (typeof ($) != "undefined") {
window.old$ = window.$;
console.log('store old dollar');
}
var s = document.createElement('script');
s.setAttribute('src', "https://he.wikipedia.org/w/load.php?modules=jquery&only=scripts");
s.onload = wikiit;
document.getElementsByTagName('body')[0].appendChild(s);
} else {
wikiit();
}
})();