Injector v4.2.0: New CSP Bypasser, color picker settings UI

pull/8/head
Oj18 4 years ago
parent afdc440375
commit fb8c15a4ce

@ -1,5 +1,12 @@
# GooseMod Changelog
## v4.2.0
- ### Features
- Added color picker to Settings UI API
- New CSP bypasser which uses standard URI
## v4.1.0
- ### Features

6
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

@ -84,7 +84,7 @@ const init = async function () {
a++;
};
this.cspBypasser.init();
await this.cspBypasser.init();
/*for (let p in toAssign) {
if (toAssign.hasOwnProperty(p)) {
@ -101,7 +101,7 @@ const init = async function () {
this.modules = {};
this.disabledModules = {};
this.version = '4.1.0';
this.version = '4.2.0';
this.versionHash = '<hash>'; // hash of built final js file is inserted here via build script
this.logger.debug('import.version.goosemod', `${this.version} (${this.versionHash})`);
@ -243,8 +243,6 @@ const init = async function () {
this.openSettingItem('Module Store');
}
}
console.log(this);
};
init.bind({})();

@ -417,6 +417,62 @@ export const _createItem = (panelName, content, clickHandler, danger = false) =>
break;
case 'text-and-color': {
el = document.createElement('div');
el.classList.add('marginBottom20-32qID7');
let txtEl = document.createElement('span');
txtEl.classList.add('titleDefault-a8-ZSr', 'title-31JmR4');
txtEl.style.float = 'left';
txtEl.innerHTML = e.text;
let colorEl = document.createElement('input');
colorEl.type = 'color';
colorEl.style.width = '50px';
colorEl.style.height = '30px';
colorEl.style.display = 'block';
colorEl.classList.add('colorPickerSwatch-5GX3Ve', 'custom-2SJn4n', 'noColor-1pdBDm');
colorEl.oninput = () => {
e.oninput(colorEl.value);
//e.onclick(buttonEl2);
};
colorEl.style.cursor = 'pointer';
colorEl.style.float = 'right';
el.appendChild(txtEl);
el.appendChild(colorEl);
if (e.subtext) {
let subtextEl = document.createElement('div');
subtextEl.classList.add('colorStandard-2KCXvj', 'size14-e6ZScH', 'description-3_Ncsb', 'formText-3fs7AJ', 'note-1V3kyJ', 'modeDefault-3a2Ph1');
subtextEl.textContent = e.subtext;
subtextEl.style.clear = 'both';
el.appendChild(subtextEl);
}
let dividerEl = document.createElement('div');
dividerEl.classList.add('divider-3573oO', 'dividerDefault-3rvLe-');
dividerEl.style.marginTop = e.subtext ? '20px' : '45px';
el.appendChild(dividerEl);
break;
}
case 'button':
el = document.createElement('button');

@ -5,14 +5,12 @@ export default {
goosemodScope = scope;
},
frame: document.createElement('iframe'),
frame: document.createElement('object'),
init: async () => {
goosemodScope.cspBypasser.frame.src = 'discord:';
goosemodScope.cspBypasser.frame.data = location.origin;
document.body.appendChild(goosemodScope.cspBypasser.frame);
//await awaitIframe(goosemodScope.cspBypasser.frame);
let script = document.createElement('script');
script.type = 'text/javascript';

Loading…
Cancel
Save