Wikipedia Auto-Login

By Jordon Kalilich Last update Mar 22, 2008 — Installed 1,620 times.

Use with other Mediawiki sites?

in
Subscribe to Use with other Mediawiki sites? 2 posts, 2 voices



Jim McKeeth User

So this works great on en.Wikipedia.org, but how do I get it to work with other Wiki's? Especially for a Mediawiki installation I have on my own domain. I added the path to Greesemonkey's configuration for the script.

 
fredden User
X11

This patch works for our old version of mediawiki (v1.15.1):

--- wikipediaautologin.user.js.original	2010-06-15 10:50:17.000000000 +1200
+++ wikipediaautologin.user.js	2010-06-15 10:49:59.000000000 +1200
@@ -16,6 +16,7 @@
 // When not logged in and not just logged out: go to the login page
 if (/:userlog(in|out)/i.test(location) == false) {
     loginbullet = document.getElementById('pt-login');
+    if (!loginbullet) loginbullet = document.getElementById('pt-anonlogin');
     if (loginbullet) {
         GM_setValue('returnTo', location);
         window.location.replace(loginbullet.getElementsByTagName('a')[0].href);

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel