https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Benutzer%3AIvla%2Fjs%2FDefLinkhinweis.js
Benutzer:Ivla/js/DefLinkhinweis.js - Versionsgeschichte
2025-06-25T13:54:23Z
Versionsgeschichte dieser Seite in Wikipedia
MediaWiki 1.45.0-wmf.6
https://de.wikipedia.org/w/index.php?title=Benutzer:Ivla/js/DefLinkhinweis.js&diff=108490997&oldid=prev
Ivla: Pfuschlösung zur Abfrage nach defekten Einzelnachweisen dazugepackt; Skript aus Wartungskat. genommen
2012-09-25T00:10:43Z
<p>Pfuschlösung zur Abfrage nach defekten Einzelnachweisen dazugepackt; Skript aus Wartungskat. genommen</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="de">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 25. September 2012, 02:10 Uhr</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Zeile 3:</td>
<td colspan="2" class="diff-lineno">Zeile 3:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// nicht fertig, zusammengefrickelt, jetzt mit Einbindung per vector.js testen</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// nicht fertig, zusammengefrickelt, jetzt mit Einbindung per vector.js testen</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>// zusätzliche Anzeige bei Vorhandensein der Vorlage <del style="font-weight: bold; text-decoration: none;">{{</del>Toter Link<del style="font-weight: bold; text-decoration: none;">}}</del> könnte noch mit rein</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>// zusätzliche Anzeige bei Vorhandensein der Vorlage Toter Link könnte noch mit rein</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// die Variablen müssen auch nicht alle global sein => Objekt</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>// die Variablen müssen auch nicht alle global sein => Objekt</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Zeile 28:</td>
<td colspan="2" class="diff-lineno">Zeile 28:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>)</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>// Q&D dazugepackt, href Einzelnachweise wird gar nicht immer gehen,</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>// #catlinks gibt es manchmal nicht, dann TypeError. Im ANR aber extrem selten.</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>if(document.getElementById("catlinks").innerHTML.match(/Kategorie:Wikipedia:Seite mit Einzelnachweisfehlern/)) {</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> var refwarnung = '<div id="refwarnung"><br /><span style="color: red;">Referenzfehler</span>, siehe <a href="#Einzelnachweise" title="Nach unten">unten</a>!</div>';</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> jQuery(warnposition).before(refwarnung);</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>}</div></td>
</tr>
</table>
Ivla
https://de.wikipedia.org/w/index.php?title=Benutzer:Ivla/js/DefLinkhinweis.js&diff=108451919&oldid=prev
Ivla: Testlauf nicht nur aus Firebug
2012-09-24T01:13:59Z
<p>Testlauf nicht nur aus Firebug</p>
<p><b>Neue Seite</b></p><div>// DefLinkhinweis.js 0.02<br />
// Anzeige im Artikel, wenn Diskussionsseite in Wartungskategorie Defekte Weblinks Bot ist.<br />
<br />
// nicht fertig, zusammengefrickelt, jetzt mit Einbindung per vector.js testen<br />
// zusätzliche Anzeige bei Vorhandensein der Vorlage {{Toter Link}} könnte noch mit rein<br />
// die Variablen müssen auch nicht alle global sein => Objekt<br />
<br />
var warnung = '<div id="giftid"><br /><span style="color: red;">Meldung zu defekten Weblinks</span> auf <a href="/wiki/Diskussion:' + mw.util.wikiUrlencode(wgTitle) + '#Defekter_Weblink" title="Diskussion:' + wgTitle + '" target="_blank">Disk.</a>!</div>';<br />
var warnposition = '#firstHeading'; // ganz oben: IDs #mw-content-text oder #firstHeading, sonst #normdaten nehmen<br />
//var warnposition = '#normdaten';<br />
//if(!document.getElementById("normdaten")) {<br />
// warnposition = '#catlinks'<br />
//}<br />
jQuery.get(mw.util.wikiScript("api"),<br />
{action: "query",<br />
prop: "categories",<br />
titles: "Diskussion:" + wgTitle,<br />
format: "txt" },<br />
function (txt) {<br />
text = txt;<br />
// [-1] => Array // z.B. von http://de.wikipedia.org/wiki/S%C5%82awoborze aus: keine Disk, könnt aber vielleicht auch bei redlink auf nicht existierende Kat. kommen?<br />
if(text.match(/\[title\] => Kategorie:Wikipedia:Defekter Weblink Bot/)) {<br />
// if(!document.getElementById("giftid")) { // wahrscheinlich überflüssig nach Testen<br />
jQuery(warnposition).before(warnung);<br />
// }<br />
}<br />
// console.log("läuft bis hier");<br />
}<br />
)</div>
Ivla