Skip to content
Snippets Groups Projects
Commit 85b3487a authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Fix styles for date-button.

parent 8b00f3a4
No related branches found
No related tags found
No related merge requests found
// ==UserScript==
// @name Date Button
// @namespace http://hugo.hornquist.se
// @version 0.1.1
// @version 0.1.2
// @author hugo@lysator.liu.se
// @match *
// @description Inputs the current date into the current text field.
......@@ -16,6 +16,7 @@
(function () {
'use strict';
let btn_id = 'id-37582c25-78ad-4922-a19b-244361f42ec0'
function serialize_event(e) {
return {
......@@ -52,10 +53,7 @@
}
let btn = document.createElement('button');
btn.style.position = 'absolute';
btn.style.top = '1em';
btn.style.left = '1em';
btn.id = btn_id;
let registered_key_combo = GM_getValue('date-key');
console.log(registered_key_combo);
......@@ -106,20 +104,18 @@
});
let style = document.createElement('style');
style.textContent = `button:focus {background: pink;})`
style.textContent = `
#${btn_id} {
position: absolute;
top: 1em;
left: 1em;
z-index: 10000;
}
#${btn_id}:focus {
background: pink;
}
`
document.head.appendChild(style);
})();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment