Skip to content

Commit

Permalink
update formatColors.js
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlieS1103 committed Jan 13, 2022
1 parent 4d7aee4 commit 4e3d064
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions formatColors/formatColors.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function convertColorSheet(){
// TODO: Fix the wall of ignores
// @ts-ignore
if (sheet.href == "https://xpui.app.spotify.com/colors.css" || sheet.ownerNode.classList[1] == "marketplaceScheme") {
console.log("test")
let cssText = sheet.rules[0].cssText
// @ts-ignore
cssText = cssText.replaceAll(":root {", "");
Expand All @@ -44,14 +43,10 @@ function convertColorSheet(){
cssText = cssText.replaceAll("#", "")
// @ts-ignore
cssText = cssText.replaceAll("}", "")

console.log(cssText)


const regex = /\\n|\\r\\n|\\n\\r|\\r/g;
const reg = /rgb.*?\\n/gm;
cssText = cssText.replace(reg, '')
console.log(cssText)

const htmlElement = `<span style="user-select: all;">${cssText.replace(regex, '<br>')}</span>`
Spicetify.PopupModal.display({
title: "Formatted Colors",
Expand Down

0 comments on commit 4e3d064

Please sign in to comment.