<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.gc-forever.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AListref%2FListrefErrors.js</id>
	<title>Template:Listref/ListrefErrors.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.gc-forever.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AListref%2FListrefErrors.js"/>
	<link rel="alternate" type="text/html" href="https://www.gc-forever.com/wiki/index.php?title=Template:Listref/ListrefErrors.js&amp;action=history"/>
	<updated>2026-04-13T10:15:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://www.gc-forever.com/wiki/index.php?title=Template:Listref/ListrefErrors.js&amp;diff=1240&amp;oldid=prev</id>
		<title>Cybertronic: Created page with &quot;// adapted from User:Ucucha/HarvErrors.js if(window.checkLinksToCitations === undefined)     window.checkLinksToCitations = true;  jQuery(document).ready(function($) {     // fir...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.gc-forever.com/wiki/index.php?title=Template:Listref/ListrefErrors.js&amp;diff=1240&amp;oldid=prev"/>
		<updated>2013-05-01T17:25:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;// adapted from User:Ucucha/HarvErrors.js if(window.checkLinksToCitations === undefined)     window.checkLinksToCitations = true;  jQuery(document).ready(function($) {     // fir...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;// adapted from User:Ucucha/HarvErrors.js&lt;br /&gt;
if(window.checkLinksToCitations === undefined)&lt;br /&gt;
    window.checkLinksToCitations = true;&lt;br /&gt;
&lt;br /&gt;
jQuery(document).ready(function($) {&lt;br /&gt;
    // first check: do links in listref templates citations point to a valid citation?&lt;br /&gt;
    links = document.links;&lt;br /&gt;
    for (i=0; i &amp;lt; links.length; i++)&lt;br /&gt;
    {&lt;br /&gt;
        href = links[i].getAttribute(&amp;#039;href&amp;#039;);&lt;br /&gt;
        if (href.indexOf(&amp;#039;#cite_note-listref&amp;#039;) == 0)&lt;br /&gt;
            if (document.getElementById(href.substring(1)) == null)&lt;br /&gt;
                links[i].parentNode.innerHTML +=&lt;br /&gt;
                    &amp;quot; &amp;lt;strong class=error&amp;gt;Listref error: link &amp;quot; +&lt;br /&gt;
                    href +&lt;br /&gt;
                    &amp;quot; doesn&amp;#039;t point to any matching citation.&amp;lt;/strong&amp;gt;&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // second check: do endnote IDs have citations pointing to them?&lt;br /&gt;
    if(window.checkLinksToCitations) {&lt;br /&gt;
        cites = jQuery(&amp;#039;.citation&amp;#039;);&lt;br /&gt;
        for(i=0; i &amp;lt; cites.length; i++) {&lt;br /&gt;
            id = cites[i].getAttribute(&amp;#039;id&amp;#039;);&lt;br /&gt;
            // we only need to check citations with a&lt;br /&gt;
            if(!id || id.indexOf(&amp;#039;cite_note-listref&amp;#039;) !== 0)&lt;br /&gt;
                continue;&lt;br /&gt;
            // don&amp;#039;t do cites that are inside a ref&lt;br /&gt;
            parentid = cites[i].parentNode.getAttribute(&amp;#039;id&amp;#039;);&lt;br /&gt;
            if(parentid &amp;amp;&amp;amp; parentid.indexOf(&amp;#039;cite_note&amp;#039;) === 0)&lt;br /&gt;
                continue;&lt;br /&gt;
            // check for links to this citation&lt;br /&gt;
            query = &amp;#039;a[href|=&amp;quot;#&amp;#039; + id + &amp;#039;&amp;quot;]&amp;#039;;&lt;br /&gt;
            if(jQuery(query).length == 0) {&lt;br /&gt;
                cites[i].innerHTML +=&lt;br /&gt;
                    &amp;quot; &amp;lt;strong class=error&amp;gt;Listref error: There is no link pointing to this citation.&amp;lt;/strong&amp;gt;&amp;quot;;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
});&lt;/div&gt;</summary>
		<author><name>Cybertronic</name></author>
	</entry>
</feed>