File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[
2+ {
3+ "version" : 2 ,
4+ "id" : " start-stop-hotkeys" ,
5+ "versionUpdated" : " v3.2.0"
6+ },
27 {
38 "version" : 2 ,
49 "id" : " opacity-slider" ,
258263 "type" : [" Website" ],
259264 "tags" : [" New" ]
260265 },
261- {
262- "title" : " Shortcuts for Starting and Stopping Projects" ,
263- "description" : " To start and stop a project you can use Control+G or Command+G (for Mac users)." ,
264- "credits" : [" rgantzos" ],
265- "urls" : [" https://scratch.mit.edu/users/rgantzos/" ],
266- "file" : " start-stop-hotkeys" ,
267- "type" : [" Website" , " Editor" ],
268- "tags" : [" New" ]
269- },
270266 {
271267 "title" : " Direct Image Uploads" ,
272268 "description" : " Allows you to upload images to the Scratch forums for posts and signatures without having to use third party image uploading services." ,
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ export default function ({ feature, console }) {
44 if ( ! feature . traps . paint ( ) . selectedItems [ 0 ] ) return ;
55 if ( feature . traps . paint ( ) . format . startsWith ( "BITMAP" ) ) return ;
66 body = body . firstChild ;
7- window . feature = feature ;
87 if ( body . querySelector ( ".ste-opacity-slider" ) ) return ;
98
109 let div = document . createElement ( "div" ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "title" : " Green Flag Hotkeys" ,
3+ "description" : " Use Control + G to start or stop a project, depending on whether or not it is running." ,
4+ "credits" : [
5+ { "username" : " rgantzos" , "url" : " https://scratch.mit.edu/users/rgantzos/" }
6+ ],
7+ "type" : [" Website" ],
8+ "tags" : [" New" ],
9+ "dynamic" : true ,
10+ "scripts" : [{ "file" : " script.js" , "runOn" : " /projects/*" }],
11+ "components" : [
12+ {
13+ "type" : " info" ,
14+ "content" : " For Mac users, use Command + G to start and stop the project." ,
15+ "if" : {
16+ "type" : " all" ,
17+ "conditions" : [
18+ {
19+ "type" : " os" ,
20+ "value" : " Macintosh"
21+ }
22+ ]
23+ }
24+ }
25+ ]
26+ }
Original file line number Diff line number Diff line change 1+ export default function ( { feature, console } ) {
2+ document . addEventListener ( "keydown" , function ( e ) {
3+ if ( ! feature . traps . vm ) return ;
4+ if ( ! feature . self . enabled ) return ;
5+ if ( e . which === 71 && ( e . metaKey || e . ctrlKey ) ) {
6+ e . preventDefault ( ) ;
7+ if ( feature . traps . gui ( ) . vmStatus . started ) {
8+ if ( feature . traps . gui ( ) . vmStatus . running ) {
9+ feature . traps . vm . stopAll ( ) ;
10+ } else {
11+ feature . traps . vm . greenFlag ( ) ;
12+ }
13+ } else {
14+ feature . traps . vm . start ( ) ;
15+ feature . traps . vm . greenFlag ( ) ;
16+ }
17+ }
18+ } ) ;
19+ }
You can’t perform that action at this time.
0 commit comments