set pointer to global data
This commit is contained in:
		
							parent
							
								
									cfdeacd071
								
							
						
					
					
						commit
						90f6bce64b
					
				
					 1 changed files with 5 additions and 7 deletions
				
			
		|  | @ -3,7 +3,8 @@ | |||
| */ | ||||
| 
 | ||||
| // Import modules.
 | ||||
| import {session, observe} from "/scripts/secretariat.js"; | ||||
| import {session, global, observe} from "/scripts/secretariat.js"; | ||||
| import pointer from "/scripts/data/pointer.js"; | ||||
| import Window from "/scripts/GUI/window.js"; | ||||
| import Page from "/scripts/pages/page.js"; | ||||
| import Loader from "/scripts/GUI/loader.js"; | ||||
|  | @ -32,13 +33,10 @@ class Page_Popup extends Page { | |||
| 	*/ | ||||
| 	async update(override = false) { | ||||
| 		// Set the reference website when overriding or unset. 
 | ||||
| 		(override || !this[`ref`]) ? this[`ref`] = await session.read([`last`, `URL`]) : false; | ||||
| 		(override || !this[`ref`]) ? this[`ref`] = await global.read([`last`]) : false; | ||||
| 
 | ||||
| 		// Update all other data. 
 | ||||
| 		(this[`ref`]) ? this[`data`] = await session.read([`last`]) : false; | ||||
| 
 | ||||
| 		// Merge objects
 | ||||
| 		(this[`data`] && this[`ref`]) ? this[`data`] = Object.assign(this[`data`], await session.read([`sites`, this[`ref`]])) : false; | ||||
| 		(this[`ref`]) ? this[`data`] = await global.read([`sites`, this[`ref`]]) : false; | ||||
| 	} | ||||
| 
 | ||||
| 	async loading() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue