https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Benutzer%3AP.Copp%2Fscripts%2Fquickrespond.js Benutzer:P.Copp/scripts/quickrespond.js - Versionsgeschichte 2025-05-23T10:13:30Z Versionsgeschichte dieser Seite in Wikipedia MediaWiki 1.45.0-wmf.2 https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=211191316&oldid=prev Hgzh: deaktiviert 2021-04-22T14:00:46Z <p>deaktiviert</p> <a href="//de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&amp;diff=211191316&amp;oldid=208361918">Änderungen zeigen</a> Hgzh https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=208361918&oldid=prev Jon (WMF): maintenance: more info ReferenceError: appendCSS is not defined 2021-02-02T17:06:58Z <p>maintenance: <a href="https://meta.wikimedia.org/wiki/User:Jon_(WMF)/Edit_to_user_or_gadget_script" class="extiw" title="metawiki:User:Jon (WMF)/Edit to user or gadget script">more info</a> ReferenceError: appendCSS is not defined</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 2. Februar 2021, 19:06 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;"><div> d : [],</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> d : [],</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> QR : function (sig) {</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> QR : function (sig) {</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> this.section = quickRespond.cursection;</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> this.section = quickRespond.cursection;<ins style="font-weight: bold; text-decoration: none;">a</ins></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> this.sig = sig; </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> this.sig = sig; </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> this.section.sigs[sig] = (this.section.sigs[sig] || 0) + 1;</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> this.section.sigs[sig] = (this.section.sigs[sig] || 0) + 1;</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 253:</td> <td colspan="2" class="diff-lineno">Zeile 253:</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>if( wgNamespaceNumber &gt; 0 &amp;&amp; ( wgAction == 'view' || wgAction == 'historysubmit' ) ) {</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>if( wgNamespaceNumber &gt; 0 &amp;&amp; ( wgAction == 'view' || wgAction == 'historysubmit' ) ) {</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> <del style="font-weight: bold; text-decoration: none;">addOnloadHook</del>(function() {</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> <ins style="font-weight: bold; text-decoration: none;">$</ins>(function() {</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> var content = document.getElementById('bodyContent')</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> var content = document.getElementById('bodyContent')</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> || document.getElementById('mw_contentholder')</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> || document.getElementById('mw_contentholder')</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Zeile 259:</td> <td colspan="2" class="diff-lineno">Zeile 259:</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> quickRespond.recAddQRlinks(content);</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> quickRespond.recAddQRlinks(content);</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 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> <del style="font-weight: bold; text-decoration: none;">appendCSS</del>('.quickrespondlink {font-size: x-small;}\n'</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> <ins style="font-weight: bold; text-decoration: none;">mw.util.addCSS</ins>('.quickrespondlink {font-size: x-small;}\n'</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> +'.quickrespondpreview {border: 1px solid #bbbbbb;padding: 0.2em;}\n'</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> +'.quickrespondpreview {border: 1px solid #bbbbbb;padding: 0.2em;}\n'</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> +'.quickrespondform textarea {width: 99%}\n'</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> +'.quickrespondform textarea {width: 99%}\n'</div></td> </tr> </table> Jon (WMF) https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=119706298&oldid=prev H-stt: https://de.wikipedia.org/wiki/Wikipedia:Technik/Skin/Werkstatt#manualarchive_.26_quickrespond_gehen_nicht_mehr 2013-06-19T13:22:50Z <p>https://de.wikipedia.org/wiki/Wikipedia:Technik/Skin/Werkstatt#manualarchive_.26_quickrespond_gehen_nicht_mehr</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 19. Juni 2013, 15:22 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 35:</td> <td colspan="2" class="diff-lineno">Zeile 35:</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> quickRespond.cursection = new quickRespond.Section();</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> quickRespond.cursection = new quickRespond.Section();</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> } else if (node.nodeName == 'SPAN') {</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> } else if (node.nodeName == 'SPAN') {</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> if (node.className == 'editsection') {</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> if (node.className == '<ins style="font-weight: bold; text-decoration: none;">mw-</ins>editsection') {</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> var match = node.childNodes[1].href.match(/\?title=([^&amp;]*).*&amp;section=T?-?(\d*)/);</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> var match = node.childNodes[1].href.match(/\?title=([^&amp;]*).*&amp;section=T?-?(\d*)/);</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> quickRespond.cursection.page = match[1];</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> quickRespond.cursection.page = match[1];</div></td> </tr> </table> H-stt https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=98229392&oldid=prev P.Copp: Replace missing ts_getInnerText 2012-01-11T13:33:59Z <p>Replace missing ts_getInnerText</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 11. Januar 2012, 15:33 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 40:</td> <td colspan="2" class="diff-lineno">Zeile 40:</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> quickRespond.cursection.num = match[2];</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> quickRespond.cursection.num = match[2];</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> } else if (node.className == 'mw-headline') {</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> } else if (node.className == 'mw-headline') {</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> quickRespond.cursection.heading = <del style="font-weight: bold; text-decoration: none;">ts_getInnerText</del>(node).replace( /^↑ */, ''); //Remove arrow inserted by some other gadget</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> quickRespond.cursection.heading = <ins style="font-weight: bold; text-decoration: none;">$</ins>(<ins style="font-weight: bold; text-decoration: none;"> </ins>node<ins style="font-weight: bold; text-decoration: none;"> ).text(</ins>).replace( /^↑ */, ''); //Remove arrow inserted by some other gadget</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 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> </table> P.Copp https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=79437073&oldid=prev P.Copp: fix für Pfeil-Hoch-Helferlein, siehe http://de.wikipedia.org/w/index.php?title=diff=76648762&oldid=76596404 2010-09-23T03:18:08Z <p>fix für Pfeil-Hoch-Helferlein, siehe http://de.wikipedia.org/w/index.php?title=diff=76648762&amp;oldid=76596404</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 23. September 2010, 05:18 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 40:</td> <td colspan="2" class="diff-lineno">Zeile 40:</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> quickRespond.cursection.num = match[2];</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> quickRespond.cursection.num = match[2];</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> } else if (node.className == 'mw-headline') {</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> } else if (node.className == 'mw-headline') {</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> quickRespond.cursection.heading = ts_getInnerText(node);</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> quickRespond.cursection.heading = ts_getInnerText(node<ins style="font-weight: bold; text-decoration: none;">).replace( /^↑ */, ''</ins>);<ins style="font-weight: bold; text-decoration: none;"> //Remove arrow inserted by some other gadget</ins></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 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> </table> P.Copp https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=70225200&oldid=prev P.Copp: Klammer zuviel 2010-02-04T12:45:37Z <p>Klammer zuviel</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 4. Februar 2010, 14:45 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 252:</td> <td colspan="2" class="diff-lineno">Zeile 252:</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;"><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" 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>if<del style="font-weight: bold; text-decoration: none;">( </del>( wgNamespaceNumber &gt; 0 &amp;&amp; ( wgAction == 'view' || wgAction == 'historysubmit' ) ) {</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>if( wgNamespaceNumber &gt; 0 &amp;&amp; ( wgAction == 'view' || wgAction == 'historysubmit' ) ) {</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> addOnloadHook(function() {</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> addOnloadHook(function() {</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> var content = document.getElementById('bodyContent')</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> var content = document.getElementById('bodyContent')</div></td> </tr> </table> P.Copp https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=70225173&oldid=prev P.Copp: Ausweitung auf alle Namensräume außer Artikel- und Spezial-, siehe http://de.wikipedia.org/w/index.php?diff=70190760&oldid=70091060 2010-02-04T12:45:01Z <p>Ausweitung auf alle Namensräume außer Artikel- und Spezial-, siehe http://de.wikipedia.org/w/index.php?diff=70190760&amp;oldid=70091060</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 4. Februar 2010, 14:45 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 252:</td> <td colspan="2" class="diff-lineno">Zeile 252:</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;"><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" 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>if (<del style="font-weight: bold; text-decoration: none;">(</del>wgNamespaceNumber<del style="font-weight: bold; text-decoration: none;">==4</del> <del style="font-weight: bold; text-decoration: none;">||</del> <del style="font-weight: bold; text-decoration: none;">wgNamespaceNumber</del> <del style="font-weight: bold; text-decoration: none;">%</del> <del style="font-weight: bold; text-decoration: none;">2</del> == <del style="font-weight: bold; text-decoration: none;">1)</del> <del style="font-weight: bold; text-decoration: none;">&amp;&amp;</del> wgAction == '<del style="font-weight: bold; text-decoration: none;">view</del>') {</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>if<ins style="font-weight: bold; text-decoration: none;">(</ins> (<ins style="font-weight: bold; text-decoration: none;"> </ins>wgNamespaceNumber <ins style="font-weight: bold; text-decoration: none;">&gt;</ins> <ins style="font-weight: bold; text-decoration: none;">0</ins> <ins style="font-weight: bold; text-decoration: none;">&amp;&amp;</ins> <ins style="font-weight: bold; text-decoration: none;">( wgAction</ins> == <ins style="font-weight: bold; text-decoration: none;">'view'</ins> <ins style="font-weight: bold; text-decoration: none;">||</ins> wgAction == '<ins style="font-weight: bold; text-decoration: none;">historysubmit</ins>'<ins style="font-weight: bold; text-decoration: none;"> ) </ins>) {</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> addOnloadHook(function() {</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> addOnloadHook(function() {</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> var content = document.getElementById('bodyContent')</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> var content = document.getElementById('bodyContent')</div></td> </tr> </table> P.Copp https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=56232287&oldid=prev P.Copp: update lokalisierte zeitzone 2009-02-04T11:23:24Z <p>update lokalisierte zeitzone</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 4. Februar 2009, 13:23 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 26:</td> <td colspan="2" class="diff-lineno">Zeile 26:</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> recAddQRlinks : function (node) {</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> recAddQRlinks : function (node) {</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> if (node.nodeType == 3 &amp;&amp; quickRespond.cursection.page) {</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> if (node.nodeType == 3 &amp;&amp; quickRespond.cursection.page) {</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> var matches = /.{20}\(CES?T\)/g.exec(node.nodeValue);</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> var matches = /.{20}\(<ins style="font-weight: bold; text-decoration: none;">(?:</ins>CES?T<ins style="font-weight: bold; text-decoration: none;">|MES?Z)</ins>\)/g.exec(node.nodeValue);</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> if (!matches) return;</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> if (!matches) return;</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> for (var i=0;i&lt;matches.length;i++)</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> for (var i=0;i&lt;matches.length;i++)</div></td> </tr> </table> P.Copp https://de.wikipedia.org/w/index.php?title=Benutzer:P.Copp/scripts/quickrespond.js&diff=53696101&oldid=prev P.Copp: AZ: Die Seite wurde neu angelegt: var quickRespond = { cursection : false, d : [], QR : function (sig) { this.section = quickRespo... 2008-12-02T23:11:43Z <p><a href="/wiki/Hilfe:Zusammenfassung_und_Quelle#Auto-Zusammenfassung" class="mw-redirect" title="Hilfe:Zusammenfassung und Quelle">AZ</a>: Die Seite wurde neu angelegt: var quickRespond = { cursection : false, d : [], QR : function (sig) { this.section = quickRespo...</p> <p><b>Neue Seite</b></p><div>var quickRespond = {<br /> cursection : false,<br /> d : [],<br /> QR : function (sig) {<br /> this.section = quickRespond.cursection;<br /> this.sig = sig; <br /> this.section.sigs[sig] = (this.section.sigs[sig] || 0) + 1;<br /> this.signum = this.section.sigs[sig];<br /> this.num = quickRespond.d.length;<br /> quickRespond.d.push(this);<br /> },<br /> Section : function () {<br /> this.sigs = {};<br /> },<br /> Link : function (text,title,func,num) {<br /> this.link = document.createElement(&#039;a&#039;);<br /> this.link.href = &#039;javascript:quickRespond.d[&#039; + num + &#039;].&#039; + func + &#039;();&#039;;<br /> this.link.title = title;<br /> this.link.appendChild(document.createTextNode(text));<br /> this.span = document.createElement(&#039;span&#039;);<br /> this.span.appendChild(document.createTextNode(&#039; [&#039;));<br /> this.span.appendChild(this.link);<br /> this.span.appendChild(document.createTextNode(&#039;] &#039;));<br /> this.span.className = &#039;quickrespondlink&#039;;<br /> },<br /> recAddQRlinks : function (node) {<br /> if (node.nodeType == 3 &amp;&amp; quickRespond.cursection.page) {<br /> var matches = /.{20}\(CES?T\)/g.exec(node.nodeValue);<br /> if (!matches) return;<br /> for (var i=0;i&lt;matches.length;i++)<br /> var qr = new quickRespond.QR(matches[i]);<br /> qr.makeEditlink(node);<br /> } else if (node.nodeType == 1) {<br /> if (node.nodeName.match(/H[123456]/i)) {<br /> quickRespond.cursection = new quickRespond.Section();<br /> } else if (node.nodeName == &#039;SPAN&#039;) {<br /> if (node.className == &#039;editsection&#039;) {<br /> var match = node.childNodes[1].href.match(/\?title=([^&amp;]*).*&amp;section=T?-?(\d*)/);<br /> quickRespond.cursection.page = match[1];<br /> quickRespond.cursection.num = match[2];<br /> } else if (node.className == &#039;mw-headline&#039;) {<br /> quickRespond.cursection.heading = ts_getInnerText(node);<br /> }<br /> }<br /> if (node.hasChildNodes())<br /> for (var i=0;i&lt;node.childNodes.length;i++)<br /> quickRespond.recAddQRlinks(node.childNodes[i]);<br /> }<br /> },<br /> callApi : function (query,data,cb) {<br /> var method = data ? &#039;POST&#039; : &#039;GET&#039;;<br /> var url = wgScriptPath + &#039;/api.php?format=json&amp;&#039; + query;<br /> var req = sajax_init_object();<br /> if (!req) {alert(&#039;AJAX wird von diesem Browser nicht unterstützt.&#039;);return;}<br /> req.open(method,url,true);<br /> if (method==&#039;POST&#039;)<br /> req.setRequestHeader(&#039;Content-Type&#039;,&#039;application/x-www-form-urlencoded&#039;);<br /> req.onreadystatechange = function() {<br /> if (req.readyState == 4) {<br /> if (req.status == 200)<br /> eval(&#039;cb(&#039; + req.responseText + &#039;);&#039;);<br /> else if (confirm(&#039;Verbindungsfehler. Erneut versuchen?&#039;))<br /> quickRespond.callApi(query,data,cb);<br /> }<br /> };<br /> req.send(data || &#039;&#039;);<br /> delete req;<br /> }<br /> }<br /> <br /> //API functions<br /> quickRespond.Section.prototype.fetchContent = function (qr,reload) {<br /> var sc = this;<br /> if (!reload &amp;&amp; sc.content) {qr.checkSection();return;}<br /> var query = &#039;action=query&amp;rvprop=content|timestamp&amp;rvsection=&#039; + sc.num + &#039;&amp;titles=&#039;<br /> + sc.page + &#039;&amp;prop=revisions&#039;;<br /> if (!quickRespond.token) query += &#039;|info&amp;intoken=edit&#039;;<br /> quickRespond.callApi(query,&#039;&#039;,function (res) {<br /> if (!res || !res.query || !res.query.pages) {alert(&#039;Abschnitt wurde verändert oder entfernt.&#039;);return;}<br /> for (var i in res.query.pages) {<br /> var p = res.query.pages[i];<br /> if (p.edittoken) quickRespond.token = p.edittoken;<br /> sc.content = p.revisions ? p.revisions[0][&#039;*&#039;] : &#039;&#039;;<br /> sc.timestamp = p.revisions ? p.revisions[0].timestamp : &#039;&#039;;<br /> }<br /> qr.checkSection();<br /> });<br /> };<br /> <br /> quickRespond.QR.prototype.checkSection = function () {<br /> this.pos = -1;<br /> for (i=0;i&lt;this.signum;i++) this.pos = this.section.content.indexOf(this.sig,this.pos+1);<br /> if (this.pos == -1) {alert(&#039;Beitrag wurde verändert oder entfernt.&#039;);return;}<br /> if (this.text) this.trySave();<br /> };<br /> <br /> quickRespond.QR.prototype.save = function () {<br /> if (!this.area.value) {alert(&#039;Kein Text eingegeben.&#039;);return;}<br /> this.savelink.progress(&#039;Speichere...&#039;);<br /> this.text = this.area.value;<br /> this.comment = this.commentinput.value;<br /> if (!this.comment) {//&lt;nowiki&gt;<br /> var stripped = this.text.match(/^[\\:\*#;]*((.|\n)*)/m)[1].replace(/\n/g,&#039; &#039;).replace(/~~~~/g,&#039;&#039;);//&lt;/nowiki&gt;<br /> this.comment = stripped.length &lt; 50 ? stripped : &#039;aw&#039;;<br /> }<br /> this.comment = &#039;/* &#039; + this.section.heading + &#039; */ &#039; + this.comment;<br /> if (this.section.content) this.trySave();<br /> };<br /> <br /> quickRespond.QR.prototype.preview = function () {<br /> var qr = this;<br /> var l = this.area.value.match(/^\\*/)[0].length;<br /> var text = this.area.value.substr(l);<br /> quickRespond.callApi(&#039;action=parse&amp;prop=text&amp;title=&#039; + qr.section.page + &#039;&amp;text=&#039; + encodeURIComponent(text),&#039;&#039;,function (res) {<br /> if (!res || !res.parse || !res.parse.text) {alert(&#039;Fehler beim Erstellen der Vorschau, bitte erneut versuchen.&#039;);return;}<br /> if (!qr.previewbox) {<br /> qr.previewbox = document.createElement(&#039;div&#039;);<br /> qr.previewbox.className = &#039;quickrespondpreview&#039;;<br /> qr.editform.insertBefore(qr.previewbox,qr.area);<br /> }<br /> qr.previewbox.innerHTML = res.parse.text[&#039;*&#039;] || &#039;&#039;;<br /> qr.area.focus();<br /> });<br /> };<br /> <br /> quickRespond.QR.prototype.transformed = function () {<br /> var backsl = this.text.match(/^\\*/)[0].length;<br /> if (backsl == 1)<br /> var prefix = &#039;&#039;;<br /> else {<br /> var linestart = this.section.content.lastIndexOf(&#039;\n&#039;,this.pos) + 1;<br /> var colons = this.section.content.substring(linestart,this.pos).match(/^[:\*#]*/)[0] + &#039;:&#039;;<br /> var prefix = colons.substr(backsl ? backsl - 1 : 0);<br /> }<br /> var text = prefix + this.text.substr(backsl).replace(/\n([^\n])/g,&#039;\n&#039; + prefix + &#039;$1&#039;);//&lt;nowiki&gt;<br /> if (text.indexOf(&#039;~~~~&#039;) == -1) text += window.usersignature || &#039;-- ~~~~&#039;;//&lt;/nowiki&gt;<br /> if (text[text.length-1] != &#039;\n&#039;) text += &#039;\n&#039;;<br /> return text;<br /> }<br /> <br /> quickRespond.QR.prototype.insertresponse = function (text) {<br /> var c = this.section.content;<br /> var firstprefix = text.match(/^[:\*#]*/)[0].length;<br /> var ins = c.indexOf(&#039;\n&#039;,this.pos) + 1;<br /> while (ins&gt;0 &amp;&amp; (c[ins] == &#039;\n&#039; || c.substr(ins).match(/^[:\*#]*/)[0].length &gt;= firstprefix))<br /> ins = c.indexOf(&#039;\n&#039;,ins) + 1;<br /> if (ins == 0) ins = c.length;<br /> if (c[ins-1] != &#039;\n&#039;) text = &#039;\n&#039; + text;<br /> return c.substr(0,ins) + text + c.substring(ins,c.length);<br /> }<br /> <br /> quickRespond.QR.prototype.trySave = function () {<br /> var qr = this;<br /> var text = qr.transformed();<br /> var newtext = qr.insertresponse(text);<br /> var query = &#039;action=edit&amp;nocreate&amp;title=&#039; + qr.section.page + &#039;&amp;section=&#039; + qr.section.num + &#039;&amp;token=&#039;<br /> + encodeURIComponent(quickRespond.token) + &#039;&amp;summary=&#039; + encodeURIComponent(qr.comment)<br /> + &#039;&amp;basetimestamp=&#039; + encodeURIComponent(qr.section.timestamp);<br /> quickRespond.callApi(query,&#039;text=&#039; + encodeURIComponent(newtext),function (res) {<br /> if (res &amp;&amp; res.edit &amp;&amp; res.edit.result == &#039;Success&#039;) {<br /> qr.makeSuccessMsg(res.edit.oldrevid,res.edit.newrevid,text);<br /> } else if (res &amp;&amp; res.error){<br /> if (res.error.code == &#039;editconflict&#039;) {<br /> qr.savelink.progress(&#039;BK auflösen...&#039;);<br /> qr.section.fetchContent(qr,true);<br /> } else {<br /> alert(&#039;Fehler beim Bearbeiten: &#039;+res.error.info);<br /> qr.savelink.restore();<br /> }<br /> } else {<br /> alert(&#039;Fehler beim Bearbeiten, bitte erneut versuchen.&#039;);<br /> qr.savelink.restore();<br /> }<br /> });<br /> };<br /> <br /> //UI functions<br /> quickRespond.Link.prototype.appendTo = function (node) {<br /> node.appendChild(this.span);<br /> };<br /> quickRespond.Link.prototype.progress = function (text) {<br /> this.span.replaceChild(document.createTextNode(text),this.span.childNodes[1]);<br /> };<br /> quickRespond.Link.prototype.restore = function () {<br /> this.span.replaceChild(this.link,this.span.childNodes[1]);<br /> };<br /> <br /> quickRespond.QR.prototype.makeEditlink = function (node) {<br /> var parent = node.parentNode;<br /> var nextcont = node.nextSibling;<br /> while (nextcont &amp;&amp; nextcont.nodeName != &#039;DL&#039; &amp;&amp; nextcont.nodeName != &#039;P&#039;) {<br /> if (nextcont.className == &#039;quickrespondlink&#039;) return;<br /> nextcont = nextcont.nextSibling;<br /> }<br /> this.editlink = new quickRespond.Link(&#039;+&#039;,&#039;Antworten&#039;,&#039;toggle&#039;,this.num);<br /> parent.insertBefore(this.editlink.span,nextcont);<br /> }; <br /> <br /> quickRespond.QR.prototype.toggle = function () {<br /> var t = this.editlink.link.firstChild.nodeValue == &#039;+&#039;;<br /> this.editlink.link.firstChild.nodeValue = t ? &#039;--&#039; : &#039;+&#039;;<br /> if (this.editform)<br /> this.editform.style.display = t ? &#039;block&#039; : &#039;none&#039;;<br /> else {<br /> this.makeEditForm();<br /> this.section.fetchContent(this,false);<br /> }<br /> };<br /> <br /> quickRespond.QR.prototype.makeEditForm = function () {<br /> var dl = document.createElement(&#039;dl&#039;);<br /> this.editform = document.createElement(&#039;dd&#039;);<br /> this.editform.className = &#039;quickrespondform&#039;;<br /> dl.appendChild(this.editform);<br /> this.area = document.createElement(&#039;textarea&#039;);<br /> this.savelink = new quickRespond.Link(&#039;Speichern&#039;,&#039;&#039;,&#039;save&#039;,this.num);<br /> this.previewlink = new quickRespond.Link(&#039;Vorschau&#039;,&#039;&#039;,&#039;preview&#039;,this.num);<br /> this.commentinput = document.createElement(&#039;input&#039;);<br /> this.commentinput.type = &#039;text&#039;;<br /> this.commentinput.size = 80;<br /> this.editform.appendChild(this.area);<br /> this.savelink.appendTo(this.editform);<br /> this.previewlink.appendTo(this.editform);<br /> this.editform.appendChild(this.commentinput);<br /> var parent = this.editlink.span.parentNode;<br /> if (parent.nodeName==&#039;DD&#039;)<br /> parent.insertBefore(dl,this.editlink.span.nextSibling);<br /> else<br /> parent.parentNode.insertBefore(dl,parent.nextSibling);<br /> this.area.focus();<br /> };<br /> <br /> quickRespond.QR.prototype.makeSuccessMsg = function(oldid,newid,text) {<br /> var dd = document.createElement(&#039;dd&#039;);<br /> dd.className = &#039;quickrespondsuccess&#039;;<br /> dd.appendChild(document.createTextNode(&#039;Antwort wurde erfolgreich gespeichert. (&#039;));<br /> var link = document.createElement(&#039;a&#039;);<br /> link.appendChild(document.createTextNode(&#039;Difflink&#039;));<br /> link.href = wgArticlePath.replace(/\$1/g,&#039;?diff=&#039; + newid + &#039;&amp;oldid=&#039; + oldid);<br /> dd.appendChild(link);<br /> dd.appendChild(document.createTextNode(&#039;)&#039;));<br /> dd.appendChild(document.createElement(&#039;br&#039;));<br /> var pre = document.createElement(&#039;pre&#039;);<br /> pre.appendChild(document.createTextNode(text));<br /> dd.appendChild(pre);<br /> this.toggle();<br /> this.editform.parentNode.replaceChild(dd,this.editform);<br /> delete this.editform;<br /> delete this.text;<br /> if (this.previewbox) delete this.previewbox;<br /> };<br /> <br /> <br /> if ((wgNamespaceNumber==4 || wgNamespaceNumber % 2 == 1) &amp;&amp; wgAction == &#039;view&#039;) {<br /> addOnloadHook(function() {<br /> var content = document.getElementById(&#039;bodyContent&#039;)<br /> || document.getElementById(&#039;mw_contentholder&#039;)<br /> || document.getElementById(&#039;article&#039;);<br /> quickRespond.recAddQRlinks(content);<br /> });<br /> appendCSS(&#039;.quickrespondlink {font-size: x-small;}\n&#039;<br /> +&#039;.quickrespondpreview {border: 1px solid #bbbbbb;padding: 0.2em;}\n&#039;<br /> +&#039;.quickrespondform textarea {width: 99%}\n&#039;<br /> +&#039;.quickrespondsuccess {background-color: #ddffcc;padding: 0.2em;}&#039;);<br /> }</div> P.Copp