Skullyhead

Moeshit cup 3 team js

Feb 6th, 2020
1,095
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. var teamList = ["100oj","3hz","azu","bakuon","bocchi","dropout","hida","keion","kmb","kmd","lucky","lwa","pcr","sora","spyce","yucamp"];
  2. $('#vidchatcontrols').append("<span>Team Color: <select id='teamcolor' style='color:white;background:none;border-radius:5px;width:75px;padding:6px;'><option></option></select></span>");
  3. var TEAMCOLOR = getOrDefault(CHANNEL.name + "_TEAMCOLOR", '');
  4. for(var i =0, len = teamList.length; i< len; i++){
  5. $('#teamcolor').append('<option value="' + teamList[i] + '">/' + teamList[i] + '/</option>');
  6. }
  7. if (TEAMCOLOR){
  8. $('#teamcolor').val(TEAMCOLOR);
  9. }
  10. $('#teamcolor').change(function(){
  11. TEAMCOLOR = $(this).val();
  12. setOpt(CHANNEL.name + "_TEAMCOLOR", TEAMCOLOR);
  13. });
  14.  
  15.  
  16. //Format messages upon page load because they're handled differently and I can't find the function
  17. $('.teamColorSpan').each(function(){
  18. var color = $(this).text().replace(new RegExp('-','g'),'');
  19. $(this).parent().parent().find('.username').addClass(color);
  20. });
Add Comment
Please, Sign In to add comment