<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://70.231.62.181/index.php?action=history&amp;feed=atom&amp;title=MyWiki%3AWikiProject_Articles_for_creation%2FHelper_script%2FContributing%2FDeveloper_setup</id>
	<title>MyWiki:WikiProject Articles for creation/Helper script/Contributing/Developer setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://70.231.62.181/index.php?action=history&amp;feed=atom&amp;title=MyWiki%3AWikiProject_Articles_for_creation%2FHelper_script%2FContributing%2FDeveloper_setup"/>
	<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=MyWiki:WikiProject_Articles_for_creation/Helper_script/Contributing/Developer_setup&amp;action=history"/>
	<updated>2026-04-23T03:06:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>http://70.231.62.181/index.php?title=MyWiki:WikiProject_Articles_for_creation/Helper_script/Contributing/Developer_setup&amp;diff=3153284&amp;oldid=prev</id>
		<title>imported&gt;Cedar101: fix syntaxhighlight error</title>
		<link rel="alternate" type="text/html" href="http://70.231.62.181/index.php?title=MyWiki:WikiProject_Articles_for_creation/Helper_script/Contributing/Developer_setup&amp;diff=3153284&amp;oldid=prev"/>
		<updated>2022-04-06T06:28:23Z</updated>

		<summary type="html">&lt;p&gt;fix syntaxhighlight error&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Install these programs:&lt;br /&gt;
&lt;br /&gt;
* [https://docs.github.com/en/github/getting-started-with-github/set-up-git#setting-up-git Git], to download the code to your computer and upload your changes&lt;br /&gt;
* [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm Node.js and npm], to download the libraries we depend on&lt;br /&gt;
* [https://gruntjs.com/getting-started Grunt], to test the code. (You&amp;#039;ll need npm to install Grunt.)&lt;br /&gt;
&lt;br /&gt;
Download the code:&lt;br /&gt;
&lt;br /&gt;
# [https://docs.github.com/en/github/getting-started-with-github/fork-a-repo Create a fork] of [https://github.com/WPAFC/afch-rewrite/ our repository].&lt;br /&gt;
# Pick a location on your computer to put the code, then [https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository clone the fork] you just made.&lt;br /&gt;
#* Add the upstream. This will allow you to keep your copy of the code up to date. Run &amp;lt;span class=&amp;quot;plainlinks&amp;gt;{{pre|&amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; git remote add upstream https://github.com/WPAFC/afch-rewrite.git}}&amp;lt;/span&amp;gt; When you want to update your copy, run &amp;lt;syntaxhighlight lang=&amp;quot;console&amp;quot;&amp;gt;$ git fetch upstream &amp;amp;&amp;amp; git checkout master &amp;amp;&amp;amp; git merge upstream/master&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the script:&lt;br /&gt;
&lt;br /&gt;
# Run &amp;lt;code&amp;gt;npm start&amp;lt;/code&amp;gt; and follow the instructions. As the instructions say, you will need to go to https://test.wikipedia.org/wiki/Main_Page?withJS=MediaWiki:Setup-afch-dev.js. Make sure you&amp;#039;re logged in. It should show a link to a personal draft for your testing (ending in &amp;quot;Testing AFCH&amp;quot;). Click the link.&lt;br /&gt;
# In the row of tabs at the top (&amp;quot;User page&amp;quot;, &amp;quot;Discussion&amp;quot;, &amp;quot;Read&amp;quot;, and so on), there should be a &amp;quot;More&amp;quot; menu. Open it. One of the items should be called &amp;quot;Review (AFCH beta)&amp;quot;. Click that, and the AFCH interface should open.&lt;br /&gt;
# Try out the script! For your first action, try clicking &amp;quot;Comment&amp;quot;, the yellow button, writing something, and clicking &amp;quot;Post comment&amp;quot;. Some text should show up in the browser console. If you want to make it permanent, run &amp;lt;code&amp;gt;AFCH.consts.mockItUp = true;&amp;lt;/code&amp;gt; in the browser console, and use the script to post another comment. When you reload the page, your comment should then be there.&lt;br /&gt;
&lt;br /&gt;
Note that you&amp;#039;ll need to run &amp;lt;code&amp;gt;grunt build&amp;lt;/code&amp;gt; each time you change the style (.less files).&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Checklist if the &amp;quot;Review (AFCH beta)&amp;quot; item didn&amp;#039;t appear under the &amp;quot;More&amp;quot; menu:&lt;br /&gt;
* Are you on the Test Wikipedia (that is, does your address bar contain &amp;quot;test.wikipedia.org&amp;quot;)? If not, go there.&lt;br /&gt;
* Are you on a draft page (that is, does the title of the page start with &amp;lt;code&amp;gt;Draft:&amp;lt;/code&amp;gt;)? Are you viewing the page normally, not in edit mode? If not, go to [https://test.wikipedia.org/w/index.php?title=Special:MyPage/draft&amp;amp;action=edit&amp;amp;preload=Template:submit this page] and click &amp;quot;Publish page&amp;quot; on the bottom.&lt;br /&gt;
* Are you currently running &amp;lt;code&amp;gt;npm start&amp;lt;/code&amp;gt; in a terminal? If not, run it (in the project directory).&lt;br /&gt;
* Does [[testwiki:Special:MyPage/common.js|this page]] have a line that looks somewhat like &amp;lt;syntaxhighlight lang=&amp;quot;js&amp;quot; inline&amp;gt;mw.loader.load(&amp;#039;http://localhost:4444?ctype=text/javascript&amp;amp;title=afch-dev.js&amp;#039;, &amp;#039;text/javascript&amp;#039;);&amp;lt;/syntaxhighlight&amp;gt;? If not, go to [https://test.wikipedia.org/w/index.php?title=Special:MyPage/common.js&amp;amp;action=edit this page], copy and paste that line, and click &amp;quot;Publish page&amp;quot;.&lt;br /&gt;
* Navigate to http://localhost:4444/ (the number 4444 may be different; check the output of npm start) and make sure it loads. If it says &amp;quot;Parameters &amp;#039;ctype&amp;#039; and/or &amp;#039;title&amp;#039; not present.&amp;quot;, the server is working fine. If not, check that npm start is running, and if it is, [[Wikipedia:WikiProject Articles for creation/Helper script/Contributing#Need help?|let us know]].&lt;br /&gt;
* Navigate to http://localhost:4444?ctype=text/javascript&amp;amp;title=afch-dev.js (again, the number 4444 may be different) and make sure it loads some JavaScript code. If not, check that npm start is running, and if it is, [[Wikipedia:WikiProject Articles for creation/Helper script/Contributing#Need help?|let us know]].&lt;br /&gt;
* Check the browser console.&lt;br /&gt;
** Does &amp;quot;Loading failed&amp;quot; appear? Check that you have loaded the certificates in your browser (see the output of &amp;lt;code&amp;gt;npm run generate-certificates&amp;lt;/code&amp;gt; or [https://github.com/WPAFC/afch-rewrite/blob/699ce1f778273d126b6a0e52b51fe420bfd7600c/scripts/generate-certificates.js#L63 these instructions] - ${ca_cert} is usually myCA.pem)&lt;br /&gt;
&lt;br /&gt;
If it&amp;#039;s still not there:&lt;br /&gt;
* Go to [https://test.wikipedia.org/w/index.php?title=Special:MyPage/common.js&amp;amp;action=edit this page], add &amp;lt;code&amp;gt;console.log(&amp;#039;hi!&amp;#039;)&amp;lt;/code&amp;gt; on a new line, visit [[testwiki:Main Page|this page]], and open the browser console; the message &amp;quot;hi!&amp;quot; should be printed. If not, [[Wikipedia:WikiProject Articles for creation/Helper script/Contributing#Need help?|let us know]].&lt;br /&gt;
&lt;br /&gt;
Other notes:&lt;br /&gt;
* Ignore any Content Security Policy errors; they aren&amp;#039;t real errors. (If you&amp;#039;re curious, those are related to https://phabricator.wikimedia.org/T28508.)&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
&lt;br /&gt;
* If you get a &amp;quot;AFCH error: user not listed&amp;quot;, you&amp;#039;re probably trying to use the script from the English Wikipedia (https://en.wikipedia.org, the website you&amp;#039;re reading right now) rather than the Test Wikipedia (https://test.wikipedia.org). Testing on the English Wikipedia might use real drafts and thus cause confusion, so this script should usually be tested on the Test Wikipedia.&lt;/div&gt;</summary>
		<author><name>imported&gt;Cedar101</name></author>
	</entry>
</feed>