MCPcopy Create free account
hub / github.com/compat-table/compat-table / getBrowserColour

Function getBrowserColour

master.js:327–362  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

325
326 // browser engine color stripes
327 function getBrowserColour(name) {
328 /* Chakra */
329 if (/^(ie|edge1[2-8]$)/.test(name)) {
330 return "hsla(217, 85%, 54%, .5)";
331 }
332 /* SpiderMonkey */
333 if (/^(firefox|rhino)/.test(name)) {
334 return "hsla(35, 100%, 50%, .5)";
335 }
336 /* JavaScriptCore */
337 if (/^(webkit|safari|jxa|phantom|ios|android4_0|bun)/.test(name)) {
338 return "hsla(220, 25%, 70%, .5)";
339 }
340 /* Carakan */
341 if (/^opera([1-9]|1[0-2])(\D|$)|opera_mobile1[120]/.test(name)) {
342 return "hsla(358, 86%, 43%, .5)";
343 }
344 /* V8 */
345 if (/^(chrome|node|iojs|android4[1-9]|android[5-9]|samsung|opera(_mobile)?|edge|deno)/.test(name)) {
346 return "hsla(79, 100%, 37%, .5)";
347 }
348 /* KJS */
349 if (/^konq/.test(name)) {
350 return "hsla(200, 100%, 74%, .5)";
351 }
352 /* BESEN */
353 if (name === "besen") {
354 return "rgba(173, 108, 23, .5)";
355 }
356 /* Current browser */
357 if (name === "current") {
358 return "hsla(0, 0%, 75%, .5)";
359 }
360 /* Compilers */
361 return "hsla(52, 85%, 63%, .5)";
362 }
363
364 // Store number of features for each column/browser and numeric index.
365 // The reason this is done at runtime instead of build time is because

Callers 1

master.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected