MCPcopy Create free account
hub / github.com/hoothin/UserScripts / keyup

Function keyup

Picviewer CE+/dist.user.js:27440–27457  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

27438 }
27439
27440 function keyup(event) {
27441 keypressing = false;
27442 let isFuncKey = !event.isTrusted || event.key == 'Alt' || event.key == 'Control' || event.key == 'Meta';
27443 if(isFuncKey && (prefs.floatBar.globalkeys.type == "hold" || !checkPreview(event)) && (uniqueImgWin && !uniqueImgWin.removed)){
27444 clearTimeout(checkFloatBarTimer);
27445 if(prefs.floatBar.globalkeys.closeAfterPreview){
27446 if (uniqueImgWin) {
27447 uniqueImgWin.remove();
27448 }
27449 }else{
27450 uniqueImgWin.focus();
27451 uniqueImgWin.imgWindow.classList.remove("pv-pic-window-transition-all");
27452 uniqueImgWin.imgWindow.classList.remove("preview");
27453 uniqueImgWin.previewed=true;
27454 uniqueImgWin = null;
27455 }
27456 }
27457 }
27458
27459 function createEleFromJson(json) {
27460 let collection = document.createDocumentFragment();

Callers

nothing calls this directly

Calls 2

removeMethod · 0.80
checkPreviewFunction · 0.70

Tested by

no test coverage detected