User:Pathoschild/2014–2016 global script migration
(Redirected from User:Pathoschild/2014–2015 global script migration)
These users had global.css or global.js subpages on Meta before August 19th 2014, when the GlobalCssJs extension was deployed. The extension now loads those pages automatically on all SUL-connected wikis, based on the convention introduced by synchbot in 2008–2014. If those users loaded the global CSS/JS through local pages like monobook.js or common.js (usually via synchbot), their scripts will now be loaded twice with potentially strange effects.
Review the affected users to determine whether they need to be migrated with the GlobalCssJs migration script or synchbot.
Affected users
edit✓ 1–50
edit✓ 51–100
edit✓ 101–150
edit✓ 151–200
edit↻ 201–250
edit❑ 251–290
editScripts
editBuild list of affected users
editThe list was generated with this SQL query on metawiki_p:
/**
* Find all users with a 'global.css' or 'global.js' subpage on Meta that was
* created before 19 August 2014 (when the GlobalCssJs deployment was announced).
*/
SELECT LEFT(page_title, INSTR(page_title, '/') - 1) AS `user`
FROM
page
LEFT JOIN revision ON page_id = rev_page
WHERE
page_namespace = 2
AND (page_title LIKE '%/global.js' OR page_title LIKE '%/global.css')
GROUP BY LEFT(page_title, INSTR(page_title, '/') - 1)
HAVING MIN(rev_timestamp) < 20140819000000
Filter toollabs:meta/userpages for custom CSS/JS pages
edit/**
* Filter the results of //tools.wmflabs.org/meta/userpages to only show CSS or JS subpages that may have custom scripts or styles
* (which is any that doesn't match the exact length of a CSS/JS import for the searched username).
*/
// analyse user
var username = $('#user').val();
var ignore_css_lengths = [];
var ignore_js_lengths = [];
var MIN_LEN = 1;
// filter pages
$('.result-box li').filter(':visible').each(function() {
// parse page
var item = $(this);
var title = item.find('a:first').text();
var size = parseInt(item.find('.page-size').text().replace(/(\d+) bytes/, '$1'));
// hide non-CSS/JS pages
if(!title.match(/user(?: talk)?:[^\/]+\/(cologneblue|common|global|modern|monobook|simple|vector)\.(css|js)$/i)) {
item.hide();
return;
}
// hide CSS/JS pages that look like an import
if((title.match(/\.css$/) && ignore_css_lengths.indexOf(size) != -1) || (title.match(/\.js$/) && ignore_js_lengths.indexOf(size) != -1)) {
item.hide();
return;
}
// ignore tiny pages (comment, empty, etc).
if(size < MIN_LEN) {
item.hide();
return;
}
});
// hide wikis with no pages shown
$('.result-box ul').filter(':visible').each(function() {
var list = $(this);
if(!list.find('li:visible:first').length) {
list.hide();
list.prev('h2').hide();
}
});