User:Gardimuer/wikia.js

//Checks if the viewer is admin or bureaucrat, and hides 'create blog' links if they aren't function HideBlogs { var autoconfirmed = false; var admin = false; var bureaucrat = false; var staff = false; var helper = false; var vstf = false;

for(i in wgUserGroups) { if(wgUserGroups[i] == 'autoconfirmed') {autoconfirmed = true;} if(wgUserGroups[i] == 'sysop') {admin = true;} if(wgUserGroups[i] == 'bureaucrat') {bureaucrat = true;} if(wgUserGroups[i] == 'staff') {staff = true;} if(wgUserGroups[i] == 'helper') {helper = true;} if(wgUserGroups[i] == 'vstf') {vstf = true;} }

if(admin == false && bureaucrat == false) { $('a[href="/wiki/Special:CreateBlogPage"]').css({'display': 'none'}) } } // if ($(hgroup span.group:contains(Admin)).length < 0){ $('li[data-id="blog"]').css({'display': 'none'}) } addOnloadHook(ContentCheck);