Fix #969 issue with installing plugins in China

Fix potential issue where logo is visible through interface
This commit is contained in:
JannisX11 2021-07-19 21:20:18 +02:00
parent a6e7ae8733
commit db9a370b81
2 changed files with 3 additions and 6 deletions

View File

@ -12,11 +12,9 @@
width: 100%;
border: 2px solid var(--color-frame);
border-top: none;
opacity: 1;
transition: opacity 0.1s linear;
}
#page_wrapper.hidden {
opacity: 0;
display: none;
}
body {
background-image: url('../assets/logo_cutout.svg');

View File

@ -1,6 +1,5 @@
var onUninstall, onInstall;
const Plugins = {
apipath: 'https://raw.githubusercontent.com/JannisX11/blockbench-plugins/master/plugins.json',
Vue: [], //Vue Object
installed: [], //Simple List of Names
json: undefined, //Json from website
@ -112,7 +111,7 @@ class Plugin {
}
return await new Promise((resolve, reject) => {
var file = originalFs.createWriteStream(Plugins.path+this.id+'.js')
https.get('https://raw.githubusercontent.com/JannisX11/blockbench-plugins/master/plugins/'+this.id+'.js', function(response) {
https.get('https://cdn.jsdelivr.net/gh/JannisX11/blockbench-plugins/plugins/'+this.id+'.js', function(response) {
response.pipe(file);
response.on('end', function() {
setTimeout(async function() {
@ -367,7 +366,7 @@ if (isApp) {
}
Plugins.loading_promise = new Promise((resolve, reject) => {
$.getJSON(Plugins.apipath, function(data) {
$.getJSON('https://cdn.jsdelivr.net/gh/JannisX11/blockbench-plugins/plugins.json', function(data) {
Plugins.json = data
resolve();
Plugins.loading_promise.resolved = true;