Last modified: 2014-07-24 19:27:22 UTC
I'd like to know about use of deprecated functions and properties at Wikimedia Commons. Using search (Lucene, Cirrus and Google) w/o quotation marks and w/o insource option I got very few intersection. Therefore I'd like to know whether there is still deprecated code around in the MW namespace at Commons. Please search for (case sensitive, full word only): * toJSON * evalJSON * secureEvalJSON * live * die * is_* is_clientPC is_chrome_mac is_chrome webkit_version is_safari_win is_safari webkit_match is_ff2 ff2_bugs is_ff2_win is_ff2_x11 opera95_bugs opera7_bugs opera6_bugs is_opera_95 is_opera_preseven is_opera ie6_bugs * doneOnloadHook * onloadFuncts * runOnloadHook * changeText * killEvt * addHandler * hookEvent * addClickHandler * removeHandler * getElementsByClassName * getInnerText * mwEditButtons * mwCustomEditButtons * checkboxes * lastCheckbox * setupCheckboxShiftClick * addCheckboxClickHandlers * checkboxClickHandler * injectSpinner * removeSpinner * escapeQuotes * escapeQuotesHTML * jsMsg * quoteString * addButton * insertTags * user.name * user.anonymous * util.wikiGetlink * util.tooltipAccessKeyPrefix * liveAndTestAtStart * $j * gM
mwgrep cannot be run on a single wiki
mwgrep is specifically designed to run a search across all wikis. It doesn't have an option to search one wiki. To search an individual wiki, just use Special:Search (with namespace=8 to limit results to the MediaWiki-namespace). mwgrep uses the same ElasticSearch backend that the new CirrusSearch uses (which you may have to opt-in via the preferences, or pass &srbackend=CirrusSearch to Special:Search). As general advice I'd also recommend you don't use search too much when working your way through deprecations. The console is more reliable for this. Both because search in general tends to be fragile (it's meant for English, not code, it misses random things all the time), and encourages a mindset of "0 matches means the code is good". Which is wrong not only because search is fragile, but also because lots of deprecations don't have a text match (e.g. specific signatures of jQuery methods). You should identify deprecations through the console by it emitting a warning. This way you catch them all, and you're also able to debug it locally, find where the warning is coming from (e.g. make some edits locally, try it out, etc.). And it also helps focus on code that is actually run on pages you use (as opposed to potentially abandoned/unused code). As we get closer to the deadline, I will make a few dumps of global mwgrep searches which you may use to also find the left overs on Commons (they'll be grouped by wiki)
(In reply to Krinkle from comment #2) > I will make a few dumps of global mwgrep searches which you may use to also > find the left overs on Commons Thank you! > And it also helps focus on code that is actually run on pages you use I don't agree. Non-considered deprecations are ticking time bombs waiting to somebody tick a checkmark, blowing up their JavaScript execution and making them to complain at the Village Pump that their whole JS does not work by using obfuscated symptoms like "Link X went away yesterday" because they didn't realize that ticking the checkmark was the trigger.