Release: v1.5.0

pull/8/head
Ducko 4 years ago
parent 4974e9b77b
commit c60d03d11a

@ -1,5 +1,13 @@
# GooseMod Changelog
## v1.5.0
- ### Features
- Added local storage support (will help make a lot of modules previously impossible possible)
- ### Fixes
- Fixed console error when removing a module not from module store
## v1.4.0
- ### Features

@ -1,7 +1,22 @@
window.GooseMod = {};
(async function () {
this.version = '1.4.0';
this.version = '1.5.0';
// Bypass to get Local Storage (Discord block / remove it) - Source / credit: https://stackoverflow.com/questions/52509440/discord-window-localstorage-is-undefined-how-to-get-access-to-the-localstorage
function getLocalStoragePropertyDescriptor() {
const iframe = document.createElement('iframe');
document.head.append(iframe);
const pd = Object.getOwnPropertyDescriptor(iframe.contentWindow, 'localStorage');
iframe.remove();
return pd;
}
try {
Object.defineProperty(window, 'localStorage', getLocalStoragePropertyDescriptor());
} catch (e) {
console.error(e);
}
this.removeModuleUI = (field, where) => {
let settingItem = this.settings.items.find((x) => x[1] === 'Manage Modules');
@ -233,6 +248,8 @@ window.GooseMod = {};
moduleRemoved: async (m) => {
let item = this.settings.items.find((x) => x[1] === 'Module Store')[2].find((x) => x.subtext === m.description);
if (item === undefined) return;
item.type = 'text-and-button';
item.buttonText = 'Import';

Loading…
Cancel
Save