בדוקי עריכות אוטומטית, אינטערפעיס רעדאקטארן, אינטערפעיס אדמיניסטראַטאָרן, סיסאפן, מייבאים, מעדכנים, מייבא, אספקלריה רעדאקטארן
46,362
רעדאגירונגען
אין תקציר עריכה |
אין תקציר עריכה |
||
| שורה 82: | שורה 82: | ||
function getWikiLink() { | function getWikiLink() { | ||
let result = ""; | |||
const oldid = getParameterByName("oldid") || getParameterByName("diff"); | |||
const host = window.location.host; | |||
if (host.startsWith("yi.hamichlol.org.il") && oldid) { | |||
const oldComment = window.prompt("קעפּל פאַר די לינק. קען בלייבן ליידיג.", ""); | |||
result = `{{אונטערשייד צווישן ווערסיעס|${getParameterByName("title")}|${oldid}||${oldComment || "אונטערשייד צווישן ווערסיעס"}}}`; | |||
} else { | |||
const nms = { | |||
"yi.hamichlol.org.il": "", | |||
"www.hamichlol.org.il": "ע:", | |||
"he.wikiquote.org": "q:", | |||
"he.wikisource.org": "s:", | |||
"en.wiktionary.org": "wikt:", | |||
}; | |||
const wikinamespace = document.querySelector(".mw-page-title-namespace"); | |||
const wikiname = document.querySelector(".mw-page-title-main"); | |||
const wikiarticle = wikiname | |||
? wikinamespace | |||
? `${wikinamespace.textContent}:${wikiname.textContent}` | |||
: wikiname.textContent | |||
: null; | |||
const wikitype = nms[host]; | |||
if (wikitype !== undefined && wikiname) { | |||
result = `[[${wikitype}${wikiarticle}${wikitype ? "|" + wikiname.textContent : ""}]]`; | |||
} | |||
} | |||
if (result) { | |||
navigator.clipboard.writeText(result).then(() => { | |||
alert("✅ קאפירט: " + result); | |||
}); | |||
return true; | |||
} | |||
return false; | |||
} | } | ||
if (window.location.host. | if (window.location.host.includes("hamichlol")) { | ||
getWikiLink(); | |||
} | } | ||
רעדאגירונגען