mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-31 15:42:59 +00:00 
			
		
		
		
	Cleanups
This commit is contained in:
		
							
								
								
									
										12
									
								
								js/App.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								js/App.js
									
									
									
									
									
								
							| @@ -26,13 +26,9 @@ var App = function() { | |||||||
| 	this.isBrowser = typeof window !== "undefined"; | 	this.isBrowser = typeof window !== "undefined"; | ||||||
| 	// Create the main store | 	// Create the main store | ||||||
| 	this.store = new WikiStore();	 | 	this.store = new WikiStore();	 | ||||||
| 	// Register the wikitext parser and the image parser | 	// Register the parsers | ||||||
| 	this.store.registerParser("text/x-tiddlywiki",new WikiTextParser({ | 	this.store.registerParser("text/x-tiddlywiki",new WikiTextParser({store: this.store})); | ||||||
| 		store: this.store | 	this.store.registerParser("application/json",new JSONParser({store: this.store})); | ||||||
| 	})); |  | ||||||
| 	this.store.registerParser("application/json",new JSONParser({ |  | ||||||
| 		store: this.store |  | ||||||
| 	})); |  | ||||||
| 	var imageParser = new ImageParser(); | 	var imageParser = new ImageParser(); | ||||||
| 	this.store.registerParser("image/svg+xml",imageParser); | 	this.store.registerParser("image/svg+xml",imageParser); | ||||||
| 	this.store.registerParser("image/jpg",imageParser); | 	this.store.registerParser("image/jpg",imageParser); | ||||||
| @@ -84,7 +80,7 @@ var App = function() { | |||||||
| 			this.store.addTiddler(new Tiddler(tiddlers[t])); | 			this.store.addTiddler(new Tiddler(tiddlers[t])); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	// Set up the JavaScript parser | 	// Set up the JavaScript parser. Currently a hack; the idea is that the parsers would be loaded through a boot recipe | ||||||
| 	if(this.isBrowser) { | 	if(this.isBrowser) { | ||||||
| 		this.store.jsParser = new JavaScriptParser(this.store.getTiddlerText("javascript.pegjs")); | 		this.store.jsParser = new JavaScriptParser(this.store.getTiddlerText("javascript.pegjs")); | ||||||
| 	} else { | 	} else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston