MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Tag: Undo
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
mw.loader.load('//wiki.ekatrafoundation.org/index.php?title=User:Gurwinder/Edittool.js&action=raw&ctype=text/javascript');
mw.loader.load('//wiki.ekatrafoundation.org/index.php?title=User:Gurwinder/Edittool.js&action=raw&ctype=text/javascript');
mw.loader.load('//wiki.ekatrafoundation.org/index.php?title=User:Gurwinder/GoogleOCR.js&action=raw&ctype=text/javascript');
 
// Turn <span class="mw-charinsert">foo</span> into a button that inserts "foo"
// Turn <span class="mw-charinsert">foo</span> into a button that inserts "foo"
// into the edit box:
// into the edit box:
Line 696: Line 696:
}
}
});
});
if (mw.user.isAnon() === false) { // Check if the user is not anonymous (logged in)
 
if (mw.user.isAnon() === true) { // Check if the user is anonymous
     $(function () {
     $(function () {
         $('.ext-wikisource-download-button').show(); // Show the button
         $('.ext-wikisource-download-button').hide(); // Hide the button for anonymous users
     });
     });
}
}