// ==UserScript== // @name Your Show // @name:zh-CN 演示助手 // @description Display the mouse position and pressed keys. // @description:zh-CN 显示鼠标位置和按下的按键。 // @namespace https://greasyfork.org/users/197529 // @version 0.1.5 // @author kkocdko // @license Unlicense // @match *://*/* // @downloadURL none // ==/UserScript== "use strict"; const css = ([s]) => ``; { const host = document.body.appendChild(document.createElement("div")); const root = host.attachShadow({ mode: "open" }); root.innerHTML = css` :host { position: fixed; z-index: 2147483647; } div { position: fixed; z-index: 2147483647; width: 30px; height: 30px; left: 0; top: 0; background: #3f51b5a1; border-radius: 50%; /* transition: transform 0.2s 0.06s; */ user-select: none; pointer-events: none; border-top-left-radius: 0; } `; const el = root.appendChild(document.createElement("div")); addEventListener("pointermove", (e) => { el.style.transform = "translate(" + e.clientX + "px," + e.clientY + "px)"; }); } { const host = document.body.appendChild(document.createElement("div")); const root = host.attachShadow({ mode: "open" }); root.innerHTML = css` :host { position: fixed; z-index: 2147483647; } div { position: fixed; top: 16px; right: 16px; z-index: 2147483647; font-size: 20px; text-shadow: 1px 1px #fff, 1px -1px #fff, -1px 1px #fff, -1px -1px #fff; user-select: none; pointer-events: none; font-family: monospace; } span { line-height: 2; padding: 0 0.5em; margin: 4px; display: inline-block; box-shadow: 0 1px 5px 1px #888; border-radius: 8px; background: #fff; color: #000; } `; //