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

אפדעיט
(אפדעיט)
(אפדעיט)
שורה 54: שורה 54:
.replace(/[\u200B\u200E\u200F\u2028\u202A\u202B\u202C\u202D\u202E]/g, '') // remove invisible Unicode control characters
.replace(/[\u200B\u200E\u200F\u2028\u202A\u202B\u202C\u202D\u202E]/g, '') // remove invisible Unicode control characters
.replace(/ {2,}/g, ' ');
.replace(/ {2,}/g, ' ');
}
function qs(key) {
key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&");
var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)"));
return match && decodeURIComponent(match[1].replace(/\+/g, " "));
}
}


function getWikiLink() {
function getWikiLink() {
var nms = {
var result = '',
'yi.hamichlol.org.il': '',
oldid = qs('oldid') || qs('diff');
'www.hamichlol.org.il': 'ע:',
 
'he.wikiquote.org': 'q:',
if (window.location.host == 'he.wikipedia.org' && oldid) {
'he.wikisource.org': 's:',
var oldComment = '';
'en.wiktionary.org': 'wikt:'
oldComment = window.prompt("כיתוב לקישור. ניתן להשאיר ריק.", oldComment);
},
result = '{{הבדל בין גרסאות|' + qs('title') + '|' + oldid + '||' + (oldComment ? oldComment : 'הבדל בין גרסאות') + '}}';
wikinamespace = document.querySelector('.mw-page-title-namespace'),
} else {
wikiname = document.querySelector('.mw-page-title-main'),
var nms = {
wikiarticle = wikiname ? wikinamespace ? wikinamespace.textContent + ':' + wikiname.textContent : wikiname.textContent : null,
'yi.hamichlol.org.il': '',
wikitype = nms[window.location.host];
'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) {
if (wikitype != undefined && wikiname) {
var result = '[[' + wikitype + wikiarticle + (wikitype ? '|' + wikiname.textContent : '') + ']]';
result = '[[' + wikitype + wikiarticle + (wikitype ? '|' + wikiname.textContent : '') + ']]';
}
}
 
if (result) {
if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", result) != null) {
if (prompt("דרוקן OK וועט קאפּירן דעם מוסטער:", result) != null) {
$('<input>').val(result).appendTo('body').select();document.execCommand('copy');
$('<input>').val(result).appendTo('body').select();document.execCommand('copy');
שורה 348: שורה 366:
{ str: 'בחדרי חרדים' },
{ str: 'בחדרי חרדים' },
{ ldjson: { key:'author' } },
{ ldjson: { key:'author' } },
{ attr: ["meta[property='og:title']", "content"] },
{ attr: ["meta[property='og:title']", "content"], remove:[' - בחדרי חרדים'] },
[
[
{ url: 1, match: /news\/(\d+)/ },
{ url: 1, match: /news\/(\d+)/ },
שורה 360: שורה 378:
params: [
params: [
{ str: 'עכשיו 14' },
{ str: 'עכשיו 14' },
{ telem: '.author-zone', remove: ['חדשות 14'] },
{ telem: '.author-zone', remove: [/(:?חדשות|עכשיו) 14.*/] },
{ telem: '.post-title' },
{ telem: '.post-title' },
{ url: 1, match: /il\/(.+?)\// },
{ url: 1, match: /il\/(.+?)\// },
שורה 485: שורה 503:
{ 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: [/(:?כתבי|מערכת) ישראל היום/] }
],
],
[
[
שורה 1,293: שורה 1,311:
{ telem: "h1.elementor-heading-title" },
{ telem: "h1.elementor-heading-title" },
{ url: 1, match: /\/(\d+)\// },
{ url: 1, match: /\/(\d+)\// },
{ telem:'span.elementor-post-info__item--type-date', date:'.' }
{ attr: ['meta[property="article:published_time"]', 'content'], date: ['-', '210'] }
]
]
},
},