Skip to content

Commit

Permalink
urlify CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
AlterTobi committed Nov 3, 2023
1 parent b655f31 commit a49f3c6
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions wfes-URLify.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
(function() {
"use strict";

const myCssId = "urlifyCSS";
const myStyle = `.externalLinkButton{
const myCssId = "wfes-urlifyCSS";
const myStyle = `.wfes-extLnkBtn{
border: 2pt solid white;
border-radius: 2pt;
width: 17pt;
width: 15pt;
font-size: 14px;
background-color: white;
color: black;
display: inline-block;
margin-left: 3pt;
height: 17pt;
height: 15pt;
box-shadow: 0 0 2px grey;
}
`;
Expand All @@ -26,13 +25,13 @@

// Button setzen
function setSmallButton(url, elem) {
const externalLinkButton = document.createElement("a");
externalLinkButton.setAttribute("target", "_blank");
externalLinkButton.setAttribute("class", "externalLinkButton");
externalLinkButton.setAttribute("title", encodeURI(url));
externalLinkButton.href = encodeURI(url);
externalLinkButton.innerHTML = "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z'/></svg>";
elem.appendChild(externalLinkButton);
const wfesExtLnkBtn = document.createElement("a");
wfesExtLnkBtn.setAttribute("target", "_blank");
wfesExtLnkBtn.setAttribute("class", "wfes-extLnkBtn");
wfesExtLnkBtn.setAttribute("title", encodeURI(url));
wfesExtLnkBtn.href = encodeURI(url);
wfesExtLnkBtn.innerHTML = "<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z'/></svg>";
elem.appendChild(wfesExtLnkBtn);
}

function detectURL() {
Expand Down

0 comments on commit a49f3c6

Please sign in to comment.