From e1189660d9c11e4bc4ba118e3f15b925b7ea0988 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:30:32 +0500 Subject: [PATCH 01/28] Add files via upload --- extensions/WheelScroll.js | Bin 0 -> 33372 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 extensions/WheelScroll.js diff --git a/extensions/WheelScroll.js b/extensions/WheelScroll.js new file mode 100644 index 0000000000000000000000000000000000000000..75d0d85e9ae20445d5645ea046ade6f044a84eed GIT binary patch literal 33372 zcmeI5YjYIGddKI5UZpCZA=r5V)Hw%)E;jhWi9iCDqstLU1}Sl!0!fx7kRZ~6fRw*_ zlK-#&`>1<%W>;4ni>O?9wLLvgKlfYr&iv1R->hy{SE~8yMYU6HRNv|EXVtIzYomIt zzn@lX)n4^Rf4{E&x%wx~Wp<~UPBW)9Yqy%HwyIavt!k{ev;98i??;QFuqrP zY+(GCg!7f^2SMrTzqf+=U82yiUTADh*KTOdE&Y8%Yp!eUo4xh-H2`Z4uZxcVO7pMiud9c&?Q6w7t;?NPtM3mXS^_h=hFtclKkKe7 zt#U=!yb%2L>ZQg%BwWD&sJ?!!`l@ejDEc7yP_VCA;I}V2!MF*njwx`v;tp6G=*Hfb{593VtN0Fl;}&zSR6lC$syK}7UPxEAgv$$Q+J^LCzk08~{v>L4MCtdE!V8UU zRNu%x{#^aNdL$bgt5&6l_tNL{>T&f+bDmXqg#X_qnU3zAt+uu5mi~T}wDM*3u$t67 zu0Iy0>l%L|J}+p_ZLPRoji-OJ;`5s3&1&^KT7z|N>))L8b4v4PH80lhB#a+Q`}c+A zuI79rJRfTHxB9-L(K}jyN9&KK^`>-vR;$3>so70pD#7`STJVweMXorR7zuV*QsOIcc4@B3RWb{Gv)^*>q@R=1| zGoo=`e3%eEv(b?h>v7+%?!ega+o_ySz=(r^g@%@S5Tdvs-&(9&nRZ(n$$cdP?l zmh+_K1wY>wVJqM_T8- z=8tKe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bG4@H~Y4zD^JOG5z|1oO~XojL(sOm2_fXeo75>X;Ypb zb+x{p_dn|O5jGs>;hOpqc3Rhe*AdjCQ4eCT#EbY*2M8KjRT^fj2xK zcK&z#`MLjl`u&-+{wngg=Up%B58H#EF4w02S)b99%le}~zFyWJ)GN*UGV6`&#QymD z<<}q7G48h#=gbe+ALL`~(^LOAe{9z~vm-G6}KlB!o`g6pgBA%+AvArRVz$w;V)r_yw z6T?Tvq4F8;+{=IeSCmW(^F48cC&%X}&j(hG}CrMcF6a z8&6A*yMC)ZWt~w!X+5qF=hcelf0?}cc<#J<{>Ad@!@2Vc8@#K3UzP=KeHK3b@Wt`z z&AIalKlSD5)B0!O)0d}D@6Mf1`0_7LpU5rFH$Q++U!Fd_J|UleYrF+$NqHRa{MlE| zNtU~D$oKx-l6MK!XObiHcBOZEs?D{&JdpS5@K&Z~cDSKxj{Wxhwy3Mszl{9b$la0e z^#A)K_w+eBa;5rCBj1lqj!fwrnP$H}xK^lV*v?B?_iDO-d}N{z)?GpVVdQTkk4A3m zufG=SKGevVW={%(sgVU;{deWpZCUKkf_^-F&IgmW)m&q}8-O8iP2pWB8>$tJ!U6zF z-NG*(?Sb*SygA9Tt9w>f@cZw65zKd~r{H;m-lld{75DXm`+*amJZX&g z>+NZ;%uxPS_58Q$)!kS3_I^W(ac{nF?C?I`N5q-5adpfF@gd(get6$KRbk`W_2hjw zgYFBfjAx)Ns|#TZs(;_GSSF81Y=&lzxjN%qhRnZK%z+KXRH#R&Da=M z_+~+{XOo)w+!h^X|c+Kb9R0@|%NX{PO?}4UIg? z(%N+uJs#}C;oNY&V#ZngZ(!e!U76_*))gwWn7K`O%T4jYDnSub}?oaAf8d3w literal 0 HcmV?d00001 From a874feb2ee7f937d391e13f723bdd67a6e7ad2a0 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:31:41 +0500 Subject: [PATCH 02/28] Update and rename extensions/WheelScroll.js to extensions/Den4ik-12/WheelScroll.js --- extensions/Den4ik-12/WheelScroll.js | 163 ++++++++++++++++++++++++++++ extensions/WheelScroll.js | Bin 33372 -> 0 bytes 2 files changed, 163 insertions(+) create mode 100644 extensions/Den4ik-12/WheelScroll.js delete mode 100644 extensions/WheelScroll.js diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js new file mode 100644 index 0000000000..ba18386b76 --- /dev/null +++ b/extensions/Den4ik-12/WheelScroll.js @@ -0,0 +1,163 @@ +// Name: Wheel Scroll +// ID: Den4ik12WheelScroll +// Description: Blocks for detecting mouse wheel scrolling. +// By: Den4ik-12 + +(function(Scratch) { + 'use strict'; + +// Error, if sandboxed + if (!Scratch.extensions.unsandboxed) { + throw new Error('\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n'); + } + +// Icons + const ExtIcon = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDUiIGhlaWdodD0iMjA1IiB2aWV3Qm94PSIwLDAsMjA1LDIwNSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNy41LC03Ny41KSI+PGcgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aXNQYWludGluZ0xheWVyJnF1b3Q7OnRydWV9IiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZS1saW5lY2FwPSJidXR0IiBzdHJva2UtbGluZWpvaW49Im1pdGVyIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS1kYXNoYXJyYXk9IiIgc3Ryb2tlLWRhc2hvZmZzZXQ9IjAiIHN0eWxlPSJtaXgtYmxlbmQtbW9kZTogbm9ybWFsIj48cGF0aCBkPSJNMTQwLDE4MGMwLC01NS4y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DUuNjAzODgsNS41OTIyM2MwLDAgMS43MjQyNCwxLjM5OTU3IDMuMDU1NTUsMS40MDMxOWMxLjMzMTI5LDAuMDAzNjEgMi45MDY2OCwtMS4zODcwMSAyLjkwNjY4LC0xLjM4NzAxeiIgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aW5kZXgmcXVvdDs6bnVsbH0iIGZpbGw9IiNmZmZmZmYiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIwIi8+PHBhdGggZD0iTTE4MS4zMzMzMywyMzguNjY2Njd2LTExNy4zMzMzM2gxMTcuMzMzMzN2MTE3LjMzMzMzeiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9Ik5hTiIvPjwvZz48L2c+PC9zdmc+PCEtLXJvdGF0aW9uQ2VudGVyOjU4LjY2NjY2NjY2NjY2NjY2OjU4LjY2NjY2NjY2NjY2NjY2LS0+'; + +// Scroll Events + document.querySelector("body").onwheel = scroll; + + function scroll(event) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScroll'); + if (event.deltaZ != 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'az' + }); + } + if (event.deltaY != 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'ay' + }); + } + if (event.deltaX != 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'ax' + }); + } + if (event.deltaZ > 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'i' + }); + } + if (event.deltaZ < 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'o' + }); + } + if (event.deltaY > 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'd' + }); + } + if (event.deltaY < 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'u' + }); + } + if (event.deltaX > 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'r' + }); + } + if (event.deltaX < 0) { + Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { + SCROLL_TYPE: 'l' + }); + } + }; + +// Translate + Scratch.translate.setup({ + ru: { + extName: 'Прокрутка колеса', + whenScrollDir: 'когда колесо мыши прокручивается [SCROLL_TYPE]', + whenScroll: 'когда колесо мыши прокручивается', + menuSCROLL_TYPEvalueU: 'вверх', + menuSCROLL_TYPEvalueD: 'вниз', + menuSCROLL_TYPEvalueL: 'влево', + menuSCROLL_TYPEvalueR: 'вправо', + menuSCROLL_TYPEvalueO: 'out', + menuSCROLL_TYPEvalueI: 'in', + menuSCROLL_TYPEvalueAX: 'вдоль оси x', + menuSCROLL_TYPEvalueAY: 'вдоль оси y', + menuSCROLL_TYPEvalueAZ: 'вдоль оси z', + }, + }); + +// Extension + class WheelScroll { + getInfo() { + return { + id: 'Den4ik12WheelScroll', + name: Scratch.translate({id: 'extName', default: 'Whell Scroll'}), + color1: '#E74C3C', + color2: '#CB4335', + color3: '#B03A2E', + menuIconURI: ExtIcon, + blockIconURI: BlockIcon, + blocks: [ + { + opcode: 'whenScrollDir', + text: Scratch.translate({id: 'whenScrollDir', default: 'when mouse whell scrolls [SCROLL_TYPE]'}), + blockType: Scratch.BlockType.EVENT, + isEdgeActivated: false, + arguments: { + SCROLL_TYPE: { + type: Scratch.ArgumentType.STRING, + menu: 'SCROLL_TYPE' + } + } + }, + { + opcode: 'whenScroll', + text: Scratch.translate({id: 'whenScroll', default: 'when mouse wheel scrolls'}), + blockType: Scratch.BlockType.EVENT, + isEdgeActivated: false + }, + ], + menus: { + SCROLL_TYPE: [ + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueU', default: 'up'}), + value: 'u' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueD', default: 'down'}), + value: 'd' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueL', default: 'to the left'}), + value: 'l' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueR', default: 'to the right'}), + value: 'r' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueO', default: 'out'}), + value: 'o' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueI', default: 'in'}), + value: 'i' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueAX', default: 'along the x-axis'}), + value: 'ax' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueAY', default: 'along the y-axis'}), + value: 'ay' + }, + { + text: Scratch.translate({id: 'menuSCROLL_TYPEvalueAZ', default: 'along the z-axis'}), + value: 'az' + } + ] + } + }; + } + } + Scratch.extensions.register(new WheelScroll()); +})(Scratch); diff --git a/extensions/WheelScroll.js b/extensions/WheelScroll.js deleted file mode 100644 index 75d0d85e9ae20445d5645ea046ade6f044a84eed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33372 zcmeI5YjYIGddKI5UZpCZA=r5V)Hw%)E;jhWi9iCDqstLU1}Sl!0!fx7kRZ~6fRw*_ zlK-#&`>1<%W>;4ni>O?9wLLvgKlfYr&iv1R->hy{SE~8yMYU6HRNv|EXVtIzYomIt zzn@lX)n4^Rf4{E&x%wx~Wp<~UPBW)9Yqy%HwyIavt!k{ev;98i??;QFuqrP zY+(GCg!7f^2SMrTzqf+=U82yiUTADh*KTOdE&Y8%Yp!eUo4xh-H2`Z4uZxcVO7pMiud9c&?Q6w7t;?NPtM3mXS^_h=hFtclKkKe7 zt#U=!yb%2L>ZQg%BwWD&sJ?!!`l@ejDEc7yP_VCA;I}V2!MF*njwx`v;tp6G=*Hfb{593VtN0Fl;}&zSR6lC$syK}7UPxEAgv$$Q+J^LCzk08~{v>L4MCtdE!V8UU zRNu%x{#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ns|#TZs(;_GSSF81Y=&lzxjN%qhRnZK%z+KXRH#R&Da=M z_+~+{XOo)w+!h^X|c+Kb9R0@|%NX{PO?}4UIg? z(%N+uJs#}C;oNY&V#ZngZ(!e!U76_*))gwWn7K`O%T4jYDnSub}?oaAf8d3w From d1082196e0e86bf769de92d094256c9072381ac0 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:35:13 +0500 Subject: [PATCH 03/28] Add files via upload --- images/WheelScroll.svg | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 images/WheelScroll.svg diff --git a/images/WheelScroll.svg b/images/WheelScroll.svg new file mode 100644 index 0000000000..f120805af4 --- /dev/null +++ b/images/WheelScroll.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From bce99a32b13fa62732289e405ae9804a5f4bc1d2 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:35:47 +0500 Subject: [PATCH 04/28] Rename images/WheelScroll.svg to images/Den4ik-12/WheelScroll.svg --- images/{ => Den4ik-12}/WheelScroll.svg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename images/{ => Den4ik-12}/WheelScroll.svg (100%) diff --git a/images/WheelScroll.svg b/images/Den4ik-12/WheelScroll.svg similarity index 100% rename from images/WheelScroll.svg rename to images/Den4ik-12/WheelScroll.svg From 60605282617d6ba4bf016aea31f190faadad2db9 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:46:03 +0500 Subject: [PATCH 05/28] Update README.md --- images/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/README.md b/images/README.md index 069ffb31ca..546dd71c27 100644 --- a/images/README.md +++ b/images/README.md @@ -290,3 +290,6 @@ All images in this folder are licensed under the [GNU General Public License ver ## Lily/Video.svg - Created by [@LilyMakesThings](https://github.com/LilyMakesThings) in https://github.com/TurboWarp/extensions/pull/656 + +## Den4ik-12/WheelScroll.svg + - Created by [@Den4ik-12](https://github.com/DDen4ik-12) in https://github.com/TurboWarp/extensions/pull/ From 814083173924847f160f38601689d3713afc2dd5 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:46:48 +0500 Subject: [PATCH 06/28] Update README.md --- images/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/README.md b/images/README.md index 546dd71c27..a1bf9e848b 100644 --- a/images/README.md +++ b/images/README.md @@ -292,4 +292,4 @@ All images in this folder are licensed under the [GNU General Public License ver - Created by [@LilyMakesThings](https://github.com/LilyMakesThings) in https://github.com/TurboWarp/extensions/pull/656 ## Den4ik-12/WheelScroll.svg - - Created by [@Den4ik-12](https://github.com/DDen4ik-12) in https://github.com/TurboWarp/extensions/pull/ + - Created by [@Den4ik-12](https://github.com/DDen4ik-12) From d3ca1967fe1e265585c5279d9e5470d1eb584d7c Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:52:29 +0500 Subject: [PATCH 07/28] Update extensions.json --- extensions/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/extensions.json b/extensions/extensions.json index 2781ff7955..f8dc794263 100644 --- a/extensions/extensions.json +++ b/extensions/extensions.json @@ -80,5 +80,6 @@ "itchio", "gamejolt", "obviousAlexC/newgroundsIO", - "Lily/McUtils" + "Lily/McUtils", + "Den4ik-12/WhellScroll" ] From 5e9cfea96ee753587add0322aa5cd96e7cb4451d Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:53:38 +0500 Subject: [PATCH 08/28] Update extensions.json --- extensions/extensions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/extensions.json b/extensions/extensions.json index f8dc794263..8bde34de9e 100644 --- a/extensions/extensions.json +++ b/extensions/extensions.json @@ -73,6 +73,7 @@ "qxsck/var-and-list", "vercte/dictionaries", "godslayerakp/http", + "Den4ik-12/WhellScroll", "Lily/CommentBlocks", "veggiecan/LongmanDictionary", "CubesterYT/TurboHook", @@ -80,6 +81,5 @@ "itchio", "gamejolt", "obviousAlexC/newgroundsIO", - "Lily/McUtils", - "Den4ik-12/WhellScroll" + "Lily/McUtils" ] From d7af45225a42684818989e59682d0fff8bc95133 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Wed, 1 Nov 2023 11:31:35 +0500 Subject: [PATCH 09/28] Update WheelScroll.js --- extensions/Den4ik-12/WheelScroll.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index ba18386b76..741f71c157 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -1,4 +1,4 @@ -// Name: Wheel Scroll +// Name: Wheel Scroll // ID: Den4ik12WheelScroll // Description: Blocks for detecting mouse wheel scrolling. // By: Den4ik-12 @@ -18,49 +18,49 @@ // Scroll Events document.querySelector("body").onwheel = scroll; - function scroll(event) { + function scroll(e) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScroll'); - if (event.deltaZ != 0) { + if (e.deltaZ != 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'az' }); } - if (event.deltaY != 0) { + if (e.deltaY != 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'ay' }); } - if (event.deltaX != 0) { + if (e.deltaX != 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'ax' }); } - if (event.deltaZ > 0) { + if (e.deltaZ > 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'i' }); } - if (event.deltaZ < 0) { + if (e.deltaZ < 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'o' }); } - if (event.deltaY > 0) { + if (e.deltaY > 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'd' }); } - if (event.deltaY < 0) { + if (e.deltaY < 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'u' }); } - if (event.deltaX > 0) { + if (e.deltaX > 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'r' }); } - if (event.deltaX < 0) { + if (e.deltaX < 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'l' }); From 766d45c1bd8dd91c4fe56da11d5f5495cdcbbda7 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Wed, 1 Nov 2023 13:54:20 +0500 Subject: [PATCH 10/28] Update WheelScroll.js --- extensions/Den4ik-12/WheelScroll.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 741f71c157..070fbaadb3 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -23,47 +23,47 @@ if (e.deltaZ != 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'az' - }); + }) } if (e.deltaY != 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'ay' - }); + }) } if (e.deltaX != 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'ax' - }); + }) } if (e.deltaZ > 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'i' - }); + }) } if (e.deltaZ < 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'o' - }); + }) } if (e.deltaY > 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'd' - }); + }) } if (e.deltaY < 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'u' - }); + }) } if (e.deltaX > 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'r' - }); + }) } if (e.deltaX < 0) { Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { SCROLL_TYPE: 'l' - }); + }) } }; From 21b83dbd03fa8e8ab2b2bd3936b6ccd95f186777 Mon Sep 17 00:00:00 2001 From: DDen4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:02:08 +0500 Subject: [PATCH 11/28] Update WheelScroll.js --- extensions/Den4ik-12/WheelScroll.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 070fbaadb3..68dd7ef993 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -65,7 +65,7 @@ SCROLL_TYPE: 'l' }) } - }; + } // Translate Scratch.translate.setup({ @@ -82,7 +82,7 @@ menuSCROLL_TYPEvalueAX: 'вдоль оси x', menuSCROLL_TYPEvalueAY: 'вдоль оси y', menuSCROLL_TYPEvalueAZ: 'вдоль оси z', - }, + } }); // Extension @@ -114,7 +114,7 @@ text: Scratch.translate({id: 'whenScroll', default: 'when mouse wheel scrolls'}), blockType: Scratch.BlockType.EVENT, isEdgeActivated: false - }, + } ], menus: { SCROLL_TYPE: [ From 00ac744a2c2b08a65e4f67d143a0c5f39007a04e Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Wed, 1 Nov 2023 20:49:24 +0500 Subject: [PATCH 12/28] Update WheelScroll.js to attempt to fix a problem in job "format" --- extensions/Den4ik-12/WheelScroll.js | 212 +++++++++++++++++----------- 1 file changed, 126 insertions(+), 86 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 68dd7ef993..2e6716fea7 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -3,159 +3,199 @@ // Description: Blocks for detecting mouse wheel scrolling. // By: Den4ik-12 -(function(Scratch) { - 'use strict'; +(function (Scratch) { + "use strict"; -// Error, if sandboxed + // Error, if sandboxed if (!Scratch.extensions.unsandboxed) { - throw new Error('\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n'); + throw new Error( + '\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n', + ); } -// Icons - const ExtIcon = 'data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDUiIGhlaWdodD0iMjA1IiB2aWV3Qm94PSIwLDAsMjA1LDIwNSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNy41LC03Ny41KSI+PGcgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aXNQYWludGluZ0xheWVyJnF1b3Q7OnRydWV9IiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZS1saW5lY2FwPSJidXR0IiBzd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jQgLTMuMDUxMjksMS4xNjQgLTQuMjE1NTksMGMwLDAgLTYuOTY5MDQsLTYuOTY4MjUgLTEwLjY5NTE3LC0xMC42OTQ5M2MtMS4xNjQzMiwtMS4xNjQgLTEuMTY0LC0zLjA1MTA1IDAsLTQuMjE1OWMxLjE2NCwtMS4xNjQyNSAzLjA1MTI5LC0xLjE2NDI1IDQuMjE1NTksMGM0LjU5NTY4LDQuNTk1OTggNS42MDM4OCw1LjU5MjIzIDUuNjAzODgsNS41OTIyM2MwLDAgMS43MjQyNCwxLjM5OTU3IDMuMDU1NTUsMS40MDMxOWMxLjMzMTI5LDAuMDAzNjEgMi45MDY2OCwtMS4zODcwMSAyLjkwNjY4LC0xLjM4NzAxeiIgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aW5kZXgmcXVvdDs6bnVsbH0iIGZpbGw9IiNmZmZmZmYiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIwIi8+PHBhdGggZD0iTTE4MS4zMzMzMywyMzguNjY2Njd2LTExNy4zMzMzM2gxMTcuMzMzMzN2MTE3LjMzMzMzeiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9Ik5hTiIvPjwvZz48L2c+PC9zdmc+PCEtLXJvdGF0aW9uQ2VudGVyOjU4LjY2NjY2NjY2NjY2NjY2OjU4LjY2NjY2NjY2NjY2NjY2LS0+"; -// Scroll Events + // Scroll Events document.querySelector("body").onwheel = scroll; function scroll(e) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScroll'); + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScroll"); if (e.deltaZ != 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'az' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "az", + }); } if (e.deltaY != 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'ay' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "ay", + }); } if (e.deltaX != 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'ax' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "ax", + }); } if (e.deltaZ > 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'i' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "i", + }); } if (e.deltaZ < 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'o' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "o", + }); } if (e.deltaY > 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'd' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "d", + }); } if (e.deltaY < 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'u' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "u", + }); } if (e.deltaX > 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'r' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "r", + }); } if (e.deltaX < 0) { - Scratch.vm.runtime.startHats('Den4ik12WheelScroll_whenScrollDir', { - SCROLL_TYPE: 'l' - }) + Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: "l", + }); } } -// Translate + // Translate Scratch.translate.setup({ ru: { - extName: 'Прокрутка колеса', - whenScrollDir: 'когда колесо мыши прокручивается [SCROLL_TYPE]', - whenScroll: 'когда колесо мыши прокручивается', - menuSCROLL_TYPEvalueU: 'вверх', - menuSCROLL_TYPEvalueD: 'вниз', - menuSCROLL_TYPEvalueL: 'влево', - menuSCROLL_TYPEvalueR: 'вправо', - menuSCROLL_TYPEvalueO: 'out', - menuSCROLL_TYPEvalueI: 'in', - menuSCROLL_TYPEvalueAX: 'вдоль оси x', - menuSCROLL_TYPEvalueAY: 'вдоль оси y', - menuSCROLL_TYPEvalueAZ: 'вдоль оси z', - } + extName: "Прокрутка колеса", + whenScrollDir: "когда колесо мыши прокручивается [SCROLL_TYPE]", + whenScroll: "когда колесо мыши прокручивается", + menuSCROLL_TYPEvalueU: "вверх", + menuSCROLL_TYPEvalueD: "вниз", + menuSCROLL_TYPEvalueL: "влево", + menuSCROLL_TYPEvalueR: "вправо", + menuSCROLL_TYPEvalueO: "out", + menuSCROLL_TYPEvalueI: "in", + menuSCROLL_TYPEvalueAX: "вдоль оси x", + menuSCROLL_TYPEvalueAY: "вдоль оси y", + menuSCROLL_TYPEvalueAZ: "вдоль оси z", + }, }); -// Extension + // Extension class WheelScroll { getInfo() { return { - id: 'Den4ik12WheelScroll', - name: Scratch.translate({id: 'extName', default: 'Whell Scroll'}), - color1: '#E74C3C', - color2: '#CB4335', - color3: '#B03A2E', + id: "Den4ik12WheelScroll", + name: Scratch.translate({ + id: "extName", + default: "Whell Scroll", + }), + color1: "#E74C3C", + color2: "#CB4335", + color3: "#B03A2E", menuIconURI: ExtIcon, blockIconURI: BlockIcon, blocks: [ { - opcode: 'whenScrollDir', - text: Scratch.translate({id: 'whenScrollDir', default: 'when mouse whell scrolls [SCROLL_TYPE]'}), + opcode: "whenScrollDir", + text: Scratch.translate({ + id: "whenScrollDir", + default: "when mouse whell scrolls [SCROLL_TYPE]", + }), blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, arguments: { SCROLL_TYPE: { type: Scratch.ArgumentType.STRING, - menu: 'SCROLL_TYPE' - } - } + menu: "SCROLL_TYPE", + }, + }, }, { - opcode: 'whenScroll', - text: Scratch.translate({id: 'whenScroll', default: 'when mouse wheel scrolls'}), + opcode: "whenScroll", + text: Scratch.translate({ + id: "whenScroll", + default: "when mouse wheel scrolls", + }), blockType: Scratch.BlockType.EVENT, - isEdgeActivated: false - } + isEdgeActivated: false, + }, ], menus: { SCROLL_TYPE: [ { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueU', default: 'up'}), - value: 'u' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueU", + default: "up", + }), + value: "u", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueD', default: 'down'}), - value: 'd' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueD", + default: "down", + }), + value: "d", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueL', default: 'to the left'}), - value: 'l' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueL", + default: "to the left", + }), + value: "l", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueR', default: 'to the right'}), - value: 'r' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueR", + default: "to the right", + }), + value: "r", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueO', default: 'out'}), - value: 'o' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueO", + default: "out", + }), + value: "o", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueI', default: 'in'}), - value: 'i' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueI", + default: "in", + }), + value: "i", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueAX', default: 'along the x-axis'}), - value: 'ax' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueAX", + default: "along the x-axis", + }), + value: "ax", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueAY', default: 'along the y-axis'}), - value: 'ay' + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueAY", + default: "along the y-axis", + }), + value: "ay", }, { - text: Scratch.translate({id: 'menuSCROLL_TYPEvalueAZ', default: 'along the z-axis'}), - value: 'az' - } - ] - } + text: Scratch.translate({ + id: "menuSCROLL_TYPEvalueAZ", + default: "along the z-axis", + }), + value: "az", + }, + ], + }, }; } } From 2279f37af06019f45869329176dd8de82170085c Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Wed, 1 Nov 2023 21:08:52 +0500 Subject: [PATCH 13/28] Update WheelScroll.js with changing the wrong "whell" to the correct word "wheel" --- extensions/Den4ik-12/WheelScroll.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 2e6716fea7..0fea380bc9 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -8,9 +8,7 @@ // Error, if sandboxed if (!Scratch.extensions.unsandboxed) { - throw new Error( - '\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n', - ); + throw new Error('\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n'); } // Icons @@ -96,7 +94,7 @@ id: "Den4ik12WheelScroll", name: Scratch.translate({ id: "extName", - default: "Whell Scroll", + default: "Wheel Scroll", }), color1: "#E74C3C", color2: "#CB4335", @@ -108,7 +106,7 @@ opcode: "whenScrollDir", text: Scratch.translate({ id: "whenScrollDir", - default: "when mouse whell scrolls [SCROLL_TYPE]", + default: "when mouse wheel scrolls [SCROLL_TYPE]", }), blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, From bf3f1c8dd1ca4abee0788706ca361c17b504078e Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Wed, 1 Nov 2023 21:09:43 +0500 Subject: [PATCH 14/28] Update WheelScroll.js --- extensions/Den4ik-12/WheelScroll.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 0fea380bc9..cd587ea7ff 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -8,7 +8,7 @@ // Error, if sandboxed if (!Scratch.extensions.unsandboxed) { - throw new Error('\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n'); + throw new Error('\nWheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\n'); } // Icons From ebbf918f674f470c07188472627687da3a2e798d Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Mon, 13 Nov 2023 18:51:21 +0500 Subject: [PATCH 15/28] Update extensions.json to resolve the conflict --- extensions/extensions.json | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/extensions.json b/extensions/extensions.json index 8bde34de9e..edb76895cd 100644 --- a/extensions/extensions.json +++ b/extensions/extensions.json @@ -73,6 +73,7 @@ "qxsck/var-and-list", "vercte/dictionaries", "godslayerakp/http", + "godslayerakp/ws", "Den4ik-12/WhellScroll", "Lily/CommentBlocks", "veggiecan/LongmanDictionary", From 8c7620d6a814d0e6841941f1dfa95e2548d38c8b Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:22:02 +0500 Subject: [PATCH 16/28] Deleting unnecessary comments --- extensions/Den4ik-12/WheelScroll.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index cd587ea7ff..e4180d2ad2 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -6,20 +6,18 @@ (function (Scratch) { "use strict"; - // Error, if sandboxed if (!Scratch.extensions.unsandboxed) { - throw new Error('\nWheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\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ik5hTiIvPjwvZz48L2c+PC9zdmc+PCEtLXJvdGF0aW9uQ2VudGVyOjU4LjY2NjY2NjY2NjY2NjY2OjU4LjY2NjY2NjY2NjY2NjY2LS0+"; - // Scroll Events document.querySelector("body").onwheel = scroll; - function scroll(e) { Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScroll"); if (e.deltaZ != 0) { @@ -69,7 +67,6 @@ } } - // Translate Scratch.translate.setup({ ru: { extName: "Прокрутка колеса", @@ -87,7 +84,6 @@ }, }); - // Extension class WheelScroll { getInfo() { return { From 2f50eacc607fb240bbb7bdbbd424138efa44fd15 Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:31:40 +0500 Subject: [PATCH 17/28] Fix "lint" errors | Attempt 1 --- extensions/Den4ik-12/WheelScroll.js | 37 +++++++++++++---------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index e4180d2ad2..cb018ab558 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -3,13 +3,27 @@ // Description: Blocks for detecting mouse wheel scrolling. // By: Den4ik-12 +Scratch.translate.setup({ + ru: { + extName: "Прокрутка колеса", + whenScrollDir: "когда колесо мыши прокручивается [SCROLL_TYPE]", + whenScroll: "когда колесо мыши прокручивается", + menuSCROLL_TYPEvalueU: "вверх", + menuSCROLL_TYPEvalueD: "вниз", + menuSCROLL_TYPEvalueL: "влево", + menuSCROLL_TYPEvalueR: "вправо", + menuSCROLL_TYPEvalueO: "out", + menuSCROLL_TYPEvalueI: "in", + menuSCROLL_TYPEvalueAX: "вдоль оси x", + menuSCROLL_TYPEvalueAY: "вдоль оси y", + menuSCROLL_TYPEvalueAZ: "вдоль оси z", + }, +}); (function (Scratch) { "use strict"; if (!Scratch.extensions.unsandboxed) { - throw new Error( - '\nWheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\n' - ); + throw new Error('\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n'); } const ExtIcon = @@ -67,23 +81,6 @@ } } - Scratch.translate.setup({ - ru: { - extName: "Прокрутка колеса", - whenScrollDir: "когда колесо мыши прокручивается [SCROLL_TYPE]", - whenScroll: "когда колесо мыши прокручивается", - menuSCROLL_TYPEvalueU: "вверх", - menuSCROLL_TYPEvalueD: "вниз", - menuSCROLL_TYPEvalueL: "влево", - menuSCROLL_TYPEvalueR: "вправо", - menuSCROLL_TYPEvalueO: "out", - menuSCROLL_TYPEvalueI: "in", - menuSCROLL_TYPEvalueAX: "вдоль оси x", - menuSCROLL_TYPEvalueAY: "вдоль оси y", - menuSCROLL_TYPEvalueAZ: "вдоль оси z", - }, - }); - class WheelScroll { getInfo() { return { From b74cc68f537a5be335e67f700359eba60283c8d1 Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:37:49 +0500 Subject: [PATCH 18/28] Fix errors | Attempt 2 --- extensions/Den4ik-12/WheelScroll.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index cb018ab558..89641f23ad 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -3,22 +3,6 @@ // Description: Blocks for detecting mouse wheel scrolling. // By: Den4ik-12 -Scratch.translate.setup({ - ru: { - extName: "Прокрутка колеса", - whenScrollDir: "когда колесо мыши прокручивается [SCROLL_TYPE]", - whenScroll: "когда колесо мыши прокручивается", - menuSCROLL_TYPEvalueU: "вверх", - menuSCROLL_TYPEvalueD: "вниз", - menuSCROLL_TYPEvalueL: "влево", - menuSCROLL_TYPEvalueR: "вправо", - menuSCROLL_TYPEvalueO: "out", - menuSCROLL_TYPEvalueI: "in", - menuSCROLL_TYPEvalueAX: "вдоль оси x", - menuSCROLL_TYPEvalueAY: "вдоль оси y", - menuSCROLL_TYPEvalueAZ: "вдоль оси z", - }, -}); (function (Scratch) { "use strict"; From 3e3d803021a7b4e63591dbcbc0b41b912747acfe Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:46:36 +0500 Subject: [PATCH 19/28] Fix errors | Attempt 3 --- extensions/Den4ik-12/WheelScroll.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 89641f23ad..76c2cbca7d 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -7,7 +7,9 @@ "use strict"; if (!Scratch.extensions.unsandboxed) { - throw new Error('\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n'); + throw new Error( + '\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n' + ); } const ExtIcon = From 6abaadfc12a2c413849c3faa8e4650c18ffe39df Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:16:22 +0500 Subject: [PATCH 20/28] Update WheelScroll.js --- extensions/Den4ik-12/WheelScroll.js | 62 ++++++----------------------- 1 file changed, 13 insertions(+), 49 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 76c2cbca7d..fed68c0170 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -8,7 +8,7 @@ if (!Scratch.extensions.unsandboxed) { throw new Error( - '\nWhell Scroll:\nExtension "Whell Scroll" must run unsandboxed!\n' + '\nWheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\n' ); } @@ -71,10 +71,7 @@ getInfo() { return { id: "Den4ik12WheelScroll", - name: Scratch.translate({ - id: "extName", - default: "Wheel Scroll", - }), + name: "Wheel Scroll", color1: "#E74C3C", color2: "#CB4335", color3: "#B03A2E", @@ -83,10 +80,7 @@ blocks: [ { opcode: "whenScrollDir", - text: Scratch.translate({ - id: "whenScrollDir", - default: "when mouse wheel scrolls [SCROLL_TYPE]", - }), + text: "when mouse wheel scrolls [SCROLL_TYPE]", blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, arguments: { @@ -98,10 +92,7 @@ }, { opcode: "whenScroll", - text: Scratch.translate({ - id: "whenScroll", - default: "when mouse wheel scrolls", - }), + text: "when mouse wheel scrolls", blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, }, @@ -109,66 +100,39 @@ menus: { SCROLL_TYPE: [ { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueU", - default: "up", - }), + text: "up", value: "u", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueD", - default: "down", - }), + text: "down", value: "d", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueL", - default: "to the left", - }), + text: "to the left", value: "l", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueR", - default: "to the right", - }), + text: "to the right", value: "r", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueO", - default: "out", - }), + text: "out", value: "o", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueI", - default: "in", - }), + text: "in", value: "i", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueAX", - default: "along the x-axis", - }), + text: "along the x-axis", value: "ax", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueAY", - default: "along the y-axis", - }), + text: "along the y-axis", value: "ay", }, { - text: Scratch.translate({ - id: "menuSCROLL_TYPEvalueAZ", - default: "along the z-axis", - }), + text: "along the z-axis", value: "az", }, ], From 0e4c8b7297aae7cfb380c88ced0ae146125851b3 Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Sun, 14 Jul 2024 15:18:29 +0500 Subject: [PATCH 21/28] Extension Update 1.1! --- extensions/Den4ik-12/WheelScroll.js | 267 ++++++++++++++++++---------- 1 file changed, 175 insertions(+), 92 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index fed68c0170..bcce125506 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -8,64 +8,57 @@ if (!Scratch.extensions.unsandboxed) { throw new Error( - '\nWheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\n' + 'Wheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\nPlease enable the unsandboxed mode when loading the extension.', ); } - const ExtIcon = + const extIcon = "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDUiIGhlaWdodD0iMjA1IiB2aWV3Qm94PSIwLDAsMjA1LDIwNSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNy41LC03Ny41KSI+PGcgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aXNQYWludGluZ0xheWVyJnF1b3Q7OnRydWV9IiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZS1saW5lY2FwPSJidXR0IiBzdHJva2UtbGluZWpvaW49Im1pdGVyIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIHN0cm9rZS1kYXNoYXJyYXk9IiIgc3Ryb2tlLWRhc2hvZmZzZXQ9IjAiIHN0eWxlPSJtaXgtYmxlbmQtbW9kZTogbm9ybWFsIj48cGF0aCBkPSJNMTQwLDE4MGMwLC01NS4yMjg0NyA0NC43NzE1MywtMTAwIDEwMCwtMTAwYzU1LjIyODQ3LDAgMTAwLDQ0Ljc3MTUzIDEwMCwxMDBjMCw1NS4yMjg0N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gMi45MDY2OCwtMS4zODcwMSAyLjkwNjY4LC0xLjM4NzAxeiIgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aW5kZXgmcXVvdDs6bnVsbH0iIGZpbGw9IiNmZmZmZmYiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIwIi8+PHBhdGggZD0iTTE4MS4zMzMzMywyMzguNjY2Njd2LTExNy4zMzMzM2gxMTcuMzMzMzN2MTE3LjMzMzMzeiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9Ik5hTiIvPjwvZz48L2c+PC9zdmc+PCEtLXJvdGF0aW9uQ2VudGVyOjU4LjY2NjY2NjY2NjY2NjY2OjU4LjY2NjY2NjY2NjY2NjY2LS0+"; + const buttonTOSPTexts = [ + "Enable other scroll types", + "Disable other scroll types", + ]; + let enabledOtherScrollParameters = false; + const vm = Scratch.vm; + const runtime = vm.runtime; - document.querySelector("body").onwheel = scroll; - function scroll(e) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScroll"); - if (e.deltaZ != 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "az", - }); - } - if (e.deltaY != 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "ay", - }); - } - if (e.deltaX != 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "ax", - }); - } - if (e.deltaZ > 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "i", - }); - } - if (e.deltaZ < 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "o", - }); - } - if (e.deltaY > 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "d", - }); - } - if (e.deltaY < 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "u", - }); - } - if (e.deltaX > 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "r", - }); - } - if (e.deltaX < 0) { - Scratch.vm.runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { - SCROLL_TYPE: "l", - }); + const startWhenScrollEvent = (dir, e) => { + let threads; + if (dir === "") { + threads = runtime.startHats("Den4ik12WheelScroll_whenScroll"); + } else { + threads = runtime.startHats( + "Den4ik12WheelScroll_whenScrollDir", + { + SCROLL_TYPE: dir, + }, + ); } - } + threads.forEach((thread) => { + thread.deltaX = e.deltaX; + thread.deltaY = e.deltaY; + thread.deltaZ = e.deltaZ; + }); + }; + + document.body.addEventListener( + "wheel", + (e) => { + startWhenScrollEvent("", e); + if (e.deltaZ != 0) startWhenScrollEvent("az", e); + if (e.deltaY != 0) startWhenScrollEvent("ay", e); + if (e.deltaX != 0) startWhenScrollEvent("ax", e); + if (e.deltaZ > 0) startWhenScrollEvent("i", e); + if (e.deltaZ < 0) startWhenScrollEvent("o", e); + if (e.deltaY > 0) startWhenScrollEvent("d", e); + if (e.deltaY < 0) startWhenScrollEvent("u", e); + if (e.deltaX > 0) startWhenScrollEvent("r", e); + if (e.deltaX < 0) startWhenScrollEvent("l", e); + }, + { passive: true }, + ); class WheelScroll { getInfo() { @@ -75,9 +68,16 @@ color1: "#E74C3C", color2: "#CB4335", color3: "#B03A2E", - menuIconURI: ExtIcon, - blockIconURI: BlockIcon, + menuIconURI: extIcon, + blockIconURI: blockIcon, blocks: [ + { + func: "toogleOtherScrollTypes", + text: buttonTOSPTexts[ + Scratch.Cast.toNumber(enabledOtherScrollParameters) + ], + blockType: Scratch.BlockType.BUTTON, + }, { opcode: "whenScrollDir", text: "when mouse wheel scrolls [SCROLL_TYPE]", @@ -85,8 +85,8 @@ isEdgeActivated: false, arguments: { SCROLL_TYPE: { - type: Scratch.ArgumentType.STRING, menu: "SCROLL_TYPE", + defaultValue: "u", }, }, }, @@ -96,49 +96,132 @@ blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, }, + { + opcode: "getDelta", + text: "delta [DELTA_TYPE]", + blockType: Scratch.BlockType.REPORTER, + disableMonitor: true, + arguments: { + DELTA_TYPE: { + menu: "DELTA_TYPE", + defaultValue: "y", + }, + }, + }, ], menus: { - SCROLL_TYPE: [ - { - text: "up", - value: "u", - }, - { - text: "down", - value: "d", - }, - { - text: "to the left", - value: "l", - }, - { - text: "to the right", - value: "r", - }, - { - text: "out", - value: "o", - }, - { - text: "in", - value: "i", - }, - { - text: "along the x-axis", - value: "ax", - }, - { - text: "along the y-axis", - value: "ay", - }, - { - text: "along the z-axis", - value: "az", - }, - ], + SCROLL_TYPE: { + items: "_generateScrollTypesMenu", + }, + DELTA_TYPE: { + acceptReporters: true, + items: "_generateDeltaTypesMenu", + }, }, }; } + _generateScrollTypesMenu() { + let result = new Array(); + result.push( + { + text: "up", + value: "u", + }, + { + text: "down", + value: "d", + }, + ); + if (enabledOtherScrollParameters) { + result.push( + { + text: "to the left", + value: "l", + }, + { + text: "to the right", + value: "r", + }, + { + text: "out", + value: "o", + }, + { + text: "in", + value: "i", + }, + { + text: "along the x-axis", + value: "ax", + }, + ); + } + result.push({ + text: "along the y-axis", + value: "ay", + }); + if (enabledOtherScrollParameters) { + result.push({ + text: "along the z-axis", + value: "az", + }); + } + return result; + } + _generateDeltaTypesMenu() { + let result = new Array(); + if (enabledOtherScrollParameters) { + result.push({ + text: "x", + value: "x", + }); + } + result.push({ + text: "y", + value: "y", + }); + if (enabledOtherScrollParameters) { + result.push({ + text: "z", + value: "z", + }); + } + return result; + } + + //Buttons and Blocks + toogleOtherScrollTypes() { + if ( + enabledOtherScrollParameters + ? true + : confirm( + "Wheel Scroll:\nThis will enable other scroll types:\nto the left, to the right, out, in, along the x-axis, along the z-axis\n\nMost computer mouses do not support these scroll types.\n\nEnable these types?", + ) + ) { + enabledOtherScrollParameters = !enabledOtherScrollParameters; + vm.extensionManager.refreshBlocks(); + } + } + getDelta(args, util) { + let result; + switch (args.DELTA_TYPE) { + case "x": { + result = util.thread.deltaX; + return result ? result : 0; + } + case "y": { + result = util.thread.deltaY; + return result ? result : 0; + } + case "z": { + result = util.thread.deltaZ; + return result ? result : 0; + } + default: { + return ""; + } + } + } } Scratch.extensions.register(new WheelScroll()); })(Scratch); From 6eef9cbeb76f0d6abc89ec13f1ae623d1ef44b19 Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Sun, 14 Jul 2024 15:45:05 +0500 Subject: [PATCH 22/28] Fix errors | Attempt 1 --- extensions/Den4ik-12/WheelScroll.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index bcce125506..25d29651ca 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -8,7 +8,7 @@ if (!Scratch.extensions.unsandboxed) { throw new Error( - 'Wheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\nPlease enable the unsandboxed mode when loading the extension.', + 'Wheel Scroll:\nExtension "Wheel Scroll" must run unsandboxed!\nPlease enable the unsandboxed mode when loading the extension.' ); } @@ -29,12 +29,9 @@ if (dir === "") { threads = runtime.startHats("Den4ik12WheelScroll_whenScroll"); } else { - threads = runtime.startHats( - "Den4ik12WheelScroll_whenScrollDir", - { - SCROLL_TYPE: dir, - }, - ); + threads = runtime.startHats("Den4ik12WheelScroll_whenScrollDir", { + SCROLL_TYPE: dir, + }); } threads.forEach((thread) => { thread.deltaX = e.deltaX; @@ -57,7 +54,7 @@ if (e.deltaX > 0) startWhenScrollEvent("r", e); if (e.deltaX < 0) startWhenScrollEvent("l", e); }, - { passive: true }, + { passive: true } ); class WheelScroll { @@ -130,7 +127,7 @@ { text: "down", value: "d", - }, + } ); if (enabledOtherScrollParameters) { result.push( @@ -153,7 +150,7 @@ { text: "along the x-axis", value: "ax", - }, + } ); } result.push({ @@ -195,7 +192,7 @@ enabledOtherScrollParameters ? true : confirm( - "Wheel Scroll:\nThis will enable other scroll types:\nto the left, to the right, out, in, along the x-axis, along the z-axis\n\nMost computer mouses do not support these scroll types.\n\nEnable these types?", + "Wheel Scroll:\nThis will enable other scroll types:\nto the left, to the right, out, in, along the x-axis, along the z-axis\n\nMost computer mouses do not support these scroll types.\n\nEnable these types?" ) ) { enabledOtherScrollParameters = !enabledOtherScrollParameters; From a8e67b2d6a39f752285971dcb50e17fb947a9197 Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:16:09 +0500 Subject: [PATCH 23/28] Small update --- extensions/Den4ik-12/WheelScroll.js | 168 ++++++++++++---------------- 1 file changed, 71 insertions(+), 97 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index 25d29651ca..af4c6a3937 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -16,11 +16,6 @@ "data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMDUiIGhlaWdodD0iMjA1IiB2aWV3Qm94PSIwLDAsMjA1LDIwNSI+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEzNy41LC03Ny41KSI+PGcgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aXNQYWludGluZ0xheWVyJnF1b3Q7OnRydWV9IiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZS1saW5lY2FwPSJidXR0IiBzdHJva2UtbGluZWpvaW49Im1pdGVyIiBzdHJva2Utb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4xNjQzMiwtMS4xNjQgLTEuMTY0LC0zLjA1MTA1IDAsLTQuMjE1OWMxLjE2NCwtMS4xNjQyNSAzLjA1MTI5LC0xLjE2NDI1IDQuMjE1NTksMGM0LjU5NTY4LDQuNTk1OTggNS42MDM4OCw1LjU5MjIzIDUuNjAzODgsNS41OTIyM2MwLDAgMS43MjQyNCwxLjM5OTU3IDMuMDU1NTUsMS40MDMxOWMxLjMzMTI5LDAuMDAzNjEgMi45MDY2OCwtMS4zODcwMSAyLjkwNjY4LC0xLjM4NzAxeiIgZGF0YS1wYXBlci1kYXRhPSJ7JnF1b3Q7aW5kZXgmcXVvdDs6bnVsbH0iIGZpbGw9IiNmZmZmZmYiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIwIi8+PHBhdGggZD0iTTE4MS4zMzMzMywyMzguNjY2Njd2LTExNy4zMzMzM2gxMTcuMzMzMzN2MTE3LjMzMzMzeiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9Ik5hTiIvPjwvZz48L2c+PC9zdmc+PCEtLXJvdGF0aW9uQ2VudGVyOjU4LjY2NjY2NjY2NjY2NjY2OjU4LjY2NjY2NjY2NjY2NjY2LS0+"; - const buttonTOSPTexts = [ - "Enable other scroll types", - "Disable other scroll types", - ]; - let enabledOtherScrollParameters = false; const vm = Scratch.vm; const runtime = vm.runtime; @@ -37,6 +32,20 @@ thread.deltaX = e.deltaX; thread.deltaY = e.deltaY; thread.deltaZ = e.deltaZ; + switch (e.deltaMode) { + case 0: { + thread.deltaMode = "px"; + break; + } + case 1: { + thread.deltaMode = "lines"; + break; + } + case 2: { + thread.deltaMode = "pages"; + break; + } + } }); }; @@ -69,11 +78,16 @@ blockIconURI: blockIcon, blocks: [ { - func: "toogleOtherScrollTypes", - text: buttonTOSPTexts[ - Scratch.Cast.toNumber(enabledOtherScrollParameters) - ], - blockType: Scratch.BlockType.BUTTON, + text: "Note: Most computer mouses do not", + blockType: Scratch.BlockType.LABEL, + }, + { + text: "have the ability to scroll along the x", + blockType: Scratch.BlockType.LABEL, + }, + { + text: "and z axes", + blockType: Scratch.BlockType.LABEL, }, { opcode: "whenScrollDir", @@ -108,116 +122,76 @@ ], menus: { SCROLL_TYPE: { - items: "_generateScrollTypesMenu", + items: [ + { + text: "up", + value: "u", + }, + { + text: "down", + value: "d", + }, + { + text: "to the left", + value: "l", + }, + { + text: "to the right", + value: "r", + }, + { + text: "out", + value: "o", + }, + { + text: "in", + value: "i", + }, + { + text: "along the x-axis", + value: "ax", + }, + { + text: "along the y-axis", + value: "ay", + }, + { + text: "along the z-axis", + value: "az", + }, + ], }, DELTA_TYPE: { acceptReporters: true, - items: "_generateDeltaTypesMenu", + items: ["x", "y", "z", "mode"], }, }, }; } - _generateScrollTypesMenu() { - let result = new Array(); - result.push( - { - text: "up", - value: "u", - }, - { - text: "down", - value: "d", - } - ); - if (enabledOtherScrollParameters) { - result.push( - { - text: "to the left", - value: "l", - }, - { - text: "to the right", - value: "r", - }, - { - text: "out", - value: "o", - }, - { - text: "in", - value: "i", - }, - { - text: "along the x-axis", - value: "ax", - } - ); - } - result.push({ - text: "along the y-axis", - value: "ay", - }); - if (enabledOtherScrollParameters) { - result.push({ - text: "along the z-axis", - value: "az", - }); - } - return result; - } - _generateDeltaTypesMenu() { - let result = new Array(); - if (enabledOtherScrollParameters) { - result.push({ - text: "x", - value: "x", - }); - } - result.push({ - text: "y", - value: "y", - }); - if (enabledOtherScrollParameters) { - result.push({ - text: "z", - value: "z", - }); - } - return result; - } - - //Buttons and Blocks - toogleOtherScrollTypes() { - if ( - enabledOtherScrollParameters - ? true - : confirm( - "Wheel Scroll:\nThis will enable other scroll types:\nto the left, to the right, out, in, along the x-axis, along the z-axis\n\nMost computer mouses do not support these scroll types.\n\nEnable these types?" - ) - ) { - enabledOtherScrollParameters = !enabledOtherScrollParameters; - vm.extensionManager.refreshBlocks(); - } - } getDelta(args, util) { let result; switch (args.DELTA_TYPE) { case "x": { result = util.thread.deltaX; - return result ? result : 0; + break; } case "y": { result = util.thread.deltaY; - return result ? result : 0; + break; } case "z": { result = util.thread.deltaZ; - return result ? result : 0; + break; + } + case "mode": { + result = util.thread.deltaMode; + break; } default: { return ""; } } + return result ? result : ""; } } Scratch.extensions.register(new WheelScroll()); From 281a36807a3f76c377aa0f336b6eeb1895a932a0 Mon Sep 17 00:00:00 2001 From: Cubester Date: Mon, 15 Jul 2024 22:09:43 -0400 Subject: [PATCH 24/28] Fixes and Translation Functions --- extensions/Den4ik-12/WheelScroll.js | 39 ++++++++++++++++------------- extensions/extensions.json | 2 +- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index af4c6a3937..e27a4a9f27 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -70,7 +70,7 @@ getInfo() { return { id: "Den4ik12WheelScroll", - name: "Wheel Scroll", + name: Scratch.translate("Wheel Scroll"), color1: "#E74C3C", color2: "#CB4335", color3: "#B03A2E", @@ -78,20 +78,20 @@ blockIconURI: blockIcon, blocks: [ { - text: "Note: Most computer mouses do not", + text: Scratch.translate("Note: Most computer mouses do not"), blockType: Scratch.BlockType.LABEL, }, { - text: "have the ability to scroll along the x", + text: Scratch.translate("have the ability to scroll along the x"), blockType: Scratch.BlockType.LABEL, }, { - text: "and z axes", + text: Scratch.translate("and z axes"), blockType: Scratch.BlockType.LABEL, }, { opcode: "whenScrollDir", - text: "when mouse wheel scrolls [SCROLL_TYPE]", + text: Scratch.translate("when mouse wheel scrolls [SCROLL_TYPE]"), blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, arguments: { @@ -103,13 +103,13 @@ }, { opcode: "whenScroll", - text: "when mouse wheel scrolls", + text: Scratch.translate("when mouse wheel scrolls"), blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, }, { opcode: "getDelta", - text: "delta [DELTA_TYPE]", + text: Scratch.translate("delta [DELTA_TYPE]"), blockType: Scratch.BlockType.REPORTER, disableMonitor: true, arguments: { @@ -124,46 +124,51 @@ SCROLL_TYPE: { items: [ { - text: "up", + text: Scratch.translate("up"), value: "u", }, { - text: "down", + text: Scratch.translate("down"), value: "d", }, { - text: "to the left", + text: Scratch.translate("to the left"), value: "l", }, { - text: "to the right", + text: Scratch.translate("to the right"), value: "r", }, { - text: "out", + text: Scratch.translate("out"), value: "o", }, { - text: "in", + text: Scratch.translate("in"), value: "i", }, { - text: "along the x-axis", + text: Scratch.translate("along the x-axis"), value: "ax", }, { - text: "along the y-axis", + text: Scratch.translate("along the y-axis"), value: "ay", }, { - text: "along the z-axis", + text: Scratch.translate("along the z-axis"), value: "az", }, ], }, DELTA_TYPE: { acceptReporters: true, - items: ["x", "y", "z", "mode"], + items: [ + "x", + "y", + "z", + { text: Scratch.translate("mode"), value: "mode" }, + ], }, }, }; diff --git a/extensions/extensions.json b/extensions/extensions.json index c81bdb6165..7cf02fbdcd 100644 --- a/extensions/extensions.json +++ b/extensions/extensions.json @@ -88,7 +88,7 @@ "vercte/dictionaries", "godslayerakp/http", "godslayerakp/ws", - "Den4ik-12/WhellScroll", + "Den4ik-12/WheelScroll", "Lily/CommentBlocks", "veggiecan/LongmanDictionary", "CubesterYT/TurboHook", From 1ade5f92dd2402f674d7074ea331ccad3abd8853 Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:08:16 +0500 Subject: [PATCH 25/28] Added license --- extensions/Den4ik-12/WheelScroll.js | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index e27a4a9f27..b0e85200f6 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -2,6 +2,7 @@ // ID: Den4ik12WheelScroll // Description: Blocks for detecting mouse wheel scrolling. // By: Den4ik-12 +// License: MPL-2.0 (function (Scratch) { "use strict"; From 501b791c96d7d42623a4ceddea08294bf1170868 Mon Sep 17 00:00:00 2001 From: Den4ik-12 <133135758+DDen4ik-12@users.noreply.github.com> Date: Thu, 18 Jul 2024 23:02:42 +0500 Subject: [PATCH 26/28] Update WheelScroll.js --- extensions/Den4ik-12/WheelScroll.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/extensions/Den4ik-12/WheelScroll.js b/extensions/Den4ik-12/WheelScroll.js index b0e85200f6..4c363f6541 100644 --- a/extensions/Den4ik-12/WheelScroll.js +++ b/extensions/Den4ik-12/WheelScroll.js @@ -79,20 +79,12 @@ blockIconURI: blockIcon, blocks: [ { - text: Scratch.translate("Note: Most computer mouses do not"), - blockType: Scratch.BlockType.LABEL, - }, - { - text: Scratch.translate("have the ability to scroll along the x"), - blockType: Scratch.BlockType.LABEL, - }, - { - text: Scratch.translate("and z axes"), - blockType: Scratch.BlockType.LABEL, + blockType: Scratch.BlockType.XML, + xml: "