Commit 1cf2f32c authored by taco@waag.org's avatar taco@waag.org
Browse files

handle chrome css exception

parent 51bd650a
......@@ -11,6 +11,17 @@
font-family: monospace;
}
.pop-button-chrome {
margin-top: 10px;
float: right;
cursor: pointer;
background-image: url('chrome-extension://__MSG_@@extension_id__/icons/clippy.svg');
padding: .25rem;
color: black;
height: 2rem;
width: 2rem;
}
.pop-button {
margin-top: 10px;
float: right;
......
......@@ -41,7 +41,12 @@ if (window.hasRun) {
//renders a copybutton for the fragment
function appendCopyButton(fragment, type, message, envelope){
let button = document.createElement('button');
button.classList.add('pop-button');
let isFirefox = navigator.userAgent.indexOf('Firefox') !== -1;
if (!isFirefox) {
button.classList.add('pop-button-chrome');
} else {
button.classList.add('pop-button');
}
button.type = "button";
button.onclick = function() {toClipboard(message,envelope,type)};
fragment.appendChild(button);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment