Add back social buttons

This commit is contained in:
Maroxy 2021-10-17 23:59:15 +02:00
parent 5cb94c81e1
commit 5a5d520dde
3 changed files with 14 additions and 8 deletions

1
public/css/layout.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -8,6 +8,7 @@
<!-- CSS styles -->
<link rel="stylesheet" href="../css/index.css">
<link rel="stylesheet" href="../css/hint.min.css">
<link rel="stylesheet" href="../css/layout.min.css">
<!-- JS scripts -->
<script>require('../js/index.js');</script>

View file

@ -19,18 +19,22 @@ $(() => {
// Don't really think we need this, but maybe in future~~
/*fetch(`https://genshin.mihoyo.com/launcher/10/${ Genshinlib.getConfig().lang.launcher }?api_url=https%3A%2F%2Fapi-os-takumi.mihoyo.com%2Fhk4e_global&prev=false`)
fetch(`https://genshin.mihoyo.com/launcher/10/${ Genshinlib.getConfig().lang.launcher }?api_url=https%3A%2F%2Fapi-os-takumi.mihoyo.com%2Fhk4e_global&prev=false`)
.then(res => res.text())
.then(body => {
$(body).appendTo('#launchcontent');
// Get the element which should have the launchers content.
let container = document.getElementById('launchcontent');
// $('.home__main').detach('.home-swiper-wrap')
// Parse the HTML and append the HTML from the site to the div.
let parser = new DOMParser();
let converted = parser.parseFromString(body, 'text/html');
container!.appendChild(converted.getElementById('__layout')!);
// Get the home container to remove the functions that don't work currently.
// let home = container!.getElementsByClassName('home__main')[0];
// home.removeChild(home.getElementsByClassName('home-swiper-wrap')[0]);
// home.removeChild(home.getElementsByClassName('home-news')[0]);
});*/
let home = container!.getElementsByClassName('home__main')[0];
home.removeChild(home.getElementsByClassName('home-swiper-wrap')[0]);
home.removeChild(home.getElementsByClassName('home-news')[0]);
});
Genshinlib.getData().then(data => {
// Update available
@ -238,7 +242,7 @@ $(() => {
ipcRenderer.send('notification', {
title: document.title,
content: 'Game was succesfully installed'
content: 'Game was successfully installed'
});
}, (data) => console.log(data.toString()));
}