mirror of
				https://github.com/osmarks/mycorrhiza.git
				synced 2025-10-31 07:33:00 +00:00 
			
		
		
		
	Shortcut for editing opened hypha
It's `e`
This commit is contained in:
		| @@ -311,24 +311,25 @@ | |||||||
|             bindElement(`g ${i}`, headerLinks[i-1], `Header link #${i}`); |             bindElement(`g ${i}`, headerLinks[i-1], `Header link #${i}`); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         globalShortcuts.groupStart(); |         // * Hypha shortcuts | ||||||
|             globalShortcuts.fakeItem('1 – 9', 'First 9 hypha′s links'); |         if (typeof editTextarea === 'undefined') { | ||||||
|             bindElement('p, Alt+ArrowLeft', '.prevnext__prev', 'Next hypha'); |             globalShortcuts.fakeItem('Hypha'); | ||||||
|             bindElement('n, Alt+ArrowRight', '.prevnext__next', 'Previous hypha'); |  | ||||||
|             bindElement('s, Alt+ArrowTop', $$('.navi-title a').slice(1, -1).slice(-1)[0], 'Parent hypha'); |  | ||||||
|         globalShortcuts.groupEnd(); |  | ||||||
|  |  | ||||||
|         let hyphaLinks = $$('article .wikilink'); |             globalShortcuts.groupStart(); | ||||||
|         for (let i = 1; i <= hyphaLinks.length && i < 10; i++) { |                 globalShortcuts.fakeItem('1 – 9', 'First 9 hypha′s links'); | ||||||
|             bindElement(i.toString(), hyphaLinks[i-1], `Hypha link #${i}`); |                 bindElement('p, Alt+ArrowLeft', '.prevnext__prev', 'Next hypha'); | ||||||
|  |                 bindElement('n, Alt+ArrowRight', '.prevnext__next', 'Previous hypha'); | ||||||
|  |                 bindElement('s, Alt+ArrowTop', $$('.navi-title a').slice(1, -1).slice(-1)[0], 'Parent hypha'); | ||||||
|  |                 bindElement('e', '.hypha-tabs__link[href^="/edit/"]', 'Edit this hypha'); | ||||||
|  |             globalShortcuts.groupEnd(); | ||||||
|  |  | ||||||
|  |             let hyphaLinks = $$('article .wikilink'); | ||||||
|  |             for (let i = 1; i <= hyphaLinks.length && i < 10; i++) { | ||||||
|  |                 bindElement(i.toString(), hyphaLinks[i-1], `Hypha link #${i}`); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // * Meta shortcuts |  | ||||||
|  |  | ||||||
|         globalShortcuts.add('?', openShortcutsReference); |  | ||||||
|  |  | ||||||
|         // Hypha editor shortcuts |         // Hypha editor shortcuts | ||||||
|  |  | ||||||
|         if (typeof editTextarea !== 'undefined') { |         if (typeof editTextarea !== 'undefined') { | ||||||
|             let editorShortcuts = new ShortcutHandler(editTextarea); |             let editorShortcuts = new ShortcutHandler(editTextarea); | ||||||
|  |  | ||||||
| @@ -363,5 +364,8 @@ | |||||||
|  |  | ||||||
|             editorShortcuts.add(isMac ? 'Meta+/' : 'Ctrl+/', openShortcutsReference); |             editorShortcuts.add(isMac ? 'Meta+/' : 'Ctrl+/', openShortcutsReference); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         // * Meta shortcuts | ||||||
|  |         globalShortcuts.add('?', openShortcutsReference); | ||||||
|     }); |     }); | ||||||
| })(); | })(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 handlerug
					handlerug