Advertisement
blueYOSHI

JS code (paste on any website, preferably a empty one

Aug 5th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var article = `
  2. {| class="wikitable" style="width:100%"
  3. |-
  4. ! colspan=2 width=25% style="background:#FF0001" | {{color-link|Mario|white}}
  5. ! colspan=2 width=25% style="background:#00C100" | {{color-link|Luigi|white}}
  6. ! colspan=2 width=25% style="background:#000000" | {{color-link|Bowser|white}}
  7. ! colspan=2 width=25% style="background:#FF599B" | {{color-link|Princess Peach|white|Peach}}
  8. |- align="center" style="background: #FFFFFF"
  9. | colspan=2 | [[File:MSBL Mario artwork 2.png|200px]]
  10. | colspan=2 | [[File:MSBL Luigi artwork.png|200px]]
  11. | colspan=2 | [[File:MSBL Bowser artwork.png|200px]]
  12. | colspan=2 | [[File:MSBL Peach Artwork.png|200px]]
  13. |-
  14. | colspan=2 style="text-align:center" | ''Mario's high technique and shooting attributes make him a great choice for those seeking a balanced, capable character.''
  15. | colspan=2 style="text-align:center" | ''Luigi is a well-rounded team player who excels at setting up shots with his high passing attribute.''
  16. | colspan=2 style="text-align:center" | ''Bowser's powerful offense dominates the field with incredible shots and brutal tackles.''
  17. | colspan=2 style="text-align:center" | ''Quick and capable, Peach's high movement and technique attributes help her confuse and evade opponents.''
  18. |-
  19. ! Type
  20. | Technique
  21. ! Type
  22. | Technique
  23. ! Type
  24. | Physical
  25. ! Type
  26. | Speed
  27. |-
  28. ! Default color
  29. | Red
  30. ! Default color
  31. | Green
  32. ! Default color
  33. | Dark gray
  34. ! Default color
  35. | Pink
  36. |-
  37. ! Team number
  38. | 1
  39. ! Team number
  40. | 2
  41. ! Team number
  42. | 66
  43. ! Team number
  44. | 10
  45. |-
  46. ! Hyper Strike
  47. | Fire Cyclone
  48. ! Hyper Strike
  49. | Spin Tornado
  50. ! Hyper Strike
  51. | Flame Cannon
  52. ! Hyper Strike
  53. | Dance of Hearts
  54. |-
  55. ! Strength
  56. | 11/25
  57. ! Strength
  58. | 11/25
  59. ! Strength
  60. | 17/25
  61. ! Strength
  62. | 9/25
  63. |-
  64. ! Speed
  65. | 12/25
  66. ! Speed
  67. | 11/25
  68. ! Speed
  69. | 9/25
  70. ! Speed
  71. | 17/25
  72. |-
  73. ! Shooting
  74. | 14/25
  75. ! Shooting
  76. | 10/25
  77. ! Shooting
  78. | 17/25
  79. ! Shooting
  80. | 9/25
  81. |-
  82. ! Passing
  83. | 10/25
  84. ! Passing
  85. | 14/25
  86. ! Passing
  87. | 11/25
  88. ! Passing
  89. | 13/25
  90. |-
  91. ! Technique
  92. | 16/25
  93. ! Technique
  94. | 17/25
  95. ! Technique
  96. | 9/25
  97. ! Technique
  98. | 15/25
  99. |-
  100. ! colspan=2 width=25% style="background:#30D5C8" | {{color-link|Rosalina|white}}
  101. ! colspan=2 width=25% style="background:#ff0000" | {{color-link|Toad|white}}
  102. ! colspan=2 width=25% style="background:#36D836" | {{color-link|Yoshi|white}}
  103. ! colspan=2 width=25% style="background:#BEB33E" | {{color-link|Donkey Kong|white}}
  104. |- align="center" style="background: #FFFFFF"
  105. | colspan=2 | [[File:MSBL Rosalina Artwork.png|200px]]
  106. | colspan=2 | [[File:MSBL Toad Artwork.png|200px]]
  107. | colspan=2 | [[File:MSBL Yoshi artwork.png|200px]]
  108. | colspan=2 | [[File:MSBL Donkey Kong artwork.png|200px]]
  109. |-
  110. | colspan=2 style="text-align:center" | ''A powerhouse on offense, Rosalina's mighty shooting ability will put any goalie to the test.''
  111. | colspan=2 style="text-align:center" | ''Toad’s high speed and passing attributes are perfect for any team looking to quickly set up a potent offense. In Quick Battle and Cup Battles, you can have more than one Toad on a team.''
  112. | colspan=2 style="text-align:center" | ''Yoshi is always ready to help out his team with excellent passing and strong shooting. In Quick Battle and Cup Battles, you can have more than one Yoshi on a team.''
  113. | colspan=2 style="text-align:center" | ''With his crushing tackle and skillful passing, Donkey Kong is a defensive barrier few can surmount.''
  114. |-
  115. ! Type
  116. | Offense
  117. ! Type
  118. | Speed
  119. ! Type
  120. | Offense
  121. ! Type
  122. | Defense
  123. |-
  124. ! Default color
  125. | Cyan
  126. ! Default color
  127. | Red
  128. ! Default color
  129. | Green
  130. ! Default color
  131. | Yellow
  132. |-
  133. ! Team number
  134. | 11
  135. ! Team number
  136. | 12
  137. ! Team number
  138. | 8
  139. ! Team number
  140. | 55
  141. |-
  142. ! Hyper Strike
  143. | Orbital Burst
  144. ! Hyper Strike
  145. | Drill Smash
  146. ! Hyper Strike
  147. | Egg Stomp
  148. ! Hyper Strike
  149. | Banana Blast
  150. |-
  151. ! Strength
  152. | 14/25
  153. ! Strength
  154. | 9/25
  155. ! Strength
  156. | 10/25
  157. ! Strength
  158. | 16/25
  159. |-
  160. ! Speed
  161. | 9/25
  162. ! Speed
  163. | 17/25
  164. ! Speed
  165. | 10/25
  166. ! Speed
  167. | 9/25
  168. |-
  169. ! Shooting
  170. | 17/25
  171. ! Shooting
  172. | 11/25
  173. ! Shooting
  174. | 17/25
  175. ! Shooting
  176. | 13/25
  177. |-
  178. ! Passing
  179. | 10/25
  180. ! Passing
  181. | 15/25
  182. ! Passing
  183. | 17/25
  184. ! Passing
  185. | 16/25
  186. |-
  187. ! Technique
  188. | 13/25
  189. ! Technique
  190. | 11/25
  191. ! Technique
  192. | 9/25
  193. ! Technique
  194. | 9/25
  195. |-
  196. ! colspan=2 width=25% style="background:#FFE500" | {{color-link|Wario|black}}
  197. ! colspan=2 width=25% style="background:#6D2DC3" | {{color-link|Waluigi|white}}
  198. ! colspan=2 width=25% style="background:#FF0000" | {{color-link|Shy Guy|white}} <small>{{color|(version 1.1.0)|white}}</small><ref name=Update1/>
  199. ! colspan=2 width=25% style="background:#FFA500" | {{color-link|Princess Daisy|white|Daisy}} <small>{{color|(version 1.1.0)|white}}</small><ref name=Update1/>
  200. |- align="center" style="background: #FFFFFF"
  201. | colspan=2 | [[File:MSBL Wario Artwork.png|200px]]
  202. | colspan=2 | [[File:MSBL Waluigi Artwork.png|200px]]
  203. | colspan=2 | [[File:MSBL Shy Guy Artwork.png|200px]]
  204. | colspan=2 | [[File:MSBL Daisy Artwork.png|200px]]
  205. |-
  206. | colspan=2 style="text-align:center" | ''Boasting high strength and fierce shooting power, Wario eagerly tackles his way to the front lines to take his shot.''
  207. | colspan=2 style="text-align:center" | ''A nimble defender, Waluigi uses his high speed and technique to rush over and knock opponents down with a punishing tackle.''
  208. | colspan=2 style="text-align:center" | ''An evenly-balanced player, Shy Guy is always eager to take the field, no matter the position. In Quick Battle and Cup Battles, you can have more than one Shy Guy on a team.''
  209. | colspan=2 style="text-align:center" | ''Whether on offense or defense, Daisy’s high technique and passing skills will keep opponents guessing.''
  210. |-
  211. ! Type
  212. | Physical
  213. ! Type
  214. | Defense
  215. ! Type
  216. | All-Rounder
  217. ! Type
  218. | Technique
  219. |-
  220. ! Default color
  221. | Yellow
  222. ! Default color
  223. | Purple
  224. ! Default color
  225. | Red
  226. ! Default color
  227. | Orange
  228. |-
  229. ! Team number
  230. | 00
  231. ! Team number
  232. | 0
  233. ! Team number
  234. | 3
  235. ! Team number
  236. | 9
  237. |-
  238. ! Hyper Strike
  239. | Electric Ricochet
  240. ! Hyper Strike
  241. | Thorn Barrier
  242. ! Hyper Strike
  243. | Propeller Dive
  244. ! Hyper Strike
  245. | Flower Spiral
  246. |-
  247. ! Strength
  248. | 17/25
  249. ! Strength
  250. | 15/25
  251. ! Strength
  252. | 13/25
  253. ! Strength
  254. | 13/25
  255. |-
  256. ! Speed
  257. | 9/25
  258. ! Speed
  259. | 16/25
  260. ! Speed
  261. | 12/25
  262. ! Speed
  263. | 9/25
  264. |-
  265. ! Shooting
  266. | 15/25
  267. ! Shooting
  268. | 9/25
  269. ! Shooting
  270. | 13/25
  271. ! Shooting
  272. | 10/25
  273. |-
  274. ! Passing
  275. | 13/25
  276. ! Passing
  277. | 9/25
  278. ! Passing
  279. | 13/25
  280. ! Passing
  281. | 13/25
  282. |-
  283. ! Technique
  284. | 9/25
  285. ! Technique
  286. | 14/25
  287. ! Technique
  288. | 12/25
  289. ! Technique
  290. | 18/25
  291. |-
  292. |}
  293. `
  294.  
  295. function getColor (character, statType) {
  296.  
  297.     switch (character) {
  298.         case 'Mario':
  299.             return '#FF0001';
  300.         case 'Luigi':
  301.             return '#00C100';
  302.         case 'Bowser':
  303.             return '#000000';
  304.         case 'Peach':
  305.             return '#FF599B';
  306.         case 'Rosalina':
  307.             return '#30D5C8';
  308.         case 'Toad':
  309.             return '#ff0000';
  310.         case 'Yoshi':
  311.             return '#36D836';
  312.         case 'DK':
  313.             return '#BEB33E';
  314.         case 'Wario':
  315.             return '#FFE500';
  316.         case 'Waluigi':
  317.             return '#6D2DC3';
  318.         case 'Shy Guy':
  319.             return '#FF0000';
  320.         case 'Daisy':
  321.             return '#FFA500';
  322.     }
  323.  
  324.     switch (statType) {
  325.         case 'Strength':
  326.             return '#480A0A';
  327.         case 'Speed':
  328.             return '#7FD5E3';
  329.         case 'Shooting':
  330.             return '#BB2D2D';
  331.         case 'Passing':
  332.             return '#CC8F1C';
  333.         case 'Technique':
  334.             return '#BB27C8';
  335.     }
  336. }
  337.  
  338. article = article.split('\n');
  339.  
  340. var curType = '';
  341. var curChar = '';
  342. var stats = {
  343.     Strength: -1,
  344.     Speed: -1,
  345.     Shooting: -1,
  346.     Passing: -1,
  347.     Technique: -1
  348. }
  349. var teamNumber = false;
  350.  
  351. for (const i in article) {
  352.  
  353.     if (teamNumber === true) {
  354.         teamNumber = false;
  355.         continue;
  356.     }
  357.  
  358.     switch (article[i]) {
  359.         case '! Team number':
  360.             teamNumber = true;
  361.             continue;
  362.         case '! Strength':
  363.             curType = 'Strength';
  364.             stats.Strength++;
  365.             continue;
  366.         case '! Speed':
  367.             curType = 'Speed';
  368.             stats.Speed++;
  369.             continue;
  370.         case '! Shooting':
  371.             curType = 'Shooting';
  372.             stats.Shooting++;
  373.             continue;
  374.         case '! Passing':
  375.             curType = 'Passing';
  376.             stats.Passing++;
  377.             continue;
  378.         case '! Technique':
  379.             curType = 'Technique';
  380.             stats.Technique++;
  381.             continue;
  382.     }
  383.  
  384.     var num = parseFloat(article[i].substring(2));
  385.  
  386.     if (isNaN(num) === true)
  387.         continue;
  388.  
  389.     switch (stats[curType]) {
  390.             case 0:
  391.                 curChar = 'Mario';
  392.                 break;
  393.             case 1:
  394.                 curChar = 'Luigi';
  395.                 break;
  396.             case 2:
  397.                 curChar = 'Bowser';
  398.                 break;
  399.             case 3:
  400.                 curChar = 'Peach';
  401.                 break;
  402.             case 4:
  403.                 curChar = 'Rosalina';
  404.                 break;
  405.             case 5:
  406.                 curChar = 'Toad';
  407.                 break;
  408.             case 6:
  409.                 curChar = 'Yoshi';
  410.                 break;
  411.             case 7:
  412.                 curChar = 'DK';
  413.                 break;
  414.             case 8:
  415.                 curChar = 'Wario';
  416.                 break;
  417.             case 9:
  418.                 curChar = 'Waluigi';
  419.                 break;
  420.             case 10:
  421.                 curChar = 'Shy Guy';
  422.                 break;
  423.             case 11:
  424.                 curChar = 'Daisy';
  425.                 break;
  426.     }
  427.  
  428.     article[i] = `| style="background: linear-gradient(90deg, ${getColor(curChar, curType)} ${(num/25*100).toFixed()}%, #0000 0);" | ${num}`
  429. }
  430. var elem = document.createElement('textarea');
  431. elem.style = 'z-index: 999999; height: 100%; width: 100%; background-color: white; position: absolute; top: 0; left: 0;';
  432. elem.value = article.join('\n');
  433. document.querySelector('body').appendChild(elem);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement