-
Notifications
You must be signed in to change notification settings - Fork 2
/
qsog.min.js
1 lines (1 loc) · 1.28 KB
/
qsog.min.js
1
var ogExistingElements=document.getElementsByClassName("ogOverlay");if(ogExistingElements.length>0){for(;ogExistingElements.length>0;)ogExistingElements[0].parentNode.removeChild(ogExistingElements[0]);console.log("qsog - cleared screen")}else for(var ogElements=document.getElementsByClassName("qv-gridcell"),i=0;i<ogElements.length;i++){var ogElement=ogElements[i],ogHtmlOuter=document.createElement("div");ogHtmlOuter.style.position="absolute",ogHtmlOuter.style.bottom=0,ogHtmlOuter.style.right=0,ogHtmlOuter.style.zIndex=2,ogHtmlOuter.style.margin="2px",ogHtmlOuter.style.padding="10px",ogHtmlOuter.style.backgroundColor="#6bb345",ogHtmlOuter.style.userSelect="text",ogHtmlOuter.style.color="#FFFFFF",ogHtmlOuter.className="ogOverlay",ogHtmlOuter.innerHTML='<a id="ogOverlay'+i+'" onclick="ogCopyToClipboard(document.getElementById(\'ogOverlay'+i+'\').innerHTML)" style="color:#FFFFFF;text-decoration:none;user-select:text;">'+ogElement.getAttribute("tid")+"</a>",ogElement.appendChild(ogHtmlOuter),console.log("Element "+i+" id: "+ogElement.getAttribute("tid"))}function ogCopyToClipboard(e){function t(t){t.clipboardData.setData("text/plain",e),t.preventDefault()}document.addEventListener("copy",t),document.execCommand("copy"),document.removeEventListener("copy",t),console.log("Copied "+e+" to clipboard")}