Thread:JosephHawk/@comment-34168911-20150606190955/@comment-26479628-20150606202630

Okay, so you have function addMastheadTags ( ) rights = { } rights[ "P9ii23ddCmJ" ] = [ "Owner" ] ; rights[ <span class="st0" style="color:rgb(42,161,152);">"ShinemanSpaghetti" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"Bureaucrat" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; rights<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"Munchlax88" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"Bureaucrat" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="sy0" style="color:rgb(51,153,51);">But instead, put this: <span class="kw0" style="font-weight:bold;white-space:normal;color:rgb(7,54,66);">function   <span class="re0" style="white-space:normal;color:rgb(38,139,210);">addMastheadTags <span class="br0" style="white-space:normal;color:rgb(0,153,0);">( <span class="br0" style="white-space:normal;color:rgb(0,153,0);">)   <span class="br0" style="white-space:normal;color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var rights <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">{ <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(147,161,161);">// BEGIN List of Accounts Given Extra User Rights Icons - Must list all tags rights<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"P9ii23ddCmJ" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"Owner" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; rights<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"ShinemanSpaghetti" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"Bureaucrat" <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span style="color:rgb(88,110,117);">   rights <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"Munchlax88" <span class="br0" style="color:rgb(0,153,0);">] <span style="color:rgb(88,110,117);"> =<span style="color:rgb(88,110,117);"> <span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(42,161,152);">"Bureaucrat" <span class="br0" style="color:rgb(0,153,0);">] ; <span class="co1" style="font-style:italic;color:rgb(147,161,161);">// END List of Accounts Given Extra User Rights Icons <span class="co1" style="font-style:italic;color:rgb(147,161,161);">// BEGIN Script to Remove Old Rights Icons & Insert New <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( wgCanonicalSpecialPageName <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(42,161,152);">"Contributions" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var user <span class="sy0" style="color:rgb(51,153,51);">= wgPageName.<span class="me1" style="color:rgb(38,139,210);">substring <span class="br0" style="color:rgb(0,153,0);">( wgPageName.<span class="me1" style="color:rgb(38,139,210);">lastIndexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">"/" <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(211,54,130);">1 <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(147,161,161);">/_/g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(42,161,152);">" " <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var user <span class="sy0" style="color:rgb(51,153,51);">= wgTitle<span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">typeof rights<span class="br0" style="color:rgb(0,153,0);">[ user<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(42,161,152);">"undefined" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(147,161,161);">// remove old rights <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'.UserProfileMasthead .masthead-info span.tag' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">remove <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">var i<span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(211,54,130);">0 <span class="sy0" style="color:rgb(51,153,51);">, len<span class="sy0" style="color:rgb(51,153,51);">= rights<span class="br0" style="color:rgb(0,153,0);">[ user<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(38,139,210);">length <span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">< len<span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(147,161,161);">// add new rights <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'<span class="tag" span style="margin-left: 10px !important">' <span class="sy0" style="color:rgb(51,153,51);">+ rights<span class="br0" style="color:rgb(0,153,0);">[ user<span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+           <span class="st0" style="color:rgb(42,161,152);">' ' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(38,139,210);">appendTo <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'.masthead-info hgroup' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(147,161,161);">// END Script to Remove Old Rights Icons & Insert New <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ <span class="br0" style="color:rgb(0,153,0);">( <span class="kw0" style="font-weight:bold;color:rgb(7,54,66);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{   <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(133,153,0);">$ <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(42,161,152);">'#UserProfileMasthead' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{      addMastheadTags<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="sy0" style="color:rgb(51,153,51);">