mirror of
				https://github.com/EndPwnArchive/EndPwn3Plugins.git
				synced 2024-08-14 23:57:06 +00:00 
			
		
		
		
	update pluginsrepo, adds update check button
This commit is contained in:
		
							parent
							
								
									fdb93d6e2b
								
							
						
					
					
						commit
						88dbbdb77f
					
				
					 1 changed files with 18 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -16,7 +16,7 @@ exports = {
 | 
			
		|||
        author: "Cynosphere",
 | 
			
		||||
        name: "Plugins Repo",
 | 
			
		||||
        description: "Download plugins.",
 | 
			
		||||
        _version: 1
 | 
			
		||||
        _version: 2
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    getInfo: async function(plugin){
 | 
			
		||||
| 
						 | 
				
			
			@ -239,6 +239,7 @@ exports = {
 | 
			
		|||
 | 
			
		||||
            em.createButton("Reload list")
 | 
			
		||||
            .modify(async x=>{
 | 
			
		||||
                x.className = `${x.className} ${int.buttons.colorGreen}`;
 | 
			
		||||
                x.onclick=async ()=>{
 | 
			
		||||
                    if(Date.now() < window._prTimeout){
 | 
			
		||||
                        em.createH5(`Ratelimited, try again in ${Math.floor(window._prTimeout-Date.now())}s.`)
 | 
			
		||||
| 
						 | 
				
			
			@ -263,6 +264,22 @@ exports = {
 | 
			
		|||
            })
 | 
			
		||||
            .appendTo(btns);
 | 
			
		||||
 | 
			
		||||
            em.createButton("Check for updates")
 | 
			
		||||
            .modify(async x=>{
 | 
			
		||||
                x.className = `${x.className} ${int.buttons.colorYellow}`;
 | 
			
		||||
                x.onclick=async ()=>{
 | 
			
		||||
                    if(Date.now() < window._prTimeout){
 | 
			
		||||
                        em.createH5(`Ratelimited, try again in ${Math.floor(window._prTimeout-Date.now())}s.`)
 | 
			
		||||
                        .modify(y=>setTimeout(_=>{y.parentNode.removeChild(y)},2000))
 | 
			
		||||
                        .appendTo(btns);
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
                    exports.updateCheck();
 | 
			
		||||
                }
 | 
			
		||||
            })
 | 
			
		||||
            .appendTo(btns);
 | 
			
		||||
 | 
			
		||||
            var list = em.createVerticalPanel()
 | 
			
		||||
            .appendTo(pnl);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue