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 =&gt; 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 =&gt; 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&amp;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 = '&lt;div id="refwarnung"&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;Referenzfehler&lt;/span&gt;, siehe &lt;a href="#Einzelnachweise" title="Nach unten"&gt;unten&lt;/a&gt;!&lt;/div&gt;';</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 =&gt; Objekt<br /> <br /> var warnung = &#039;&lt;div id=&quot;giftid&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;Meldung zu defekten Weblinks&lt;/span&gt; auf &lt;a href=&quot;/wiki/Diskussion:&#039; + mw.util.wikiUrlencode(wgTitle) + &#039;#Defekter_Weblink&quot; title=&quot;Diskussion:&#039; + wgTitle + &#039;&quot; target=&quot;_blank&quot;&gt;Disk.&lt;/a&gt;!&lt;/div&gt;&#039;;<br /> var warnposition = &#039;#firstHeading&#039;; // ganz oben: IDs #mw-content-text oder #firstHeading, sonst #normdaten nehmen<br /> //var warnposition = &#039;#normdaten&#039;;<br /> //if(!document.getElementById(&quot;normdaten&quot;)) {<br /> // warnposition = &#039;#catlinks&#039;<br /> //}<br /> jQuery.get(mw.util.wikiScript(&quot;api&quot;),<br /> {action: &quot;query&quot;,<br /> prop: &quot;categories&quot;,<br /> titles: &quot;Diskussion:&quot; + wgTitle,<br /> format: &quot;txt&quot; },<br /> function (txt) {<br /> text = txt;<br /> // [-1] =&gt; 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\] =&gt; Kategorie:Wikipedia:Defekter Weblink Bot/)) {<br /> // if(!document.getElementById(&quot;giftid&quot;)) { // wahrscheinlich überflüssig nach Testen<br /> jQuery(warnposition).before(warnung);<br /> // }<br /> }<br /> // console.log(&quot;läuft bis hier&quot;);<br /> }<br /> )</div> Ivla