diff --git a/html_resources/ext.svg b/html_resources/ext.svg new file mode 100644 index 0000000..2edf190 --- /dev/null +++ b/html_resources/ext.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/html_resources/main.css b/html_resources/main.css index 16fbef1..6b44cf6 100644 --- a/html_resources/main.css +++ b/html_resources/main.css @@ -28,8 +28,9 @@ pre:empty{ display: none } max-width: 50ch; cursor: pointer } +.target > a::after{ content: ""; width: 1ch; background-image: url("ext.svg") } .target:hover{ background-color: rgb(80,80,90) } -#targets{ display: flex; flex-wrap: wrap } +#targets{ display: grid; grid-template-columns: 1fr 1fr 1fr } pre{ white-space: pre-wrap; diff --git a/html_resources/selector.js b/html_resources/selector.js index 27e45a0..c67350a 100644 --- a/html_resources/selector.js +++ b/html_resources/selector.js @@ -52,7 +52,7 @@ let previousCategory = new (function(){ })() function getText(node){ - return node.childNodes[0].textContent + return `${node.childNodes[0].textContent}.css` } async function onCategoryClicked(categoryNode){ @@ -98,12 +98,12 @@ function createCategories(){ const createNode = function(name,type){ let node = document.createElement("div"); node.classList.add(type); - node.textContent = name; + node.textContent = name.substring(0,name.lastIndexOf(".")); if(type === "target"){ let link = node.appendChild(document.createElement("a")); node.classList.add("hidden"); link.href = `https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/${name}`; - link.textContent = "Github"; + link.title = "See on Github"; } return node;