Commit Graph

13 Commits

Author SHA1 Message Date
Timo Tijhof
c6d71015ff Various clean up
Files:
* Consistently have one (1) new line at EOF
  (.gitignore, *.css, *.sh)

JSHint:
* Separate the common (general Wikimedia code conventions) from
  the local more stricter rules (nice work!).

Maintenance:
* Use simplified $IP definition where getenv is only called once.
  Based on http://git.io/ve-mw-36fc3b59-makeStaticLoader

JavaScript:
* Use the same closure in all files:
  - No need for "undefined".
  - One linebreak between license header and start of closure
    (sometimes there were 1 or 2 empty lines).
  - ext.uls.ime.js: No need for "document" (redundant in general,
    but especially as it wasn't used anywhere in this file).
  - Use "$, mw" for all ext.* modules (one of them used "mw, $").

Change-Id: Iba5dab14bbc3fbfc9f8fe96dd2d95529587a69aa
2014-02-08 00:11:50 -08:00
Niklas Laxström
60242e2c53 Use wmf geoip by default
Unlike freegeoip it also works with https

Also moved the getCountryCode function to init, as it should be
available regardless of whether we load the optional geoclient
module.

Bug: 40965
Change-Id: Ia18130890d09f86a93b5b61f7da7c48fcfa480c7
2013-04-28 14:25:26 +03:00
Siebrand Mazeland
57a30afc55 Fix some JSHint issues
Change-Id: Iecb1f2d2d326260075755070882b7706c1ae7db4
2012-11-12 07:51:39 +01:00
Siebrand Mazeland
98d7a8d9f9 Reformat code.
Change-Id: Ic0a5b37fa01b4a13023e66af0518ea94919ee880
2012-11-11 10:34:10 +01:00
Niklas Laxström
3c9e7249a8 Geoclient fixes for https and WMF
* Don't call freegeoip on https, it wont work
* Use Geo instead of GEO like WMF

Change-Id: I9ebdd9f3518e15e70122a9c8c8d64240d5e44c5b
2012-11-10 07:15:07 +00:00
Santhosh Thottingal
7b30aa7f1a JSHint fixes
* variables in one line
* double quote , single quote consistancy
* Unused variables

Change-Id: Id368190e7c4f46c8ef09deea88a0d5a7b32889ef
2012-10-16 16:55:53 +05:30
Santhosh Thottingal
1276a35f31 Check for window.GEO in getCountryCode
Followup of Id8d7356e

Change-Id: Ib89d72d35e69742797ffb29c0eb10897c410cc83
2012-10-15 11:01:19 +05:30
Santhosh Thottingal
c19c0b4db7 Fix Bug 40714 - ULS geoclient needs proper interface
Change-Id: Id8d7356ec75e8652c75927736a60b916dd069c28
2012-10-13 20:02:32 +05:30
Siebrand Mazeland
e1a4f7f0cb After training the PHPStorm code formatter.
See https://github.com/siebrand/MediaWiki-PHPStorm

Issue remains with anonymous functions in JavaScript.

Change-Id: I2b520f8df127452acf02deb659277a6465e6ca59
2012-09-17 17:10:59 -07:00
Niklas Laxström
ceb1a80eea ext.uls.geoclient should not break if it runs before ext.uls.init
Change-Id: If4c8203bccd4287a94de6b22210f067852241614
2012-09-09 07:55:23 +00:00
Santhosh Thottingal
5b3f7cc269 Whitespace cleanup, remove deprecated methods
* Fixed many white space issues- mainly whitespace missing before
  function start paranthesis eg: function()
* Removed the deprecated live methods and replaced with on
* Added file documentation for ext.uls.geoclient

Change-Id: Ib2c8cfed1a6ff3859495e707680d5c19882a33e8
2012-09-07 16:47:03 +05:30
Niklas Laxström
d738b0f117 JS cleanup
Change-Id: I804d9f5e13f0c186da19cd31eae5156277f0f0d4
2012-08-30 13:56:04 +00:00
Niklas Laxström
64c26ad137 Initial version of geolocation support
Change-Id: Ia1a18ac336131520bbc67f52194f4aa9c547ea67
2012-08-30 15:36:51 +03:00