mirror of
				https://codeberg.org/nobody/LocalCDN.git
				synced 2025-06-05 21:49:31 +02:00 
			
		
		
		
	Show the rule set generator only when there are new CDNs
This commit is contained in:
		
							
								
								
									
										11
									
								
								core/main.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								core/main.js
									
									
									
									
									
								
							@@ -93,22 +93,19 @@ main._showReleaseNotes = function (details) {
 | 
			
		||||
        });
 | 
			
		||||
    } else if (details.reason === chrome.runtime.OnInstalledReason.UPDATE) {
 | 
			
		||||
 | 
			
		||||
        let newValue = lastMappingUpdate;
 | 
			
		||||
        let oldValue = "";
 | 
			
		||||
 | 
			
		||||
        // If add-on update true, check last update of mappings.js
 | 
			
		||||
        chrome.storage.sync.get([Setting.LAST_MAPPING_UPDATE, Setting.HIDE_RELEASE_NOTES], function (items) {
 | 
			
		||||
 | 
			
		||||
            oldValue = items.lastMappingUpdate;
 | 
			
		||||
            let mappingUpdate = items.lastMappingUpdate !== lastMappingUpdate;
 | 
			
		||||
 | 
			
		||||
            if (oldValue !== newValue || !items.hideReleaseNotes) {
 | 
			
		||||
            if (mappingUpdate || !items.hideReleaseNotes) {
 | 
			
		||||
                // Updated mappings.js
 | 
			
		||||
                chrome.storage.sync.set({
 | 
			
		||||
                    [Setting.LAST_MAPPING_UPDATE]: newValue
 | 
			
		||||
                    [Setting.LAST_MAPPING_UPDATE]: lastMappingUpdate
 | 
			
		||||
                }, function() {
 | 
			
		||||
                    if (!items.hideReleaseNotes) {
 | 
			
		||||
                        chrome.tabs.create({
 | 
			
		||||
                            'url': chrome.extension.getURL('pages/updates/updates.html'),
 | 
			
		||||
                            'url': chrome.extension.getURL('pages/updates/updates.html?mappingupdate=' + mappingUpdate),
 | 
			
		||||
                            'active': false
 | 
			
		||||
                        });
 | 
			
		||||
                    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user